Skip to content

[AutoPR azure-ai-documentintelligence]-generated-from-SDK Generation - Python-5212129 #42493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ include azure/ai/documentintelligence/py.typed
recursive-include tests *.py
recursive-include samples *.py *.md
include azure/__init__.py
include azure/ai/__init__.py
include azure/ai/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"apiVersion": "2025-09-01",
"commit": "c03820dacaeb1a058d4914fce296e31b160111dc",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/ai/DocumentIntelligence",
"emitterVersion": "0.48.1"
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@
DocumentIntelligenceClientConfiguration,
)
from ._operations import (
DocumentIntelligenceAdministrationClientOperationsMixin,
DocumentIntelligenceClientOperationsMixin,
_DocumentIntelligenceAdministrationClientOperationsMixin,
_DocumentIntelligenceClientOperationsMixin,
)
from ._serialization import Deserializer, Serializer
from ._utils.serialization import Deserializer, Serializer

if TYPE_CHECKING:
from azure.core.credentials import TokenCredential


class DocumentIntelligenceClient(DocumentIntelligenceClientOperationsMixin):
class DocumentIntelligenceClient(_DocumentIntelligenceClientOperationsMixin):
"""DocumentIntelligenceClient.

:param endpoint: The Document Intelligence service endpoint. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is either a
AzureKeyCredential type or a TokenCredential type. Required.
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2024-11-30".
:keyword api_version: The API version to use for this operation. Default value is "2025-09-01".
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
Expand All @@ -48,6 +48,7 @@ class DocumentIntelligenceClient(DocumentIntelligenceClientOperationsMixin):
def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None:
_endpoint = "{endpoint}/documentintelligence"
self._config = DocumentIntelligenceClientConfiguration(endpoint=endpoint, credential=credential, **kwargs)

_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
Expand Down Expand Up @@ -108,16 +109,16 @@ def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)


class DocumentIntelligenceAdministrationClient(DocumentIntelligenceAdministrationClientOperationsMixin):
class DocumentIntelligenceAdministrationClient(_DocumentIntelligenceAdministrationClientOperationsMixin):
"""DocumentIntelligenceAdministrationClient.

:param endpoint: The Document Intelligence service endpoint. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is either a
AzureKeyCredential type or a TokenCredential type. Required.
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2024-11-30".
:keyword api_version: The API version to use for this operation. Default value is "2025-09-01".
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
Expand All @@ -129,6 +130,7 @@ def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCr
self._config = DocumentIntelligenceAdministrationClientConfiguration(
endpoint=endpoint, credential=credential, **kwargs
)

_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=line-too-long,useless-suppression
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down Expand Up @@ -25,17 +26,17 @@ class DocumentIntelligenceClientConfiguration: # pylint: disable=too-many-insta

:param endpoint: The Document Intelligence service endpoint. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is either a
AzureKeyCredential type or a TokenCredential type. Required.
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2024-11-30".
:keyword api_version: The API version to use for this operation. Default value is "2025-09-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2024-11-30")
api_version: str = kwargs.pop("api_version", "2025-09-01")

if endpoint is None:
raise ValueError("Parameter 'endpoint' must not be None.")
Expand Down Expand Up @@ -79,17 +80,17 @@ class DocumentIntelligenceAdministrationClientConfiguration: # pylint: disable=

:param endpoint: The Document Intelligence service endpoint. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is either a
AzureKeyCredential type or a TokenCredential type. Required.
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2024-11-30".
:keyword api_version: The API version to use for this operation. Default value is "2025-09-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2024-11-30")
api_version: str = kwargs.pop("api_version", "2025-09-01")

if endpoint is None:
raise ValueError("Parameter 'endpoint' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=line-too-long,useless-suppression
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand All @@ -12,16 +13,13 @@
if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._operations import DocumentIntelligenceClientOperationsMixin # type: ignore
from ._operations import DocumentIntelligenceAdministrationClientOperationsMixin # type: ignore
from ._operations import _DocumentIntelligenceClientOperationsMixin # type: ignore # pylint: disable=unused-import
from ._operations import _DocumentIntelligenceAdministrationClientOperationsMixin # 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__ = [
"DocumentIntelligenceClientOperationsMixin",
"DocumentIntelligenceAdministrationClientOperationsMixin",
]
__all__ = []
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
Loading
Loading