Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions sdk/apimanagement/azure-mgmt-apimanagement/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "44d7a32482656b3a79a2fa11ac27c981f8e0e3cd",
"commit": "a12f06bc4e4f1ff04718892feb1be056ecdb3f9b",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.13.7",
"@autorest/python@6.19.0",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/apimanagement/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-2022-08 --use=@autorest/python@6.13.7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
"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/s/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/apimanagement/resource-manager/readme.md"
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class ApiManagementClientConfiguration: # pylint: disable=too-many-instance-att

:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
: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 "2022-08-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-06-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", "2022-08-01")
api_version: str = kwargs.pop("api_version", "2024-06-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,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():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def _json_attemp(data):
# context otherwise.
_LOGGER.critical("Wasn't XML not JSON, failing")
raise DeserializationError("XML is invalid") from err
elif content_type.startswith("text/"):
return data_as_str
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))

@classmethod
Expand Down Expand Up @@ -1441,7 +1443,7 @@ def _deserialize(self, target_obj, data):
elif isinstance(response, type) and issubclass(response, Enum):
return self.deserialize_enum(data, response)

if data is None:
if data is None or data is CoreNull:
return data
try:
attributes = response._attribute_map # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
from abc import ABC
from typing import TYPE_CHECKING

from azure.core.pipeline.transport import HttpRequest

from ._configuration import ApiManagementClientConfiguration

if TYPE_CHECKING:
Expand All @@ -19,14 +17,6 @@
from ._serialization import Deserializer, Serializer


def _convert_request(request, files=None):
data = request.content if not files else None
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
if files:
request.set_formdata_body(files)
return request


