diff options
Diffstat (limited to '.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery')
20 files changed, 1642 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/__init__.py new file mode 100644 index 00000000..da466144 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license 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_machine_learning_workspaces import AzureMachineLearningWorkspaces +from ._version import VERSION + +__version__ = VERSION +__all__ = ['AzureMachineLearningWorkspaces'] + +# `._patch.py` 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 +from ._patch import patch_sdk +patch_sdk() diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_azure_machine_learning_workspaces.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_azure_machine_learning_workspaces.py new file mode 100644 index 00000000..fa586627 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_azure_machine_learning_workspaces.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +from . import models +from ._configuration import AzureMachineLearningWorkspacesConfiguration +from .operations import AsyncOperationsOperations, RegistryManagementNonWorkspaceOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + +class AzureMachineLearningWorkspaces(object): + """AzureMachineLearningWorkspaces. + + :ivar async_operations: AsyncOperationsOperations operations + :vartype async_operations: + azure.mgmt.machinelearningservices.operations.AsyncOperationsOperations + :ivar registry_management_non_workspace: RegistryManagementNonWorkspaceOperations operations + :vartype registry_management_non_workspace: + azure.mgmt.machinelearningservices.operations.RegistryManagementNonWorkspaceOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param base_url: Service URL. Default value is ''. + :type base_url: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + base_url="", # type: str + **kwargs # type: Any + ): + # type: (...) -> None + self._config = AzureMachineLearningWorkspacesConfiguration(credential=credential, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **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.client_side_validation = False + self.async_operations = AsyncOperationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.registry_management_non_workspace = RegistryManagementNonWorkspaceOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + <HttpRequest [GET], url: 'https://www.example.org/'> + >>> response = client._send_request(request) + <HttpResponse: 200 OK> + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> AzureMachineLearningWorkspaces + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_configuration.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_configuration.py new file mode 100644 index 00000000..2ec7eb9e --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_configuration.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class AzureMachineLearningWorkspacesConfiguration(Configuration): + """Configuration for AzureMachineLearningWorkspaces. + + 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. + :type credential: ~azure.core.credentials.TokenCredential + """ + + def __init__( + self, + credential, # type: "TokenCredential" + **kwargs # type: Any + ): + # type: (...) -> None + super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-machinelearningservices/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_patch.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_patch.py new file mode 100644 index 00000000..74e48ecd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_patch.py @@ -0,0 +1,31 @@ +# 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. +# +# -------------------------------------------------------------------------- + +# 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
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_vendor.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_vendor.py new file mode 100644 index 00000000..138f663c --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license 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.core.pipeline.transport import HttpRequest + +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 + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_version.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_version.py new file mode 100644 index 00000000..eae7c95b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/__init__.py new file mode 100644 index 00000000..f67ccda9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license 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_machine_learning_workspaces import AzureMachineLearningWorkspaces +__all__ = ['AzureMachineLearningWorkspaces'] + +# `._patch.py` 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 +from ._patch import patch_sdk +patch_sdk() diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/_azure_machine_learning_workspaces.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/_azure_machine_learning_workspaces.py new file mode 100644 index 00000000..b793c60b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/_azure_machine_learning_workspaces.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, Optional, TYPE_CHECKING + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +from .. import models +from ._configuration import AzureMachineLearningWorkspacesConfiguration +from .operations import AsyncOperationsOperations, RegistryManagementNonWorkspaceOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class AzureMachineLearningWorkspaces: + """AzureMachineLearningWorkspaces. + + :ivar async_operations: AsyncOperationsOperations operations + :vartype async_operations: + azure.mgmt.machinelearningservices.aio.operations.AsyncOperationsOperations + :ivar registry_management_non_workspace: RegistryManagementNonWorkspaceOperations operations + :vartype registry_management_non_workspace: + azure.mgmt.machinelearningservices.aio.operations.RegistryManagementNonWorkspaceOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param base_url: Service URL. Default value is ''. + :type base_url: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + base_url: str = "", + **kwargs: Any + ) -> None: + self._config = AzureMachineLearningWorkspacesConfiguration(credential=credential, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **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.client_side_validation = False + self.async_operations = AsyncOperationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.registry_management_non_workspace = RegistryManagementNonWorkspaceOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + <HttpRequest [GET], url: 'https://www.example.org/'> + >>> response = await client._send_request(request) + <AsyncHttpResponse: 200 OK> + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "AzureMachineLearningWorkspaces": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/_configuration.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/_configuration.py new file mode 100644 index 00000000..26def54e --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/_configuration.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class AzureMachineLearningWorkspacesConfiguration(Configuration): + """Configuration for AzureMachineLearningWorkspaces. + + 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. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + **kwargs: Any + ) -> None: + super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-machinelearningservices/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/_patch.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/_patch.py new file mode 100644 index 00000000..74e48ecd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/_patch.py @@ -0,0 +1,31 @@ +# 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. +# +# -------------------------------------------------------------------------- + +# 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
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/operations/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/operations/__init__.py new file mode 100644 index 00000000..f9352a59 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/operations/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._async_operations_operations import AsyncOperationsOperations +from ._registry_management_non_workspace_operations import RegistryManagementNonWorkspaceOperations + +__all__ = [ + 'AsyncOperationsOperations', + 'RegistryManagementNonWorkspaceOperations', +] diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/operations/_async_operations_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/operations/_async_operations_operations.py new file mode 100644 index 00000000..03f7e534 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/operations/_async_operations_operations.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for 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 functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._async_operations_operations import build_asyc_operations_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AsyncOperationsOperations: + """AsyncOperationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def asyc_operations( + self, + operation_id: str, + **kwargs: Any + ) -> None: + """asyc_operations. + + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_asyc_operations_request( + operation_id=operation_id, + template_url=self.asyc_operations.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + asyc_operations.metadata = {'url': '/registrymanagement/v1.0/operations/{operationId}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/operations/_registry_management_non_workspace_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/operations/_registry_management_non_workspace_operations.py new file mode 100644 index 00000000..70eaef36 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/aio/operations/_registry_management_non_workspace_operations.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for 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 functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._registry_management_non_workspace_operations import build_registry_management_non_workspace_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RegistryManagementNonWorkspaceOperations: + """RegistryManagementNonWorkspaceOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def registry_management_non_workspace( + self, + registry_name: str, + **kwargs: Any + ) -> "_models.RegistryDiscoveryDto": + """registry_management_non_workspace. + + :param registry_name: + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegistryDiscoveryDto, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.RegistryDiscoveryDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryDiscoveryDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_registry_management_non_workspace_request( + registry_name=registry_name, + template_url=self.registry_management_non_workspace.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegistryDiscoveryDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + registry_management_non_workspace.metadata = {'url': '/registrymanagement/v1.0/registries/{registryName}/discovery'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/models/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/models/__init__.py new file mode 100644 index 00000000..1809507c --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/models/__init__.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import DebugInfoResponse + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorResponse + from ._models_py3 import InnerErrorResponse + from ._models_py3 import RegistryDiscoveryDto + from ._models_py3 import RootError +except (SyntaxError, ImportError): + from ._models import DebugInfoResponse # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import InnerErrorResponse # type: ignore + from ._models import RegistryDiscoveryDto # type: ignore + from ._models import RootError # type: ignore + +__all__ = [ + 'DebugInfoResponse', + 'ErrorAdditionalInfo', + 'ErrorResponse', + 'InnerErrorResponse', + 'RegistryDiscoveryDto', + 'RootError', +] diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/models/_models.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/models/_models.py new file mode 100644 index 00000000..46108039 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/models/_models.py @@ -0,0 +1,336 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for 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 msrest.serialization + + +class DebugInfoResponse(msrest.serialization.Model): + """DebugInfoResponse. + + :ivar type: + :vartype type: str + :ivar message: + :vartype message: str + :ivar stack_trace: + :vartype stack_trace: str + :ivar inner_exception: + :vartype inner_exception: ~azure.mgmt.machinelearningservices.models.DebugInfoResponse + :ivar data: Dictionary of :code:`<any>`. + :vartype data: dict[str, any] + :ivar error_response: + :vartype error_response: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + 'inner_exception': {'key': 'innerException', 'type': 'DebugInfoResponse'}, + 'data': {'key': 'data', 'type': '{object}'}, + 'error_response': {'key': 'errorResponse', 'type': 'ErrorResponse'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: + :paramtype type: str + :keyword message: + :paramtype message: str + :keyword stack_trace: + :paramtype stack_trace: str + :keyword inner_exception: + :paramtype inner_exception: ~azure.mgmt.machinelearningservices.models.DebugInfoResponse + :keyword data: Dictionary of :code:`<any>`. + :paramtype data: dict[str, any] + :keyword error_response: + :paramtype error_response: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + super(DebugInfoResponse, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.message = kwargs.get('message', None) + self.stack_trace = kwargs.get('stack_trace', None) + self.inner_exception = kwargs.get('inner_exception', None) + self.data = kwargs.get('data', None) + self.error_response = kwargs.get('error_response', None) + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """ErrorAdditionalInfo. + + :ivar type: + :vartype type: str + :ivar info: Anything. + :vartype info: any + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: + :paramtype type: str + :keyword info: Anything. + :paramtype info: any + """ + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.info = kwargs.get('info', None) + + +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar error: + :vartype error: ~azure.mgmt.machinelearningservices.models.RootError + :ivar correlation: Dictionary of :code:`<string>`. + :vartype correlation: dict[str, str] + :ivar environment: + :vartype environment: str + :ivar location: + :vartype location: str + :ivar time: + :vartype time: ~datetime.datetime + :ivar component_name: + :vartype component_name: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'error': {'key': 'error', 'type': 'RootError'}, + 'correlation': {'key': 'correlation', 'type': '{str}'}, + 'environment': {'key': 'environment', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'component_name': {'key': 'componentName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword additional_properties: Unmatched properties from the message are deserialized to this + collection. + :paramtype additional_properties: dict[str, any] + :keyword error: + :paramtype error: ~azure.mgmt.machinelearningservices.models.RootError + :keyword correlation: Dictionary of :code:`<string>`. + :paramtype correlation: dict[str, str] + :keyword environment: + :paramtype environment: str + :keyword location: + :paramtype location: str + :keyword time: + :paramtype time: ~datetime.datetime + :keyword component_name: + :paramtype component_name: str + """ + super(ErrorResponse, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.error = kwargs.get('error', None) + self.correlation = kwargs.get('correlation', None) + self.environment = kwargs.get('environment', None) + self.location = kwargs.get('location', None) + self.time = kwargs.get('time', None) + self.component_name = kwargs.get('component_name', None) + + +class InnerErrorResponse(msrest.serialization.Model): + """InnerErrorResponse. + + :ivar code: + :vartype code: str + :ivar inner_error: + :vartype inner_error: ~azure.mgmt.machinelearningservices.models.InnerErrorResponse + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerErrorResponse'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: + :paramtype code: str + :keyword inner_error: + :paramtype inner_error: ~azure.mgmt.machinelearningservices.models.InnerErrorResponse + """ + super(InnerErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.inner_error = kwargs.get('inner_error', None) + + +class RegistryDiscoveryDto(msrest.serialization.Model): + """RegistryDiscoveryDto. + + :ivar registry_name: + :vartype registry_name: str + :ivar tenant_id: + :vartype tenant_id: str + :ivar primary_region: + :vartype primary_region: str + :ivar regions: + :vartype regions: list[str] + :ivar subscription_id: + :vartype subscription_id: str + :ivar resource_group: + :vartype resource_group: str + :ivar workspace_name: + :vartype workspace_name: str + :ivar primary_region_resource_provider_uri: + :vartype primary_region_resource_provider_uri: str + """ + + _attribute_map = { + 'registry_name': {'key': 'registryName', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'primary_region': {'key': 'primaryRegion', 'type': 'str'}, + 'regions': {'key': 'regions', 'type': '[str]'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, + 'primary_region_resource_provider_uri': {'key': 'primaryRegionResourceProviderUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword registry_name: + :paramtype registry_name: str + :keyword tenant_id: + :paramtype tenant_id: str + :keyword primary_region: + :paramtype primary_region: str + :keyword regions: + :paramtype regions: list[str] + :keyword subscription_id: + :paramtype subscription_id: str + :keyword resource_group: + :paramtype resource_group: str + :keyword workspace_name: + :paramtype workspace_name: str + :keyword primary_region_resource_provider_uri: + :paramtype primary_region_resource_provider_uri: str + """ + super(RegistryDiscoveryDto, self).__init__(**kwargs) + self.registry_name = kwargs.get('registry_name', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.primary_region = kwargs.get('primary_region', None) + self.regions = kwargs.get('regions', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.workspace_name = kwargs.get('workspace_name', None) + self.primary_region_resource_provider_uri = kwargs.get('primary_region_resource_provider_uri', None) + + +class RootError(msrest.serialization.Model): + """RootError. + + :ivar code: + :vartype code: str + :ivar severity: + :vartype severity: int + :ivar message: + :vartype message: str + :ivar message_format: + :vartype message_format: str + :ivar message_parameters: Dictionary of :code:`<string>`. + :vartype message_parameters: dict[str, str] + :ivar reference_code: + :vartype reference_code: str + :ivar details_uri: + :vartype details_uri: str + :ivar target: + :vartype target: str + :ivar details: + :vartype details: list[~azure.mgmt.machinelearningservices.models.RootError] + :ivar inner_error: + :vartype inner_error: ~azure.mgmt.machinelearningservices.models.InnerErrorResponse + :ivar debug_info: + :vartype debug_info: ~azure.mgmt.machinelearningservices.models.DebugInfoResponse + :ivar additional_info: + :vartype additional_info: list[~azure.mgmt.machinelearningservices.models.ErrorAdditionalInfo] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'int'}, + 'message': {'key': 'message', 'type': 'str'}, + 'message_format': {'key': 'messageFormat', 'type': 'str'}, + 'message_parameters': {'key': 'messageParameters', 'type': '{str}'}, + 'reference_code': {'key': 'referenceCode', 'type': 'str'}, + 'details_uri': {'key': 'detailsUri', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[RootError]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerErrorResponse'}, + 'debug_info': {'key': 'debugInfo', 'type': 'DebugInfoResponse'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: + :paramtype code: str + :keyword severity: + :paramtype severity: int + :keyword message: + :paramtype message: str + :keyword message_format: + :paramtype message_format: str + :keyword message_parameters: Dictionary of :code:`<string>`. + :paramtype message_parameters: dict[str, str] + :keyword reference_code: + :paramtype reference_code: str + :keyword details_uri: + :paramtype details_uri: str + :keyword target: + :paramtype target: str + :keyword details: + :paramtype details: list[~azure.mgmt.machinelearningservices.models.RootError] + :keyword inner_error: + :paramtype inner_error: ~azure.mgmt.machinelearningservices.models.InnerErrorResponse + :keyword debug_info: + :paramtype debug_info: ~azure.mgmt.machinelearningservices.models.DebugInfoResponse + :keyword additional_info: + :paramtype additional_info: + list[~azure.mgmt.machinelearningservices.models.ErrorAdditionalInfo] + """ + super(RootError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.severity = kwargs.get('severity', None) + self.message = kwargs.get('message', None) + self.message_format = kwargs.get('message_format', None) + self.message_parameters = kwargs.get('message_parameters', None) + self.reference_code = kwargs.get('reference_code', None) + self.details_uri = kwargs.get('details_uri', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + self.inner_error = kwargs.get('inner_error', None) + self.debug_info = kwargs.get('debug_info', None) + self.additional_info = kwargs.get('additional_info', None) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/models/_models_py3.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/models/_models_py3.py new file mode 100644 index 00000000..fa169932 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/models/_models_py3.py @@ -0,0 +1,382 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for 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 datetime +from typing import Any, Dict, List, Optional + +import msrest.serialization + + +class DebugInfoResponse(msrest.serialization.Model): + """DebugInfoResponse. + + :ivar type: + :vartype type: str + :ivar message: + :vartype message: str + :ivar stack_trace: + :vartype stack_trace: str + :ivar inner_exception: + :vartype inner_exception: ~azure.mgmt.machinelearningservices.models.DebugInfoResponse + :ivar data: Dictionary of :code:`<any>`. + :vartype data: dict[str, any] + :ivar error_response: + :vartype error_response: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + 'inner_exception': {'key': 'innerException', 'type': 'DebugInfoResponse'}, + 'data': {'key': 'data', 'type': '{object}'}, + 'error_response': {'key': 'errorResponse', 'type': 'ErrorResponse'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + message: Optional[str] = None, + stack_trace: Optional[str] = None, + inner_exception: Optional["DebugInfoResponse"] = None, + data: Optional[Dict[str, Any]] = None, + error_response: Optional["ErrorResponse"] = None, + **kwargs + ): + """ + :keyword type: + :paramtype type: str + :keyword message: + :paramtype message: str + :keyword stack_trace: + :paramtype stack_trace: str + :keyword inner_exception: + :paramtype inner_exception: ~azure.mgmt.machinelearningservices.models.DebugInfoResponse + :keyword data: Dictionary of :code:`<any>`. + :paramtype data: dict[str, any] + :keyword error_response: + :paramtype error_response: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + super(DebugInfoResponse, self).__init__(**kwargs) + self.type = type + self.message = message + self.stack_trace = stack_trace + self.inner_exception = inner_exception + self.data = data + self.error_response = error_response + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """ErrorAdditionalInfo. + + :ivar type: + :vartype type: str + :ivar info: Anything. + :vartype info: any + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + info: Optional[Any] = None, + **kwargs + ): + """ + :keyword type: + :paramtype type: str + :keyword info: Anything. + :paramtype info: any + """ + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = type + self.info = info + + +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar error: + :vartype error: ~azure.mgmt.machinelearningservices.models.RootError + :ivar correlation: Dictionary of :code:`<string>`. + :vartype correlation: dict[str, str] + :ivar environment: + :vartype environment: str + :ivar location: + :vartype location: str + :ivar time: + :vartype time: ~datetime.datetime + :ivar component_name: + :vartype component_name: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'error': {'key': 'error', 'type': 'RootError'}, + 'correlation': {'key': 'correlation', 'type': '{str}'}, + 'environment': {'key': 'environment', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'component_name': {'key': 'componentName', 'type': 'str'}, + } + + def __init__( + self, + *, + additional_properties: Optional[Dict[str, Any]] = None, + error: Optional["RootError"] = None, + correlation: Optional[Dict[str, str]] = None, + environment: Optional[str] = None, + location: Optional[str] = None, + time: Optional[datetime.datetime] = None, + component_name: Optional[str] = None, + **kwargs + ): + """ + :keyword additional_properties: Unmatched properties from the message are deserialized to this + collection. + :paramtype additional_properties: dict[str, any] + :keyword error: + :paramtype error: ~azure.mgmt.machinelearningservices.models.RootError + :keyword correlation: Dictionary of :code:`<string>`. + :paramtype correlation: dict[str, str] + :keyword environment: + :paramtype environment: str + :keyword location: + :paramtype location: str + :keyword time: + :paramtype time: ~datetime.datetime + :keyword component_name: + :paramtype component_name: str + """ + super(ErrorResponse, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.error = error + self.correlation = correlation + self.environment = environment + self.location = location + self.time = time + self.component_name = component_name + + +class InnerErrorResponse(msrest.serialization.Model): + """InnerErrorResponse. + + :ivar code: + :vartype code: str + :ivar inner_error: + :vartype inner_error: ~azure.mgmt.machinelearningservices.models.InnerErrorResponse + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerErrorResponse'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + inner_error: Optional["InnerErrorResponse"] = None, + **kwargs + ): + """ + :keyword code: + :paramtype code: str + :keyword inner_error: + :paramtype inner_error: ~azure.mgmt.machinelearningservices.models.InnerErrorResponse + """ + super(InnerErrorResponse, self).__init__(**kwargs) + self.code = code + self.inner_error = inner_error + + +class RegistryDiscoveryDto(msrest.serialization.Model): + """RegistryDiscoveryDto. + + :ivar registry_name: + :vartype registry_name: str + :ivar tenant_id: + :vartype tenant_id: str + :ivar primary_region: + :vartype primary_region: str + :ivar regions: + :vartype regions: list[str] + :ivar subscription_id: + :vartype subscription_id: str + :ivar resource_group: + :vartype resource_group: str + :ivar workspace_name: + :vartype workspace_name: str + :ivar primary_region_resource_provider_uri: + :vartype primary_region_resource_provider_uri: str + """ + + _attribute_map = { + 'registry_name': {'key': 'registryName', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'primary_region': {'key': 'primaryRegion', 'type': 'str'}, + 'regions': {'key': 'regions', 'type': '[str]'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, + 'primary_region_resource_provider_uri': {'key': 'primaryRegionResourceProviderUri', 'type': 'str'}, + } + + def __init__( + self, + *, + registry_name: Optional[str] = None, + tenant_id: Optional[str] = None, + primary_region: Optional[str] = None, + regions: Optional[List[str]] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + workspace_name: Optional[str] = None, + primary_region_resource_provider_uri: Optional[str] = None, + **kwargs + ): + """ + :keyword registry_name: + :paramtype registry_name: str + :keyword tenant_id: + :paramtype tenant_id: str + :keyword primary_region: + :paramtype primary_region: str + :keyword regions: + :paramtype regions: list[str] + :keyword subscription_id: + :paramtype subscription_id: str + :keyword resource_group: + :paramtype resource_group: str + :keyword workspace_name: + :paramtype workspace_name: str + :keyword primary_region_resource_provider_uri: + :paramtype primary_region_resource_provider_uri: str + """ + super(RegistryDiscoveryDto, self).__init__(**kwargs) + self.registry_name = registry_name + self.tenant_id = tenant_id + self.primary_region = primary_region + self.regions = regions + self.subscription_id = subscription_id + self.resource_group = resource_group + self.workspace_name = workspace_name + self.primary_region_resource_provider_uri = primary_region_resource_provider_uri + + +class RootError(msrest.serialization.Model): + """RootError. + + :ivar code: + :vartype code: str + :ivar severity: + :vartype severity: int + :ivar message: + :vartype message: str + :ivar message_format: + :vartype message_format: str + :ivar message_parameters: Dictionary of :code:`<string>`. + :vartype message_parameters: dict[str, str] + :ivar reference_code: + :vartype reference_code: str + :ivar details_uri: + :vartype details_uri: str + :ivar target: + :vartype target: str + :ivar details: + :vartype details: list[~azure.mgmt.machinelearningservices.models.RootError] + :ivar inner_error: + :vartype inner_error: ~azure.mgmt.machinelearningservices.models.InnerErrorResponse + :ivar debug_info: + :vartype debug_info: ~azure.mgmt.machinelearningservices.models.DebugInfoResponse + :ivar additional_info: + :vartype additional_info: list[~azure.mgmt.machinelearningservices.models.ErrorAdditionalInfo] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'int'}, + 'message': {'key': 'message', 'type': 'str'}, + 'message_format': {'key': 'messageFormat', 'type': 'str'}, + 'message_parameters': {'key': 'messageParameters', 'type': '{str}'}, + 'reference_code': {'key': 'referenceCode', 'type': 'str'}, + 'details_uri': {'key': 'detailsUri', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[RootError]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerErrorResponse'}, + 'debug_info': {'key': 'debugInfo', 'type': 'DebugInfoResponse'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + severity: Optional[int] = None, + message: Optional[str] = None, + message_format: Optional[str] = None, + message_parameters: Optional[Dict[str, str]] = None, + reference_code: Optional[str] = None, + details_uri: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["RootError"]] = None, + inner_error: Optional["InnerErrorResponse"] = None, + debug_info: Optional["DebugInfoResponse"] = None, + additional_info: Optional[List["ErrorAdditionalInfo"]] = None, + **kwargs + ): + """ + :keyword code: + :paramtype code: str + :keyword severity: + :paramtype severity: int + :keyword message: + :paramtype message: str + :keyword message_format: + :paramtype message_format: str + :keyword message_parameters: Dictionary of :code:`<string>`. + :paramtype message_parameters: dict[str, str] + :keyword reference_code: + :paramtype reference_code: str + :keyword details_uri: + :paramtype details_uri: str + :keyword target: + :paramtype target: str + :keyword details: + :paramtype details: list[~azure.mgmt.machinelearningservices.models.RootError] + :keyword inner_error: + :paramtype inner_error: ~azure.mgmt.machinelearningservices.models.InnerErrorResponse + :keyword debug_info: + :paramtype debug_info: ~azure.mgmt.machinelearningservices.models.DebugInfoResponse + :keyword additional_info: + :paramtype additional_info: + list[~azure.mgmt.machinelearningservices.models.ErrorAdditionalInfo] + """ + super(RootError, self).__init__(**kwargs) + self.code = code + self.severity = severity + self.message = message + self.message_format = message_format + self.message_parameters = message_parameters + self.reference_code = reference_code + self.details_uri = details_uri + self.target = target + self.details = details + self.inner_error = inner_error + self.debug_info = debug_info + self.additional_info = additional_info diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/operations/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/operations/__init__.py new file mode 100644 index 00000000..f9352a59 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/operations/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._async_operations_operations import AsyncOperationsOperations +from ._registry_management_non_workspace_operations import RegistryManagementNonWorkspaceOperations + +__all__ = [ + 'AsyncOperationsOperations', + 'RegistryManagementNonWorkspaceOperations', +] diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/operations/_async_operations_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/operations/_async_operations_operations.py new file mode 100644 index 00000000..06dbaffa --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/operations/_async_operations_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for 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 functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_asyc_operations_request( + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + # Construct URL + url = kwargs.pop("template_url", '/registrymanagement/v1.0/operations/{operationId}') + path_format_arguments = { + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + return HttpRequest( + method="GET", + url=url, + **kwargs + ) + +# fmt: on +class AsyncOperationsOperations(object): + """AsyncOperationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def asyc_operations( + self, + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """asyc_operations. + + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_asyc_operations_request( + operation_id=operation_id, + template_url=self.asyc_operations.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + asyc_operations.metadata = {'url': '/registrymanagement/v1.0/operations/{operationId}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/operations/_registry_management_non_workspace_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/operations/_registry_management_non_workspace_operations.py new file mode 100644 index 00000000..cca66593 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/operations/_registry_management_non_workspace_operations.py @@ -0,0 +1,126 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for 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 functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_registry_management_non_workspace_request( + registry_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/registrymanagement/v1.0/registries/{registryName}/discovery') + path_format_arguments = { + "registryName": _SERIALIZER.url("registry_name", registry_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class RegistryManagementNonWorkspaceOperations(object): + """RegistryManagementNonWorkspaceOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def registry_management_non_workspace( + self, + registry_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RegistryDiscoveryDto" + """registry_management_non_workspace. + + :param registry_name: + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegistryDiscoveryDto, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.RegistryDiscoveryDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryDiscoveryDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_registry_management_non_workspace_request( + registry_name=registry_name, + template_url=self.registry_management_non_workspace.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegistryDiscoveryDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + registry_management_non_workspace.metadata = {'url': '/registrymanagement/v1.0/registries/{registryName}/discovery'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/py.typed b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/py.typed new file mode 100644 index 00000000..e5aff4f8 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/registry_discovery/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561.
\ No newline at end of file |