Skip to content

Commit

Permalink
CodeGen from PR 31880 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge f3bb4d08a4fc0a1813fb19115a456c7a0267921f into 17dbd6e760c42aeacf1db39381fc26e30dda72ca
  • Loading branch information
SDKAuto committed Dec 17, 2024
1 parent 55289ca commit befb155
Show file tree
Hide file tree
Showing 32 changed files with 1,455 additions and 1,654 deletions.
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

0 comments on commit befb155

Please sign in to comment.