class ApiManagementClientMixinABC(ABC):
"""DO NOT use this class. It is for internal typing use only."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "4.0.1"
VERSION = "1.0.0b1"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class ApiManagementClientConfiguration: # pylint: disable=too-many-instance-att

:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. Required.
: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 "2022-08-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-06-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", "2022-08-01")
api_version: str = kwargs.pop("api_version", "2024-06-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,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():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
from abc import ABC
from typing import TYPE_CHECKING

from azure.core.pipeline.transport import HttpRequest

from ._configuration import ApiManagementClientConfiguration

if TYPE_CHECKING:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._api_gateway_operations import ApiGatewayOperations
from ._api_management_gateway_skus_operations import ApiManagementGatewaySkusOperations
from ._all_policies_operations import AllPoliciesOperations
from ._api_operations import ApiOperations
from ._api_revision_operations import ApiRevisionOperations
from ._api_release_operations import ApiReleaseOperations
Expand All @@ -27,11 +30,11 @@
from ._api_wikis_operations import ApiWikisOperations
from ._api_export_operations import ApiExportOperations
from ._api_version_set_operations import ApiVersionSetOperations
from ._authorization_server_operations import AuthorizationServerOperations
from ._authorization_provider_operations import AuthorizationProviderOperations
from ._authorization_operations import AuthorizationOperations
from ._authorization_login_links_operations import AuthorizationLoginLinksOperations
from ._authorization_access_policy_operations import AuthorizationAccessPolicyOperations
from ._authorization_server_operations import AuthorizationServerOperations
from ._backend_operations import BackendOperations
from ._cache_operations import CacheOperations
from ._certificate_operations import CertificateOperations
Expand All @@ -43,7 +46,9 @@
from ._api_management_service_skus_operations import ApiManagementServiceSkusOperations
from ._api_management_service_operations import ApiManagementServiceOperations
from ._diagnostic_operations import DiagnosticOperations
from ._documentation_operations import DocumentationOperations
from ._email_template_operations import EmailTemplateOperations
from ._api_gateway_config_connection_operations import ApiGatewayConfigConnectionOperations
from ._gateway_operations import GatewayOperations
from ._gateway_hostname_configuration_operations import GatewayHostnameConfigurationOperations
from ._gateway_api_operations import GatewayApiOperations
Expand All @@ -63,6 +68,8 @@
from ._policy_operations import PolicyOperations
from ._policy_description_operations import PolicyDescriptionOperations
from ._policy_fragment_operations import PolicyFragmentOperations
from ._policy_restriction_operations import PolicyRestrictionOperations
from ._policy_restriction_validations_operations import PolicyRestrictionValidationsOperations
from ._portal_config_operations import PortalConfigOperations
from ._portal_revision_operations import PortalRevisionOperations
from ._portal_settings_operations import PortalSettingsOperations
Expand All @@ -77,6 +84,8 @@
from ._product_policy_operations import ProductPolicyOperations
from ._product_wiki_operations import ProductWikiOperations
from ._product_wikis_operations import ProductWikisOperations
from ._product_api_link_operations import ProductApiLinkOperations
from ._product_group_link_operations import ProductGroupLinkOperations
from ._quota_by_counter_keys_operations import QuotaByCounterKeysOperations
from ._quota_by_period_keys_operations import QuotaByPeriodKeysOperations
from ._region_operations import RegionOperations
Expand All @@ -86,6 +95,9 @@
from ._api_management_skus_operations import ApiManagementSkusOperations
from ._subscription_operations import SubscriptionOperations
from ._tag_resource_operations import TagResourceOperations
from ._tag_api_link_operations import TagApiLinkOperations
from ._tag_operation_link_operations import TagOperationLinkOperations
from ._tag_product_link_operations import TagProductLinkOperations
from ._tenant_access_operations import TenantAccessOperations
from ._tenant_access_git_operations import TenantAccessGitOperations
from ._tenant_configuration_operations import TenantConfigurationOperations
Expand All @@ -94,13 +106,52 @@
from ._user_subscription_operations import UserSubscriptionOperations
from ._user_identities_operations import UserIdentitiesOperations
from ._user_confirmation_password_operations import UserConfirmationPasswordOperations
from ._documentation_operations import DocumentationOperations
from ._workspace_backend_operations import WorkspaceBackendOperations
from ._workspace_certificate_operations import WorkspaceCertificateOperations
from ._workspace_diagnostic_operations import WorkspaceDiagnosticOperations
from ._workspace_api_diagnostic_operations import WorkspaceApiDiagnosticOperations
from ._api_management_workspace_links_operations import ApiManagementWorkspaceLinksOperations
from ._api_management_workspace_link_operations import ApiManagementWorkspaceLinkOperations
from ._workspace_logger_operations import WorkspaceLoggerOperations
from ._workspace_operations import WorkspaceOperations
from ._workspace_policy_operations import WorkspacePolicyOperations
from ._workspace_named_value_operations import WorkspaceNamedValueOperations
from ._workspace_global_schema_operations import WorkspaceGlobalSchemaOperations
from ._workspace_notification_operations import WorkspaceNotificationOperations
from ._workspace_notification_recipient_user_operations import WorkspaceNotificationRecipientUserOperations
from ._workspace_notification_recipient_email_operations import WorkspaceNotificationRecipientEmailOperations
from ._workspace_policy_fragment_operations import WorkspacePolicyFragmentOperations
from ._workspace_group_operations import WorkspaceGroupOperations
from ._workspace_group_user_operations import WorkspaceGroupUserOperations
from ._workspace_subscription_operations import WorkspaceSubscriptionOperations
from ._workspace_api_version_set_operations import WorkspaceApiVersionSetOperations
from ._workspace_api_operations import WorkspaceApiOperations
from ._workspace_api_revision_operations import WorkspaceApiRevisionOperations
from ._workspace_api_release_operations import WorkspaceApiReleaseOperations
from ._workspace_api_operation_operations import WorkspaceApiOperationOperations
from ._workspace_api_operation_policy_operations import WorkspaceApiOperationPolicyOperations
from ._workspace_api_policy_operations import WorkspaceApiPolicyOperations
from ._workspace_api_schema_operations import WorkspaceApiSchemaOperations
from ._workspace_product_operations import WorkspaceProductOperations
from ._workspace_product_api_link_operations import WorkspaceProductApiLinkOperations
from ._workspace_product_group_link_operations import WorkspaceProductGroupLinkOperations
from ._workspace_product_policy_operations import WorkspaceProductPolicyOperations
from ._workspace_tag_operations import WorkspaceTagOperations
from ._workspace_tag_api_link_operations import WorkspaceTagApiLinkOperations
from ._workspace_tag_operation_link_operations import WorkspaceTagOperationLinkOperations
from ._workspace_tag_product_link_operations import WorkspaceTagProductLinkOperations
from ._workspace_api_export_operations import WorkspaceApiExportOperations
from ._operation_status_operations import OperationStatusOperations
from ._operations_results_operations import OperationsResultsOperations

from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"ApiGatewayOperations",
"ApiManagementGatewaySkusOperations",
"AllPoliciesOperations",
"ApiOperations",
"ApiRevisionOperations",
"ApiReleaseOperations",
Expand All @@ -122,11 +173,11 @@
"ApiWikisOperations",
"ApiExportOperations",
"ApiVersionSetOperations",
"AuthorizationServerOperations",
"AuthorizationProviderOperations",
"AuthorizationOperations",
"AuthorizationLoginLinksOperations",
"AuthorizationAccessPolicyOperations",
"AuthorizationServerOperations",
"BackendOperations",
"CacheOperations",
"CertificateOperations",
Expand All @@ -138,7 +189,9 @@
"ApiManagementServiceSkusOperations",
"ApiManagementServiceOperations",
"DiagnosticOperations",
"DocumentationOperations",
"EmailTemplateOperations",
"ApiGatewayConfigConnectionOperations",
"GatewayOperations",
"GatewayHostnameConfigurationOperations",
"GatewayApiOperations",
Expand All @@ -158,6 +211,8 @@
"PolicyOperations",
"PolicyDescriptionOperations",
"PolicyFragmentOperations",
"PolicyRestrictionOperations",
"PolicyRestrictionValidationsOperations",
"PortalConfigOperations",
"PortalRevisionOperations",
"PortalSettingsOperations",
Expand All @@ -172,6 +227,8 @@
"ProductPolicyOperations",
"ProductWikiOperations",
"ProductWikisOperations",
"ProductApiLinkOperations",
"ProductGroupLinkOperations",
"QuotaByCounterKeysOperations",
"QuotaByPeriodKeysOperations",
"RegionOperations",
Expand All @@ -181,6 +238,9 @@
"ApiManagementSkusOperations",
"SubscriptionOperations",
"TagResourceOperations",
"TagApiLinkOperations",
"TagOperationLinkOperations",
"TagProductLinkOperations",
"TenantAccessOperations",
"TenantAccessGitOperations",
"TenantConfigurationOperations",
Expand All @@ -189,7 +249,43 @@
"UserSubscriptionOperations",
"UserIdentitiesOperations",
"UserConfirmationPasswordOperations",
"DocumentationOperations",
"WorkspaceBackendOperations",
"WorkspaceCertificateOperations",
"WorkspaceDiagnosticOperations",
"WorkspaceApiDiagnosticOperations",
"ApiManagementWorkspaceLinksOperations",
"ApiManagementWorkspaceLinkOperations",
"WorkspaceLoggerOperations",
"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",
"WorkspaceApiExportOperations",
"OperationStatusOperations",
"OperationsResultsOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Loading