Skip to content
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

[AutoPR azure-ai-documentintelligence] Java renames for DI GA #9670

Closed
wants to merge 1 commit into from
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"commit": "589b1df4008acf3914143c408baadd344250d9a7",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/ai/DocumentIntelligence",
"@azure-tools/typespec-python": "0.37.1"
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,86 +6,9 @@

Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
from typing import Any, List, Union
from azure.core.credentials import AzureKeyCredential, TokenCredential
from ._client import (
DocumentIntelligenceClient as DIClientGenerated,
DocumentIntelligenceAdministrationClient as DIAClientGenerated,
)
from ._operations._patch import AnalyzeDocumentLROPoller
from typing import List


class DocumentIntelligenceClient(DIClientGenerated):
"""DocumentIntelligenceClient.

:param endpoint: The Document Intelligence service endpoint. Required.
:type endpoint: str
:param credential: Credential needed for the client to connect to Azure. Is either a
AzureKeyCredential type or a TokenCredential 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-07-31-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.
"""

def __init__(
self,
endpoint: str,
credential: Union[AzureKeyCredential, TokenCredential],
**kwargs: Any,
) -> None:
# Patch the default polling interval to be 1s.
polling_interval = kwargs.pop("polling_interval", 1)
super().__init__(
endpoint=endpoint,
credential=credential,
polling_interval=polling_interval,
**kwargs,
)


class DocumentIntelligenceAdministrationClient(DIAClientGenerated):
"""DocumentIntelligenceAdministrationClient.

:param endpoint: The Document Intelligence service endpoint. Required.
:type endpoint: str
:param credential: Credential needed for the client to connect to Azure. Is either a
AzureKeyCredential type or a TokenCredential 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-07-31-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.
"""

def __init__(
self,
endpoint: str,
credential: Union[AzureKeyCredential, TokenCredential],
**kwargs: Any,
) -> None:
# Patch the default polling interval to be 1s.
polling_interval = kwargs.pop("polling_interval", 1)
super().__init__(
endpoint=endpoint,
credential=credential,
polling_interval=polling_interval,
**kwargs,
)


__all__: List[str] = [
"DocumentIntelligenceClient",
"DocumentIntelligenceAdministrationClient",
"AnalyzeDocumentLROPoller",
] # 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():
Expand Down

This file was deleted.

Loading
Loading