diff options
Diffstat (limited to '.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane')
25 files changed, 9251 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/__init__.py new file mode 100644 index 00000000..da466144 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/__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/model_dataplane/_azure_machine_learning_workspaces.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/_azure_machine_learning_workspaces.py new file mode 100644 index 00000000..2c55118d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/_azure_machine_learning_workspaces.py @@ -0,0 +1,102 @@ +# 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 AssetsOperations, ExtensiveModelOperations, MigrationOperations, ModelsOperations + +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 assets: AssetsOperations operations + :vartype assets: azure.mgmt.machinelearningservices.operations.AssetsOperations + :ivar extensive_model: ExtensiveModelOperations operations + :vartype extensive_model: + azure.mgmt.machinelearningservices.operations.ExtensiveModelOperations + :ivar migration: MigrationOperations operations + :vartype migration: azure.mgmt.machinelearningservices.operations.MigrationOperations + :ivar models: ModelsOperations operations + :vartype models: azure.mgmt.machinelearningservices.operations.ModelsOperations + :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.assets = AssetsOperations(self._client, self._config, self._serialize, self._deserialize) + self.extensive_model = ExtensiveModelOperations(self._client, self._config, self._serialize, self._deserialize) + self.migration = MigrationOperations(self._client, self._config, self._serialize, self._deserialize) + self.models = ModelsOperations(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/model_dataplane/_configuration.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/_configuration.py new file mode 100644 index 00000000..2ec7eb9e --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/_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/model_dataplane/_patch.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/_patch.py new file mode 100644 index 00000000..74e48ecd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/_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/model_dataplane/_vendor.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/_vendor.py new file mode 100644 index 00000000..138f663c --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/_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/model_dataplane/_version.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/_version.py new file mode 100644 index 00000000..eae7c95b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/_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/model_dataplane/aio/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/__init__.py new file mode 100644 index 00000000..f67ccda9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/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/model_dataplane/aio/_azure_machine_learning_workspaces.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/_azure_machine_learning_workspaces.py new file mode 100644 index 00000000..96732b90 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/_azure_machine_learning_workspaces.py @@ -0,0 +1,95 @@ +# 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 AssetsOperations, ExtensiveModelOperations, MigrationOperations, ModelsOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class AzureMachineLearningWorkspaces: + """AzureMachineLearningWorkspaces. + + :ivar assets: AssetsOperations operations + :vartype assets: azure.mgmt.machinelearningservices.aio.operations.AssetsOperations + :ivar extensive_model: ExtensiveModelOperations operations + :vartype extensive_model: + azure.mgmt.machinelearningservices.aio.operations.ExtensiveModelOperations + :ivar migration: MigrationOperations operations + :vartype migration: azure.mgmt.machinelearningservices.aio.operations.MigrationOperations + :ivar models: ModelsOperations operations + :vartype models: azure.mgmt.machinelearningservices.aio.operations.ModelsOperations + :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.assets = AssetsOperations(self._client, self._config, self._serialize, self._deserialize) + self.extensive_model = ExtensiveModelOperations(self._client, self._config, self._serialize, self._deserialize) + self.migration = MigrationOperations(self._client, self._config, self._serialize, self._deserialize) + self.models = ModelsOperations(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/model_dataplane/aio/_configuration.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/_configuration.py new file mode 100644 index 00000000..26def54e --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/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/model_dataplane/aio/_patch.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/_patch.py new file mode 100644 index 00000000..74e48ecd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/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/model_dataplane/aio/operations/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/__init__.py new file mode 100644 index 00000000..261577d5 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/__init__.py @@ -0,0 +1,19 @@ +# 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 ._assets_operations import AssetsOperations +from ._extensive_model_operations import ExtensiveModelOperations +from ._migration_operations import MigrationOperations +from ._models_operations import ModelsOperations + +__all__ = [ + 'AssetsOperations', + 'ExtensiveModelOperations', + 'MigrationOperations', + 'ModelsOperations', +] diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_assets_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_assets_operations.py new file mode 100644 index 00000000..20f7a4cb --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_assets_operations.py @@ -0,0 +1,403 @@ +# 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, List, Optional, TypeVar, Union +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._assets_operations import build_create_request, build_delete_request, build_list_request, build_patch_request, build_query_by_id_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AssetsOperations: + """AssetsOperations 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 create( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + body: Optional["_models.Asset"] = None, + **kwargs: Any + ) -> "_models.Asset": + """create. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.Asset + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Asset, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Asset + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Asset"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + if body is not None: + _json = self._serialize.body(body, 'Asset') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + if body is not None: + _json = self._serialize.body(body, 'Asset') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_create_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create.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('Asset', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets'} # type: ignore + + + @distributed_trace_async + async def list( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + run_id: Optional[str] = None, + project_id: Optional[str] = None, + name: Optional[str] = None, + tag: Optional[str] = None, + count: Optional[int] = None, + skip_token: Optional[str] = None, + tags: Optional[str] = None, + properties: Optional[str] = None, + type: Optional[str] = None, + orderby: Optional[Union[str, "_models.OrderString"]] = None, + **kwargs: Any + ) -> "_models.AssetPaginatedResult": + """list. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param run_id: + :type run_id: str + :param project_id: + :type project_id: str + :param name: + :type name: str + :param tag: + :type tag: str + :param count: + :type count: int + :param skip_token: + :type skip_token: str + :param tags: + :type tags: str + :param properties: + :type properties: str + :param type: + :type type: str + :param orderby: + :type orderby: str or ~azure.mgmt.machinelearningservices.models.OrderString + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AssetPaginatedResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.AssetPaginatedResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AssetPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + run_id=run_id, + project_id=project_id, + name=name, + tag=tag, + count=count, + skip_token=skip_token, + tags=tags, + properties=properties, + type=type, + orderby=orderby, + template_url=self.list.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('AssetPaginatedResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets'} # type: ignore + + + @distributed_trace_async + async def patch( + self, + id: str, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + body: List["_models.Operation"], + **kwargs: Any + ) -> "_models.Asset": + """patch. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: list[~azure.mgmt.machinelearningservices.models.Operation] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Asset, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Asset + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Asset"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + _json = self._serialize.body(body, '[Operation]') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + _json = self._serialize.body(body, '[Operation]') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_patch_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.patch.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('Asset', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + patch.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets/{id}'} # type: ignore + + + @distributed_trace_async + async def delete( + self, + id: str, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> None: + """delete. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: 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_delete_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.delete.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, 204]: + 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, {}) + + delete.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets/{id}'} # type: ignore + + + @distributed_trace_async + async def query_by_id( + self, + id: str, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.Asset": + """query_by_id. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Asset, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Asset + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Asset"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_query_by_id_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.query_by_id.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('Asset', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + query_by_id.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets/{id}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_extensive_model_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_extensive_model_operations.py new file mode 100644 index 00000000..6f821f49 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_extensive_model_operations.py @@ -0,0 +1,103 @@ +# 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._extensive_model_operations import build_query_by_id_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExtensiveModelOperations: + """ExtensiveModelOperations 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 query_by_id( + self, + id: str, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.ExtensiveModel": + """query_by_id. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExtensiveModel, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ExtensiveModel + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExtensiveModel"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_query_by_id_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.query_by_id.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('ExtensiveModel', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + query_by_id.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/extensiveModels/{id}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_migration_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_migration_operations.py new file mode 100644 index 00000000..b6c4b7e4 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_migration_operations.py @@ -0,0 +1,99 @@ +# 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._migration_operations import build_start_migration_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MigrationOperations: + """MigrationOperations 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 start_migration( + self, + migration: Optional[str] = None, + timeout: Optional[str] = "00:01:00", + collection_id: Optional[str] = None, + workspace_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """start_migration. + + :param migration: + :type migration: str + :param timeout: + :type timeout: str + :param collection_id: + :type collection_id: str + :param workspace_id: + :type workspace_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_start_migration_request( + migration=migration, + timeout=timeout, + collection_id=collection_id, + workspace_id=workspace_id, + template_url=self.start_migration.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, {}) + + start_migration.metadata = {'url': '/modelregistry/v1.0/meta/migration'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_models_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_models_operations.py new file mode 100644 index 00000000..f666dcec --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/aio/operations/_models_operations.py @@ -0,0 +1,875 @@ +# 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, List, Optional, TypeVar, Union +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._models_operations import build_batch_get_resolved_uris_request, build_batch_query_request, build_create_unregistered_input_model_request, build_create_unregistered_output_model_request, build_delete_request, build_deployment_settings_request, build_list_query_post_request, build_list_request, build_patch_request, build_query_by_id_request, build_register_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ModelsOperations: + """ModelsOperations 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 register( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + body: "_models.Model", + auto_version: Optional[bool] = True, + **kwargs: Any + ) -> "_models.Model": + """register. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.Model + :param auto_version: + :type auto_version: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Model, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Model + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Model"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + _json = self._serialize.body(body, 'Model') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + _json = self._serialize.body(body, 'Model') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_register_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + auto_version=auto_version, + template_url=self.register.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('Model', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + register.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models'} # type: ignore + + + @distributed_trace_async + async def list( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + name: Optional[str] = None, + tag: Optional[str] = None, + version: Optional[str] = None, + framework: Optional[str] = None, + description: Optional[str] = None, + count: Optional[int] = None, + offset: Optional[int] = None, + skip_token: Optional[str] = None, + tags: Optional[str] = None, + properties: Optional[str] = None, + run_id: Optional[str] = None, + dataset_id: Optional[str] = None, + order_by: Optional[str] = None, + latest_version_only: Optional[bool] = False, + feed: Optional[str] = None, + list_view_type: Optional[Union[str, "_models.ListViewType"]] = None, + **kwargs: Any + ) -> "_models.ModelPagedResponse": + """list. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param name: + :type name: str + :param tag: + :type tag: str + :param version: + :type version: str + :param framework: + :type framework: str + :param description: + :type description: str + :param count: + :type count: int + :param offset: + :type offset: int + :param skip_token: + :type skip_token: str + :param tags: + :type tags: str + :param properties: + :type properties: str + :param run_id: + :type run_id: str + :param dataset_id: + :type dataset_id: str + :param order_by: + :type order_by: str + :param latest_version_only: + :type latest_version_only: bool + :param feed: + :type feed: str + :param list_view_type: + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelPagedResponse, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelPagedResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelPagedResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + tag=tag, + version=version, + framework=framework, + description=description, + count=count, + offset=offset, + skip_token=skip_token, + tags=tags, + properties=properties, + run_id=run_id, + dataset_id=dataset_id, + order_by=order_by, + latest_version_only=latest_version_only, + feed=feed, + list_view_type=list_view_type, + template_url=self.list.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('ModelPagedResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models'} # type: ignore + + + @distributed_trace_async + async def create_unregistered_input_model( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + body: "_models.CreateUnregisteredInputModelDto", + **kwargs: Any + ) -> "_models.Model": + """create_unregistered_input_model. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.CreateUnregisteredInputModelDto + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Model, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Model + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Model"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + _json = self._serialize.body(body, 'CreateUnregisteredInputModelDto') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + _json = self._serialize.body(body, 'CreateUnregisteredInputModelDto') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_create_unregistered_input_model_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_unregistered_input_model.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('Model', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_unregistered_input_model.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/createUnregisteredInput'} # type: ignore + + + @distributed_trace_async + async def create_unregistered_output_model( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + body: "_models.CreateUnregisteredOutputModelDto", + **kwargs: Any + ) -> "_models.Model": + """create_unregistered_output_model. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.CreateUnregisteredOutputModelDto + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Model, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Model + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Model"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + _json = self._serialize.body(body, 'CreateUnregisteredOutputModelDto') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + _json = self._serialize.body(body, 'CreateUnregisteredOutputModelDto') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_create_unregistered_output_model_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_unregistered_output_model.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('Model', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_unregistered_output_model.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/createUnregisteredOutput'} # type: ignore + + + @distributed_trace_async + async def batch_get_resolved_uris( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + body: Optional["_models.BatchGetResolvedUrisDto"] = None, + **kwargs: Any + ) -> "_models.BatchModelPathResponseDto": + """batch_get_resolved_uris. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.BatchGetResolvedUrisDto + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BatchModelPathResponseDto, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.BatchModelPathResponseDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchModelPathResponseDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + if body is not None: + _json = self._serialize.body(body, 'BatchGetResolvedUrisDto') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + if body is not None: + _json = self._serialize.body(body, 'BatchGetResolvedUrisDto') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_batch_get_resolved_uris_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.batch_get_resolved_uris.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('BatchModelPathResponseDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + batch_get_resolved_uris.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/batchGetResolvedUris'} # type: ignore + + + @distributed_trace_async + async def query_by_id( + self, + id: str, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + include_deployment_settings: Optional[bool] = False, + **kwargs: Any + ) -> "_models.Model": + """query_by_id. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param include_deployment_settings: + :type include_deployment_settings: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Model, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Model + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Model"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_query_by_id_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + include_deployment_settings=include_deployment_settings, + template_url=self.query_by_id.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('Model', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + query_by_id.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{id}'} # type: ignore + + + @distributed_trace_async + async def delete( + self, + id: str, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> None: + """delete. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: 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_delete_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.delete.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, 204]: + 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, {}) + + delete.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{id}'} # type: ignore + + + @distributed_trace_async + async def patch( + self, + id: str, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + body: List["_models.Operation"], + **kwargs: Any + ) -> "_models.Model": + """patch. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: list[~azure.mgmt.machinelearningservices.models.Operation] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Model, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Model + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Model"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + _json = self._serialize.body(body, '[Operation]') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + _json = self._serialize.body(body, '[Operation]') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_patch_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.patch.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('Model', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + patch.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{id}'} # type: ignore + + + @distributed_trace_async + async def list_query_post( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + body: Optional["_models.ListModelsRequest"] = None, + **kwargs: Any + ) -> "_models.ModelListModelsRequestPagedResponse": + """list_query_post. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.ListModelsRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelListModelsRequestPagedResponse, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelListModelsRequestPagedResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelListModelsRequestPagedResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + if body is not None: + _json = self._serialize.body(body, 'ListModelsRequest') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + if body is not None: + _json = self._serialize.body(body, 'ListModelsRequest') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_list_query_post_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.list_query_post.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('ModelListModelsRequestPagedResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_query_post.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/list'} # type: ignore + + + @distributed_trace_async + async def batch_query( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + body: Optional["_models.ModelBatchDto"] = None, + **kwargs: Any + ) -> "_models.ModelBatchResponseDto": + """batch_query. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.ModelBatchDto + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelBatchResponseDto, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelBatchResponseDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelBatchResponseDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + if body is not None: + _json = self._serialize.body(body, 'ModelBatchDto') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + if body is not None: + _json = self._serialize.body(body, 'ModelBatchDto') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_batch_query_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.batch_query.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('ModelBatchResponseDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + batch_query.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/querybatch'} # type: ignore + + + @distributed_trace_async + async def deployment_settings( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + body: Optional["_models.ModelSettingsIdentifiers"] = None, + **kwargs: Any + ) -> None: + """deployment_settings. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.ModelSettingsIdentifiers + :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', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + if body is not None: + _json = self._serialize.body(body, 'ModelSettingsIdentifiers') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + if body is not None: + _json = self._serialize.body(body, 'ModelSettingsIdentifiers') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_deployment_settings_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.deployment_settings.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, {}) + + deployment_settings.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/deploymentSettings'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/__init__.py new file mode 100644 index 00000000..c54172db --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/__init__.py @@ -0,0 +1,179 @@ +# 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 Artifact + from ._models_py3 import Asset + from ._models_py3 import AssetDto + from ._models_py3 import AssetPaginatedResult + from ._models_py3 import BatchGetResolvedUrisDto + from ._models_py3 import BatchModelPathResponseDto + from ._models_py3 import BlobReference + from ._models_py3 import BlobReferenceForConsumptionDto + from ._models_py3 import ContainerResourceRequirements + from ._models_py3 import CreateUnregisteredInputModelDto + from ._models_py3 import CreateUnregisteredOutputModelDto + from ._models_py3 import CreatedBy + from ._models_py3 import CreationContext + from ._models_py3 import DataItem + from ._models_py3 import DataReferenceCredentialDto + from ._models_py3 import DataReferences + from ._models_py3 import DataReferencesForConsumptionDto + from ._models_py3 import DatasetReference + from ._models_py3 import DependencyMapDto + from ._models_py3 import DependencyMapItemDto + from ._models_py3 import DependentAsset + from ._models_py3 import DependentEntitiesDto + from ._models_py3 import ErrorResponse + from ._models_py3 import ExtensiveModel + from ._models_py3 import FeedIndexEntityDto + from ._models_py3 import FeedIndexEntityRequestDto + from ._models_py3 import ImageReference + from ._models_py3 import ImageReferenceForConsumptionDto + from ._models_py3 import IndexAnnotations + from ._models_py3 import IndexEntity + from ._models_py3 import IndexProperties + from ._models_py3 import InnerErrorDetails + from ._models_py3 import IntellectualPropertyPublisherInformation + from ._models_py3 import ListModelsRequest + from ._models_py3 import Model + from ._models_py3 import ModelBatchDto + from ._models_py3 import ModelBatchResponseDto + from ._models_py3 import ModelContainerRequest + from ._models_py3 import ModelDeploymentSettings + from ._models_py3 import ModelListModelsRequestPagedResponse + from ._models_py3 import ModelPagedResponse + from ._models_py3 import ModelPathResponseDto + from ._models_py3 import ModelSchema + from ._models_py3 import ModelSettingsIdentifiers + from ._models_py3 import Operation + from ._models_py3 import ProviderFeedEntityRequestDto + from ._models_py3 import Relationship + from ._models_py3 import ServiceResponseBase + from ._models_py3 import User +except (SyntaxError, ImportError): + from ._models import Artifact # type: ignore + from ._models import Asset # type: ignore + from ._models import AssetDto # type: ignore + from ._models import AssetPaginatedResult # type: ignore + from ._models import BatchGetResolvedUrisDto # type: ignore + from ._models import BatchModelPathResponseDto # type: ignore + from ._models import BlobReference # type: ignore + from ._models import BlobReferenceForConsumptionDto # type: ignore + from ._models import ContainerResourceRequirements # type: ignore + from ._models import CreateUnregisteredInputModelDto # type: ignore + from ._models import CreateUnregisteredOutputModelDto # type: ignore + from ._models import CreatedBy # type: ignore + from ._models import CreationContext # type: ignore + from ._models import DataItem # type: ignore + from ._models import DataReferenceCredentialDto # type: ignore + from ._models import DataReferences # type: ignore + from ._models import DataReferencesForConsumptionDto # type: ignore + from ._models import DatasetReference # type: ignore + from ._models import DependencyMapDto # type: ignore + from ._models import DependencyMapItemDto # type: ignore + from ._models import DependentAsset # type: ignore + from ._models import DependentEntitiesDto # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import ExtensiveModel # type: ignore + from ._models import FeedIndexEntityDto # type: ignore + from ._models import FeedIndexEntityRequestDto # type: ignore + from ._models import ImageReference # type: ignore + from ._models import ImageReferenceForConsumptionDto # type: ignore + from ._models import IndexAnnotations # type: ignore + from ._models import IndexEntity # type: ignore + from ._models import IndexProperties # type: ignore + from ._models import InnerErrorDetails # type: ignore + from ._models import IntellectualPropertyPublisherInformation # type: ignore + from ._models import ListModelsRequest # type: ignore + from ._models import Model # type: ignore + from ._models import ModelBatchDto # type: ignore + from ._models import ModelBatchResponseDto # type: ignore + from ._models import ModelContainerRequest # type: ignore + from ._models import ModelDeploymentSettings # type: ignore + from ._models import ModelListModelsRequestPagedResponse # type: ignore + from ._models import ModelPagedResponse # type: ignore + from ._models import ModelPathResponseDto # type: ignore + from ._models import ModelSchema # type: ignore + from ._models import ModelSettingsIdentifiers # type: ignore + from ._models import Operation # type: ignore + from ._models import ProviderFeedEntityRequestDto # type: ignore + from ._models import Relationship # type: ignore + from ._models import ServiceResponseBase # type: ignore + from ._models import User # type: ignore + +from ._azure_machine_learning_workspaces_enums import ( + ComputeEnvironmentType, + DeploymentType, + EntityKind, + ListViewType, + ModelFormatEnum, + ModelSchemaDataType, + OrderString, + WebServiceState, +) + +__all__ = [ + 'Artifact', + 'Asset', + 'AssetDto', + 'AssetPaginatedResult', + 'BatchGetResolvedUrisDto', + 'BatchModelPathResponseDto', + 'BlobReference', + 'BlobReferenceForConsumptionDto', + 'ContainerResourceRequirements', + 'CreateUnregisteredInputModelDto', + 'CreateUnregisteredOutputModelDto', + 'CreatedBy', + 'CreationContext', + 'DataItem', + 'DataReferenceCredentialDto', + 'DataReferences', + 'DataReferencesForConsumptionDto', + 'DatasetReference', + 'DependencyMapDto', + 'DependencyMapItemDto', + 'DependentAsset', + 'DependentEntitiesDto', + 'ErrorResponse', + 'ExtensiveModel', + 'FeedIndexEntityDto', + 'FeedIndexEntityRequestDto', + 'ImageReference', + 'ImageReferenceForConsumptionDto', + 'IndexAnnotations', + 'IndexEntity', + 'IndexProperties', + 'InnerErrorDetails', + 'IntellectualPropertyPublisherInformation', + 'ListModelsRequest', + 'Model', + 'ModelBatchDto', + 'ModelBatchResponseDto', + 'ModelContainerRequest', + 'ModelDeploymentSettings', + 'ModelListModelsRequestPagedResponse', + 'ModelPagedResponse', + 'ModelPathResponseDto', + 'ModelSchema', + 'ModelSettingsIdentifiers', + 'Operation', + 'ProviderFeedEntityRequestDto', + 'Relationship', + 'ServiceResponseBase', + 'User', + 'ComputeEnvironmentType', + 'DeploymentType', + 'EntityKind', + 'ListViewType', + 'ModelFormatEnum', + 'ModelSchemaDataType', + 'OrderString', + 'WebServiceState', +] diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/_azure_machine_learning_workspaces_enums.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/_azure_machine_learning_workspaces_enums.py new file mode 100644 index 00000000..f8290bfb --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/_azure_machine_learning_workspaces_enums.py @@ -0,0 +1,89 @@ +# 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 enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class ComputeEnvironmentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + ACS = "ACS" + FPGA = "FPGA" + ACI = "ACI" + AKS = "AKS" + AMLCOMPUTE = "AMLCOMPUTE" + IOT = "IOT" + MIR = "MIR" + AKSENDPOINT = "AKSENDPOINT" + MIRSINGLEMODEL = "MIRSINGLEMODEL" + MIRAMLCOMPUTE = "MIRAMLCOMPUTE" + MIRGA = "MIRGA" + AMLARC = "AMLARC" + BATCHAMLCOMPUTE = "BATCHAMLCOMPUTE" + UNKNOWN = "UNKNOWN" + +class DeploymentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + GRPC_REALTIME_ENDPOINT = "GRPCRealtimeEndpoint" + HTTP_REALTIME_ENDPOINT = "HttpRealtimeEndpoint" + BATCH = "Batch" + +class EntityKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + INVALID = "Invalid" + LINEAGE_ROOT = "LineageRoot" + VERSIONED = "Versioned" + UNVERSIONED = "Unversioned" + +class ListViewType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + ACTIVE_ONLY = "ActiveOnly" + ARCHIVED_ONLY = "ArchivedOnly" + ALL = "All" + +class ModelFormatEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + CUSTOM = "CUSTOM" + MLFLOW = "MLFLOW" + TRITON = "TRITON" + PRESETS = "PRESETS" + +class ModelSchemaDataType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + UNDEFINED = "undefined" + BOOL = "bool" + UINT8 = "uint8" + UINT16 = "uint16" + UINT32 = "uint32" + UINT64 = "uint64" + INT8 = "int8" + INT16 = "int16" + INT32 = "int32" + INT64 = "int64" + FLOAT16 = "float16" + FLOAT32 = "float32" + FLOAT64 = "float64" + BFLOAT16 = "bfloat16" + COMPLEX64 = "complex64" + COMPLEX128 = "complex128" + STRING = "string" + +class OrderString(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + CREATED_AT_DESC = "CreatedAtDesc" + CREATED_AT_ASC = "CreatedAtAsc" + UPDATED_AT_DESC = "UpdatedAtDesc" + UPDATED_AT_ASC = "UpdatedAtAsc" + +class WebServiceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + TRANSITIONING = "Transitioning" + HEALTHY = "Healthy" + UNHEALTHY = "Unhealthy" + FAILED = "Failed" + UNSCHEDULABLE = "Unschedulable" diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/_models.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/_models.py new file mode 100644 index 00000000..fc90156b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/_models.py @@ -0,0 +1,2263 @@ +# 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 Artifact(msrest.serialization.Model): + """Artifact. + + :ivar id: + :vartype id: str + :ivar prefix: + :vartype prefix: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'prefix': {'key': 'prefix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: + :paramtype id: str + :keyword prefix: + :paramtype prefix: str + """ + super(Artifact, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.prefix = kwargs.get('prefix', None) + + +class Asset(msrest.serialization.Model): + """Asset. + + All required parameters must be populated in order to send to Azure. + + :ivar id: + :vartype id: str + :ivar name: Required. + :vartype name: str + :ivar type: + :vartype type: str + :ivar description: + :vartype description: str + :ivar artifacts: + :vartype artifacts: list[~azure.mgmt.machinelearningservices.models.Artifact] + :ivar kv_tags: Dictionary of :code:`<string>`. + :vartype kv_tags: dict[str, str] + :ivar properties: Dictionary of :code:`<string>`. + :vartype properties: dict[str, str] + :ivar runid: + :vartype runid: str + :ivar projectid: + :vartype projectid: str + :ivar meta: Dictionary of :code:`<string>`. + :vartype meta: dict[str, str] + :ivar created_time: + :vartype created_time: ~datetime.datetime + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'artifacts': {'key': 'artifacts', 'type': '[Artifact]'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'runid': {'key': 'runid', 'type': 'str'}, + 'projectid': {'key': 'projectid', 'type': 'str'}, + 'meta': {'key': 'meta', 'type': '{str}'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: + :paramtype id: str + :keyword name: Required. + :paramtype name: str + :keyword type: + :paramtype type: str + :keyword description: + :paramtype description: str + :keyword artifacts: + :paramtype artifacts: list[~azure.mgmt.machinelearningservices.models.Artifact] + :keyword kv_tags: Dictionary of :code:`<string>`. + :paramtype kv_tags: dict[str, str] + :keyword properties: Dictionary of :code:`<string>`. + :paramtype properties: dict[str, str] + :keyword runid: + :paramtype runid: str + :keyword projectid: + :paramtype projectid: str + :keyword meta: Dictionary of :code:`<string>`. + :paramtype meta: dict[str, str] + :keyword created_time: + :paramtype created_time: ~datetime.datetime + """ + super(Asset, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs['name'] + self.type = kwargs.get('type', None) + self.description = kwargs.get('description', None) + self.artifacts = kwargs.get('artifacts', None) + self.kv_tags = kwargs.get('kv_tags', None) + self.properties = kwargs.get('properties', None) + self.runid = kwargs.get('runid', None) + self.projectid = kwargs.get('projectid', None) + self.meta = kwargs.get('meta', None) + self.created_time = kwargs.get('created_time', None) + + +class AssetDto(msrest.serialization.Model): + """AssetDto. + + :ivar asset_id: + :vartype asset_id: str + :ivar entity_id: + :vartype entity_id: str + :ivar data_items: Dictionary of :code:`<DataItem>`. + :vartype data_items: dict[str, ~azure.mgmt.machinelearningservices.models.DataItem] + :ivar data_references: + :vartype data_references: ~azure.mgmt.machinelearningservices.models.DataReferences + :ivar should_index: + :vartype should_index: bool + :ivar dependencies: + :vartype dependencies: list[~azure.mgmt.machinelearningservices.models.DependentAsset] + :ivar intellectual_property_publisher_information: + :vartype intellectual_property_publisher_information: + ~azure.mgmt.machinelearningservices.models.IntellectualPropertyPublisherInformation + """ + + _attribute_map = { + 'asset_id': {'key': 'assetId', 'type': 'str'}, + 'entity_id': {'key': 'entityId', 'type': 'str'}, + 'data_items': {'key': 'dataItems', 'type': '{DataItem}'}, + 'data_references': {'key': 'dataReferences', 'type': 'DataReferences'}, + 'should_index': {'key': 'shouldIndex', 'type': 'bool'}, + 'dependencies': {'key': 'dependencies', 'type': '[DependentAsset]'}, + 'intellectual_property_publisher_information': {'key': 'intellectualPropertyPublisherInformation', 'type': 'IntellectualPropertyPublisherInformation'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword asset_id: + :paramtype asset_id: str + :keyword entity_id: + :paramtype entity_id: str + :keyword data_items: Dictionary of :code:`<DataItem>`. + :paramtype data_items: dict[str, ~azure.mgmt.machinelearningservices.models.DataItem] + :keyword data_references: + :paramtype data_references: ~azure.mgmt.machinelearningservices.models.DataReferences + :keyword should_index: + :paramtype should_index: bool + :keyword dependencies: + :paramtype dependencies: list[~azure.mgmt.machinelearningservices.models.DependentAsset] + :keyword intellectual_property_publisher_information: + :paramtype intellectual_property_publisher_information: + ~azure.mgmt.machinelearningservices.models.IntellectualPropertyPublisherInformation + """ + super(AssetDto, self).__init__(**kwargs) + self.asset_id = kwargs.get('asset_id', None) + self.entity_id = kwargs.get('entity_id', None) + self.data_items = kwargs.get('data_items', None) + self.data_references = kwargs.get('data_references', None) + self.should_index = kwargs.get('should_index', None) + self.dependencies = kwargs.get('dependencies', None) + self.intellectual_property_publisher_information = kwargs.get('intellectual_property_publisher_information', None) + + +class AssetPaginatedResult(msrest.serialization.Model): + """AssetPaginatedResult. + + :ivar value: + :vartype value: list[~azure.mgmt.machinelearningservices.models.Asset] + :ivar continuation_token: + :vartype continuation_token: str + :ivar next_link: + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Asset]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.machinelearningservices.models.Asset] + :keyword continuation_token: + :paramtype continuation_token: str + :keyword next_link: + :paramtype next_link: str + """ + super(AssetPaginatedResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.continuation_token = kwargs.get('continuation_token', None) + self.next_link = kwargs.get('next_link', None) + + +class BatchGetResolvedUrisDto(msrest.serialization.Model): + """BatchGetResolvedUrisDto. + + :ivar values: + :vartype values: list[str] + """ + + _attribute_map = { + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword values: + :paramtype values: list[str] + """ + super(BatchGetResolvedUrisDto, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + + +class BatchModelPathResponseDto(msrest.serialization.Model): + """BatchModelPathResponseDto. + + :ivar values: Dictionary of :code:`<ModelPathResponseDto>`. + :vartype values: dict[str, ~azure.mgmt.machinelearningservices.models.ModelPathResponseDto] + """ + + _attribute_map = { + 'values': {'key': 'values', 'type': '{ModelPathResponseDto}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword values: Dictionary of :code:`<ModelPathResponseDto>`. + :paramtype values: dict[str, ~azure.mgmt.machinelearningservices.models.ModelPathResponseDto] + """ + super(BatchModelPathResponseDto, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + + +class BlobReference(msrest.serialization.Model): + """BlobReference. + + :ivar blob_uri: + :vartype blob_uri: str + :ivar storage_account_arm_id: + :vartype storage_account_arm_id: str + """ + + _attribute_map = { + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'storage_account_arm_id': {'key': 'storageAccountArmId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword blob_uri: + :paramtype blob_uri: str + :keyword storage_account_arm_id: + :paramtype storage_account_arm_id: str + """ + super(BlobReference, self).__init__(**kwargs) + self.blob_uri = kwargs.get('blob_uri', None) + self.storage_account_arm_id = kwargs.get('storage_account_arm_id', None) + + +class BlobReferenceForConsumptionDto(msrest.serialization.Model): + """BlobReferenceForConsumptionDto. + + :ivar blob_uri: + :vartype blob_uri: str + :ivar storage_account_arm_id: + :vartype storage_account_arm_id: str + :ivar credential: + :vartype credential: ~azure.mgmt.machinelearningservices.models.DataReferenceCredentialDto + """ + + _attribute_map = { + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'storage_account_arm_id': {'key': 'storageAccountArmId', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'DataReferenceCredentialDto'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword blob_uri: + :paramtype blob_uri: str + :keyword storage_account_arm_id: + :paramtype storage_account_arm_id: str + :keyword credential: + :paramtype credential: ~azure.mgmt.machinelearningservices.models.DataReferenceCredentialDto + """ + super(BlobReferenceForConsumptionDto, self).__init__(**kwargs) + self.blob_uri = kwargs.get('blob_uri', None) + self.storage_account_arm_id = kwargs.get('storage_account_arm_id', None) + self.credential = kwargs.get('credential', None) + + +class ContainerResourceRequirements(msrest.serialization.Model): + """ContainerResourceRequirements. + + :ivar cpu: + :vartype cpu: float + :ivar cpu_limit: + :vartype cpu_limit: float + :ivar memory_in_gb: + :vartype memory_in_gb: float + :ivar memory_in_gb_limit: + :vartype memory_in_gb_limit: float + :ivar gpu_enabled: + :vartype gpu_enabled: bool + :ivar gpu: + :vartype gpu: int + :ivar fpga: + :vartype fpga: int + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'float'}, + 'cpu_limit': {'key': 'cpuLimit', 'type': 'float'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'memory_in_gb_limit': {'key': 'memoryInGBLimit', 'type': 'float'}, + 'gpu_enabled': {'key': 'gpuEnabled', 'type': 'bool'}, + 'gpu': {'key': 'gpu', 'type': 'int'}, + 'fpga': {'key': 'fpga', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword cpu: + :paramtype cpu: float + :keyword cpu_limit: + :paramtype cpu_limit: float + :keyword memory_in_gb: + :paramtype memory_in_gb: float + :keyword memory_in_gb_limit: + :paramtype memory_in_gb_limit: float + :keyword gpu_enabled: + :paramtype gpu_enabled: bool + :keyword gpu: + :paramtype gpu: int + :keyword fpga: + :paramtype fpga: int + """ + super(ContainerResourceRequirements, self).__init__(**kwargs) + self.cpu = kwargs.get('cpu', None) + self.cpu_limit = kwargs.get('cpu_limit', None) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.memory_in_gb_limit = kwargs.get('memory_in_gb_limit', None) + self.gpu_enabled = kwargs.get('gpu_enabled', None) + self.gpu = kwargs.get('gpu', None) + self.fpga = kwargs.get('fpga', None) + + +class CreatedBy(msrest.serialization.Model): + """CreatedBy. + + :ivar user_object_id: + :vartype user_object_id: str + :ivar user_tenant_id: + :vartype user_tenant_id: str + :ivar user_name: + :vartype user_name: str + """ + + _attribute_map = { + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + 'user_tenant_id': {'key': 'userTenantId', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword user_object_id: + :paramtype user_object_id: str + :keyword user_tenant_id: + :paramtype user_tenant_id: str + :keyword user_name: + :paramtype user_name: str + """ + super(CreatedBy, self).__init__(**kwargs) + self.user_object_id = kwargs.get('user_object_id', None) + self.user_tenant_id = kwargs.get('user_tenant_id', None) + self.user_name = kwargs.get('user_name', None) + + +class CreateUnregisteredInputModelDto(msrest.serialization.Model): + """CreateUnregisteredInputModelDto. + + :ivar run_id: + :vartype run_id: str + :ivar input_name: + :vartype input_name: str + :ivar path: + :vartype path: str + :ivar type: + :vartype type: str + """ + + _attribute_map = { + 'run_id': {'key': 'runId', 'type': 'str'}, + 'input_name': {'key': 'inputName', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword run_id: + :paramtype run_id: str + :keyword input_name: + :paramtype input_name: str + :keyword path: + :paramtype path: str + :keyword type: + :paramtype type: str + """ + super(CreateUnregisteredInputModelDto, self).__init__(**kwargs) + self.run_id = kwargs.get('run_id', None) + self.input_name = kwargs.get('input_name', None) + self.path = kwargs.get('path', None) + self.type = kwargs.get('type', None) + + +class CreateUnregisteredOutputModelDto(msrest.serialization.Model): + """CreateUnregisteredOutputModelDto. + + :ivar run_id: + :vartype run_id: str + :ivar output_name: + :vartype output_name: str + :ivar path: + :vartype path: str + :ivar type: + :vartype type: str + """ + + _attribute_map = { + 'run_id': {'key': 'runId', 'type': 'str'}, + 'output_name': {'key': 'outputName', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword run_id: + :paramtype run_id: str + :keyword output_name: + :paramtype output_name: str + :keyword path: + :paramtype path: str + :keyword type: + :paramtype type: str + """ + super(CreateUnregisteredOutputModelDto, self).__init__(**kwargs) + self.run_id = kwargs.get('run_id', None) + self.output_name = kwargs.get('output_name', None) + self.path = kwargs.get('path', None) + self.type = kwargs.get('type', None) + + +class CreationContext(msrest.serialization.Model): + """CreationContext. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar created_time: + :vartype created_time: ~datetime.datetime + :ivar created_by: + :vartype created_by: ~azure.mgmt.machinelearningservices.models.CreatedBy + :ivar creation_source: + :vartype creation_source: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'CreatedBy'}, + 'creation_source': {'key': 'creationSource', '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 created_time: + :paramtype created_time: ~datetime.datetime + :keyword created_by: + :paramtype created_by: ~azure.mgmt.machinelearningservices.models.CreatedBy + :keyword creation_source: + :paramtype creation_source: str + """ + super(CreationContext, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.created_time = kwargs.get('created_time', None) + self.created_by = kwargs.get('created_by', None) + self.creation_source = kwargs.get('creation_source', None) + + +class DataItem(msrest.serialization.Model): + """DataItem. + + :ivar data: Anything. + :vartype data: any + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword data: Anything. + :paramtype data: any + """ + super(DataItem, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + + +class DataReferenceCredentialDto(msrest.serialization.Model): + """DataReferenceCredentialDto. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar credential_type: + :vartype credential_type: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'credential_type': {'key': 'credentialType', '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 credential_type: + :paramtype credential_type: str + """ + super(DataReferenceCredentialDto, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.credential_type = kwargs.get('credential_type', None) + + +class DataReferences(msrest.serialization.Model): + """DataReferences. + + :ivar blob_references: Dictionary of :code:`<BlobReference>`. + :vartype blob_references: dict[str, ~azure.mgmt.machinelearningservices.models.BlobReference] + :ivar image_registry_references: Dictionary of :code:`<ImageReference>`. + :vartype image_registry_references: dict[str, + ~azure.mgmt.machinelearningservices.models.ImageReference] + """ + + _attribute_map = { + 'blob_references': {'key': 'blobReferences', 'type': '{BlobReference}'}, + 'image_registry_references': {'key': 'imageRegistryReferences', 'type': '{ImageReference}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword blob_references: Dictionary of :code:`<BlobReference>`. + :paramtype blob_references: dict[str, ~azure.mgmt.machinelearningservices.models.BlobReference] + :keyword image_registry_references: Dictionary of :code:`<ImageReference>`. + :paramtype image_registry_references: dict[str, + ~azure.mgmt.machinelearningservices.models.ImageReference] + """ + super(DataReferences, self).__init__(**kwargs) + self.blob_references = kwargs.get('blob_references', None) + self.image_registry_references = kwargs.get('image_registry_references', None) + + +class DataReferencesForConsumptionDto(msrest.serialization.Model): + """DataReferencesForConsumptionDto. + + :ivar blob_references: Dictionary of :code:`<BlobReferenceForConsumptionDto>`. + :vartype blob_references: dict[str, + ~azure.mgmt.machinelearningservices.models.BlobReferenceForConsumptionDto] + :ivar image_registry_references: Dictionary of :code:`<ImageReferenceForConsumptionDto>`. + :vartype image_registry_references: dict[str, + ~azure.mgmt.machinelearningservices.models.ImageReferenceForConsumptionDto] + """ + + _attribute_map = { + 'blob_references': {'key': 'blobReferences', 'type': '{BlobReferenceForConsumptionDto}'}, + 'image_registry_references': {'key': 'imageRegistryReferences', 'type': '{ImageReferenceForConsumptionDto}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword blob_references: Dictionary of :code:`<BlobReferenceForConsumptionDto>`. + :paramtype blob_references: dict[str, + ~azure.mgmt.machinelearningservices.models.BlobReferenceForConsumptionDto] + :keyword image_registry_references: Dictionary of :code:`<ImageReferenceForConsumptionDto>`. + :paramtype image_registry_references: dict[str, + ~azure.mgmt.machinelearningservices.models.ImageReferenceForConsumptionDto] + """ + super(DataReferencesForConsumptionDto, self).__init__(**kwargs) + self.blob_references = kwargs.get('blob_references', None) + self.image_registry_references = kwargs.get('image_registry_references', None) + + +class DatasetReference(msrest.serialization.Model): + """DatasetReference. + + :ivar name: + :vartype name: str + :ivar id: + :vartype id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword id: + :paramtype id: str + """ + super(DatasetReference, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + + +class DependencyMapDto(msrest.serialization.Model): + """DependencyMapDto. + + :ivar dependencies: + :vartype dependencies: list[~azure.mgmt.machinelearningservices.models.DependencyMapItemDto] + """ + + _attribute_map = { + 'dependencies': {'key': 'dependencies', 'type': '[DependencyMapItemDto]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword dependencies: + :paramtype dependencies: list[~azure.mgmt.machinelearningservices.models.DependencyMapItemDto] + """ + super(DependencyMapDto, self).__init__(**kwargs) + self.dependencies = kwargs.get('dependencies', None) + + +class DependencyMapItemDto(msrest.serialization.Model): + """DependencyMapItemDto. + + :ivar source_id: + :vartype source_id: str + :ivar destination_id: + :vartype destination_id: str + """ + + _attribute_map = { + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'destination_id': {'key': 'destinationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword source_id: + :paramtype source_id: str + :keyword destination_id: + :paramtype destination_id: str + """ + super(DependencyMapItemDto, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.destination_id = kwargs.get('destination_id', None) + + +class DependentAsset(msrest.serialization.Model): + """DependentAsset. + + :ivar asset_id: + :vartype asset_id: str + """ + + _attribute_map = { + 'asset_id': {'key': 'assetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword asset_id: + :paramtype asset_id: str + """ + super(DependentAsset, self).__init__(**kwargs) + self.asset_id = kwargs.get('asset_id', None) + + +class DependentEntitiesDto(msrest.serialization.Model): + """DependentEntitiesDto. + + :ivar asset_id: + :vartype asset_id: str + :ivar dependencies: + :vartype dependencies: list[~azure.mgmt.machinelearningservices.models.DependentAsset] + """ + + _attribute_map = { + 'asset_id': {'key': 'assetId', 'type': 'str'}, + 'dependencies': {'key': 'dependencies', 'type': '[DependentAsset]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword asset_id: + :paramtype asset_id: str + :keyword dependencies: + :paramtype dependencies: list[~azure.mgmt.machinelearningservices.models.DependentAsset] + """ + super(DependentEntitiesDto, self).__init__(**kwargs) + self.asset_id = kwargs.get('asset_id', None) + self.dependencies = kwargs.get('dependencies', None) + + +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + :ivar code: + :vartype code: str + :ivar status_code: + :vartype status_code: int + :ivar message: + :vartype message: str + :ivar target: + :vartype target: str + :ivar details: + :vartype details: list[~azure.mgmt.machinelearningservices.models.InnerErrorDetails] + :ivar correlation: Dictionary of :code:`<string>`. + :vartype correlation: dict[str, str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[InnerErrorDetails]'}, + 'correlation': {'key': 'correlation', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: + :paramtype code: str + :keyword status_code: + :paramtype status_code: int + :keyword message: + :paramtype message: str + :keyword target: + :paramtype target: str + :keyword details: + :paramtype details: list[~azure.mgmt.machinelearningservices.models.InnerErrorDetails] + :keyword correlation: Dictionary of :code:`<string>`. + :paramtype correlation: dict[str, str] + """ + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.status_code = kwargs.get('status_code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + self.correlation = kwargs.get('correlation', None) + + +class ExtensiveModel(msrest.serialization.Model): + """ExtensiveModel. + + :ivar model: + :vartype model: ~azure.mgmt.machinelearningservices.models.Model + :ivar service_list: + :vartype service_list: list[~azure.mgmt.machinelearningservices.models.ServiceResponseBase] + :ivar asset_list: + :vartype asset_list: list[~azure.mgmt.machinelearningservices.models.Asset] + """ + + _attribute_map = { + 'model': {'key': 'Model', 'type': 'Model'}, + 'service_list': {'key': 'ServiceList', 'type': '[ServiceResponseBase]'}, + 'asset_list': {'key': 'AssetList', 'type': '[Asset]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword model: + :paramtype model: ~azure.mgmt.machinelearningservices.models.Model + :keyword service_list: + :paramtype service_list: list[~azure.mgmt.machinelearningservices.models.ServiceResponseBase] + :keyword asset_list: + :paramtype asset_list: list[~azure.mgmt.machinelearningservices.models.Asset] + """ + super(ExtensiveModel, self).__init__(**kwargs) + self.model = kwargs.get('model', None) + self.service_list = kwargs.get('service_list', None) + self.asset_list = kwargs.get('asset_list', None) + + +class FeedIndexEntityDto(msrest.serialization.Model): + """FeedIndexEntityDto. + + :ivar index_entity: + :vartype index_entity: ~azure.mgmt.machinelearningservices.models.IndexEntity + :ivar schema_id: + :vartype schema_id: str + :ivar entity_schema: Anything. + :vartype entity_schema: any + """ + + _attribute_map = { + 'index_entity': {'key': 'indexEntity', 'type': 'IndexEntity'}, + 'schema_id': {'key': 'schemaId', 'type': 'str'}, + 'entity_schema': {'key': 'entitySchema', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword index_entity: + :paramtype index_entity: ~azure.mgmt.machinelearningservices.models.IndexEntity + :keyword schema_id: + :paramtype schema_id: str + :keyword entity_schema: Anything. + :paramtype entity_schema: any + """ + super(FeedIndexEntityDto, self).__init__(**kwargs) + self.index_entity = kwargs.get('index_entity', None) + self.schema_id = kwargs.get('schema_id', None) + self.entity_schema = kwargs.get('entity_schema', None) + + +class FeedIndexEntityRequestDto(msrest.serialization.Model): + """FeedIndexEntityRequestDto. + + :ivar feed_entity: + :vartype feed_entity: ~azure.mgmt.machinelearningservices.models.AssetDto + :ivar label_to_version_mapping: Dictionary of :code:`<string>`. + :vartype label_to_version_mapping: dict[str, str] + """ + + _attribute_map = { + 'feed_entity': {'key': 'feedEntity', 'type': 'AssetDto'}, + 'label_to_version_mapping': {'key': 'labelToVersionMapping', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword feed_entity: + :paramtype feed_entity: ~azure.mgmt.machinelearningservices.models.AssetDto + :keyword label_to_version_mapping: Dictionary of :code:`<string>`. + :paramtype label_to_version_mapping: dict[str, str] + """ + super(FeedIndexEntityRequestDto, self).__init__(**kwargs) + self.feed_entity = kwargs.get('feed_entity', None) + self.label_to_version_mapping = kwargs.get('label_to_version_mapping', None) + + +class ImageReference(msrest.serialization.Model): + """ImageReference. + + :ivar image_registry_reference: + :vartype image_registry_reference: str + """ + + _attribute_map = { + 'image_registry_reference': {'key': 'imageRegistryReference', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword image_registry_reference: + :paramtype image_registry_reference: str + """ + super(ImageReference, self).__init__(**kwargs) + self.image_registry_reference = kwargs.get('image_registry_reference', None) + + +class ImageReferenceForConsumptionDto(msrest.serialization.Model): + """ImageReferenceForConsumptionDto. + + :ivar image_registry_reference: + :vartype image_registry_reference: str + :ivar credential: + :vartype credential: ~azure.mgmt.machinelearningservices.models.DataReferenceCredentialDto + """ + + _attribute_map = { + 'image_registry_reference': {'key': 'imageRegistryReference', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'DataReferenceCredentialDto'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword image_registry_reference: + :paramtype image_registry_reference: str + :keyword credential: + :paramtype credential: ~azure.mgmt.machinelearningservices.models.DataReferenceCredentialDto + """ + super(ImageReferenceForConsumptionDto, self).__init__(**kwargs) + self.image_registry_reference = kwargs.get('image_registry_reference', None) + self.credential = kwargs.get('credential', None) + + +class IndexAnnotations(msrest.serialization.Model): + """IndexAnnotations. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar archived: + :vartype archived: bool + :ivar tags: A set of tags. Dictionary of :code:`<string>`. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'archived': {'key': 'archived', 'type': 'bool'}, + 'tags': {'key': 'tags', '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 archived: + :paramtype archived: bool + :keyword tags: A set of tags. Dictionary of :code:`<string>`. + :paramtype tags: dict[str, str] + """ + super(IndexAnnotations, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.archived = kwargs.get('archived', None) + self.tags = kwargs.get('tags', None) + + +class IndexEntity(msrest.serialization.Model): + """IndexEntity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar schema_id: + :vartype schema_id: str + :ivar entity_id: + :vartype entity_id: str + :ivar kind: Possible values include: "Invalid", "LineageRoot", "Versioned", "Unversioned". + :vartype kind: str or ~azure.mgmt.machinelearningservices.models.EntityKind + :ivar annotations: + :vartype annotations: ~azure.mgmt.machinelearningservices.models.IndexAnnotations + :ivar properties: + :vartype properties: ~azure.mgmt.machinelearningservices.models.IndexProperties + :ivar internal: Dictionary of :code:`<any>`. + :vartype internal: dict[str, any] + :ivar update_sequence: + :vartype update_sequence: long + :ivar type: + :vartype type: str + :ivar version: + :vartype version: str + :ivar entity_container_id: + :vartype entity_container_id: str + :ivar entity_object_id: + :vartype entity_object_id: str + :ivar resource_type: + :vartype resource_type: str + :ivar relationships: + :vartype relationships: list[~azure.mgmt.machinelearningservices.models.Relationship] + :ivar asset_id: + :vartype asset_id: str + """ + + _validation = { + 'version': {'readonly': True}, + 'entity_container_id': {'readonly': True}, + 'entity_object_id': {'readonly': True}, + 'resource_type': {'readonly': True}, + } + + _attribute_map = { + 'schema_id': {'key': 'schemaId', 'type': 'str'}, + 'entity_id': {'key': 'entityId', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': 'IndexAnnotations'}, + 'properties': {'key': 'properties', 'type': 'IndexProperties'}, + 'internal': {'key': 'internal', 'type': '{object}'}, + 'update_sequence': {'key': 'updateSequence', 'type': 'long'}, + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'entity_container_id': {'key': 'entityContainerId', 'type': 'str'}, + 'entity_object_id': {'key': 'entityObjectId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'relationships': {'key': 'relationships', 'type': '[Relationship]'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword schema_id: + :paramtype schema_id: str + :keyword entity_id: + :paramtype entity_id: str + :keyword kind: Possible values include: "Invalid", "LineageRoot", "Versioned", "Unversioned". + :paramtype kind: str or ~azure.mgmt.machinelearningservices.models.EntityKind + :keyword annotations: + :paramtype annotations: ~azure.mgmt.machinelearningservices.models.IndexAnnotations + :keyword properties: + :paramtype properties: ~azure.mgmt.machinelearningservices.models.IndexProperties + :keyword internal: Dictionary of :code:`<any>`. + :paramtype internal: dict[str, any] + :keyword update_sequence: + :paramtype update_sequence: long + :keyword type: + :paramtype type: str + :keyword relationships: + :paramtype relationships: list[~azure.mgmt.machinelearningservices.models.Relationship] + :keyword asset_id: + :paramtype asset_id: str + """ + super(IndexEntity, self).__init__(**kwargs) + self.schema_id = kwargs.get('schema_id', None) + self.entity_id = kwargs.get('entity_id', None) + self.kind = kwargs.get('kind', None) + self.annotations = kwargs.get('annotations', None) + self.properties = kwargs.get('properties', None) + self.internal = kwargs.get('internal', None) + self.update_sequence = kwargs.get('update_sequence', None) + self.type = kwargs.get('type', None) + self.version = None + self.entity_container_id = None + self.entity_object_id = None + self.resource_type = None + self.relationships = kwargs.get('relationships', None) + self.asset_id = kwargs.get('asset_id', None) + + +class IndexProperties(msrest.serialization.Model): + """IndexProperties. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar creation_context: + :vartype creation_context: ~azure.mgmt.machinelearningservices.models.CreationContext + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'creation_context': {'key': 'creationContext', 'type': 'CreationContext'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword additional_properties: Unmatched properties from the message are deserialized to this + collection. + :paramtype additional_properties: dict[str, any] + :keyword creation_context: + :paramtype creation_context: ~azure.mgmt.machinelearningservices.models.CreationContext + """ + super(IndexProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.creation_context = kwargs.get('creation_context', None) + + +class InnerErrorDetails(msrest.serialization.Model): + """InnerErrorDetails. + + :ivar code: + :vartype code: str + :ivar message: + :vartype message: str + :ivar target: + :vartype target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: + :paramtype code: str + :keyword message: + :paramtype message: str + :keyword target: + :paramtype target: str + """ + super(InnerErrorDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + + +class IntellectualPropertyPublisherInformation(msrest.serialization.Model): + """IntellectualPropertyPublisherInformation. + + :ivar intellectual_property_publisher: + :vartype intellectual_property_publisher: str + """ + + _attribute_map = { + 'intellectual_property_publisher': {'key': 'intellectualPropertyPublisher', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword intellectual_property_publisher: + :paramtype intellectual_property_publisher: str + """ + super(IntellectualPropertyPublisherInformation, self).__init__(**kwargs) + self.intellectual_property_publisher = kwargs.get('intellectual_property_publisher', None) + + +class ListModelsRequest(msrest.serialization.Model): + """ListModelsRequest. + + :ivar name: + :vartype name: str + :ivar tag: + :vartype tag: str + :ivar version: + :vartype version: str + :ivar framework: + :vartype framework: str + :ivar description: + :vartype description: str + :ivar count: + :vartype count: int + :ivar offset: + :vartype offset: int + :ivar skip_token: + :vartype skip_token: str + :ivar tags: A set of tags. + :vartype tags: str + :ivar properties: + :vartype properties: str + :ivar run_id: + :vartype run_id: str + :ivar dataset_id: + :vartype dataset_id: str + :ivar order_by: Possible values include: "CreatedAtDesc", "CreatedAtAsc", "UpdatedAtDesc", + "UpdatedAtAsc". + :vartype order_by: str or ~azure.mgmt.machinelearningservices.models.OrderString + :ivar latest_version_only: + :vartype latest_version_only: bool + :ivar modified_after: + :vartype modified_after: ~datetime.datetime + :ivar modified_before: + :vartype modified_before: ~datetime.datetime + :ivar list_view_type: Possible values include: "ActiveOnly", "ArchivedOnly", "All". + :vartype list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'framework': {'key': 'framework', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'dataset_id': {'key': 'datasetId', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'str'}, + 'latest_version_only': {'key': 'latestVersionOnly', 'type': 'bool'}, + 'modified_after': {'key': 'modifiedAfter', 'type': 'iso-8601'}, + 'modified_before': {'key': 'modifiedBefore', 'type': 'iso-8601'}, + 'list_view_type': {'key': 'listViewType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword tag: + :paramtype tag: str + :keyword version: + :paramtype version: str + :keyword framework: + :paramtype framework: str + :keyword description: + :paramtype description: str + :keyword count: + :paramtype count: int + :keyword offset: + :paramtype offset: int + :keyword skip_token: + :paramtype skip_token: str + :keyword tags: A set of tags. + :paramtype tags: str + :keyword properties: + :paramtype properties: str + :keyword run_id: + :paramtype run_id: str + :keyword dataset_id: + :paramtype dataset_id: str + :keyword order_by: Possible values include: "CreatedAtDesc", "CreatedAtAsc", "UpdatedAtDesc", + "UpdatedAtAsc". + :paramtype order_by: str or ~azure.mgmt.machinelearningservices.models.OrderString + :keyword latest_version_only: + :paramtype latest_version_only: bool + :keyword modified_after: + :paramtype modified_after: ~datetime.datetime + :keyword modified_before: + :paramtype modified_before: ~datetime.datetime + :keyword list_view_type: Possible values include: "ActiveOnly", "ArchivedOnly", "All". + :paramtype list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + """ + super(ListModelsRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tag = kwargs.get('tag', None) + self.version = kwargs.get('version', None) + self.framework = kwargs.get('framework', None) + self.description = kwargs.get('description', None) + self.count = kwargs.get('count', None) + self.offset = kwargs.get('offset', None) + self.skip_token = kwargs.get('skip_token', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + self.run_id = kwargs.get('run_id', None) + self.dataset_id = kwargs.get('dataset_id', None) + self.order_by = kwargs.get('order_by', None) + self.latest_version_only = kwargs.get('latest_version_only', None) + self.modified_after = kwargs.get('modified_after', None) + self.modified_before = kwargs.get('modified_before', None) + self.list_view_type = kwargs.get('list_view_type', None) + + +class Model(msrest.serialization.Model): + """Model. + + All required parameters must be populated in order to send to Azure. + + :ivar id: + :vartype id: str + :ivar name: Required. + :vartype name: str + :ivar framework: + :vartype framework: str + :ivar framework_version: + :vartype framework_version: str + :ivar version: + :vartype version: long + :ivar tags: A set of tags. + :vartype tags: list[str] + :ivar datasets: + :vartype datasets: list[~azure.mgmt.machinelearningservices.models.DatasetReference] + :ivar url: + :vartype url: str + :ivar mime_type: Required. + :vartype mime_type: str + :ivar description: + :vartype description: str + :ivar created_time: + :vartype created_time: ~datetime.datetime + :ivar modified_time: + :vartype modified_time: ~datetime.datetime + :ivar unpack: + :vartype unpack: bool + :ivar parent_model_id: + :vartype parent_model_id: str + :ivar run_id: + :vartype run_id: str + :ivar experiment_name: + :vartype experiment_name: str + :ivar kv_tags: Dictionary of :code:`<string>`. + :vartype kv_tags: dict[str, str] + :ivar properties: Dictionary of :code:`<string>`. + :vartype properties: dict[str, str] + :ivar derived_model_ids: + :vartype derived_model_ids: list[str] + :ivar inputs_schema: + :vartype inputs_schema: list[~azure.mgmt.machinelearningservices.models.ModelSchema] + :ivar outputs_schema: + :vartype outputs_schema: list[~azure.mgmt.machinelearningservices.models.ModelSchema] + :ivar sample_input_data: + :vartype sample_input_data: str + :ivar sample_output_data: + :vartype sample_output_data: str + :ivar resource_requirements: + :vartype resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :ivar created_by: + :vartype created_by: ~azure.mgmt.machinelearningservices.models.User + :ivar modified_by: + :vartype modified_by: ~azure.mgmt.machinelearningservices.models.User + :ivar flavors: Dictionary of + <components·8urbg9·schemas·model·properties·flavors·additionalproperties>. + :vartype flavors: dict[str, dict[str, str]] + :ivar model_format: Possible values include: "CUSTOM", "MLFLOW", "TRITON", "PRESETS". + :vartype model_format: str or ~azure.mgmt.machinelearningservices.models.ModelFormatEnum + :ivar stage: + :vartype stage: str + :ivar model_container_id: + :vartype model_container_id: str + :ivar mms_id: + :vartype mms_id: str + :ivar default_deployment_settings: + :vartype default_deployment_settings: + ~azure.mgmt.machinelearningservices.models.ModelDeploymentSettings + :ivar is_anonymous: + :vartype is_anonymous: bool + :ivar is_archived: + :vartype is_archived: bool + :ivar is_registered: + :vartype is_registered: bool + :ivar data_path: + :vartype data_path: str + :ivar model_type: + :vartype model_type: str + :ivar asset_id: + :vartype asset_id: str + """ + + _validation = { + 'name': {'required': True}, + 'mime_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'framework': {'key': 'framework', 'type': 'str'}, + 'framework_version': {'key': 'frameworkVersion', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'long'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'datasets': {'key': 'datasets', 'type': '[DatasetReference]'}, + 'url': {'key': 'url', 'type': 'str'}, + 'mime_type': {'key': 'mimeType', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'modified_time': {'key': 'modifiedTime', 'type': 'iso-8601'}, + 'unpack': {'key': 'unpack', 'type': 'bool'}, + 'parent_model_id': {'key': 'parentModelId', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'derived_model_ids': {'key': 'derivedModelIds', 'type': '[str]'}, + 'inputs_schema': {'key': 'inputsSchema', 'type': '[ModelSchema]'}, + 'outputs_schema': {'key': 'outputsSchema', 'type': '[ModelSchema]'}, + 'sample_input_data': {'key': 'sampleInputData', 'type': 'str'}, + 'sample_output_data': {'key': 'sampleOutputData', 'type': 'str'}, + 'resource_requirements': {'key': 'resourceRequirements', 'type': 'ContainerResourceRequirements'}, + 'created_by': {'key': 'createdBy', 'type': 'User'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'User'}, + 'flavors': {'key': 'flavors', 'type': '{{str}}'}, + 'model_format': {'key': 'modelFormat', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'model_container_id': {'key': 'modelContainerId', 'type': 'str'}, + 'mms_id': {'key': 'mmsId', 'type': 'str'}, + 'default_deployment_settings': {'key': 'defaultDeploymentSettings', 'type': 'ModelDeploymentSettings'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'is_registered': {'key': 'isRegistered', 'type': 'bool'}, + 'data_path': {'key': 'dataPath', 'type': 'str'}, + 'model_type': {'key': 'modelType', 'type': 'str'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: + :paramtype id: str + :keyword name: Required. + :paramtype name: str + :keyword framework: + :paramtype framework: str + :keyword framework_version: + :paramtype framework_version: str + :keyword version: + :paramtype version: long + :keyword tags: A set of tags. + :paramtype tags: list[str] + :keyword datasets: + :paramtype datasets: list[~azure.mgmt.machinelearningservices.models.DatasetReference] + :keyword url: + :paramtype url: str + :keyword mime_type: Required. + :paramtype mime_type: str + :keyword description: + :paramtype description: str + :keyword created_time: + :paramtype created_time: ~datetime.datetime + :keyword modified_time: + :paramtype modified_time: ~datetime.datetime + :keyword unpack: + :paramtype unpack: bool + :keyword parent_model_id: + :paramtype parent_model_id: str + :keyword run_id: + :paramtype run_id: str + :keyword experiment_name: + :paramtype experiment_name: str + :keyword kv_tags: Dictionary of :code:`<string>`. + :paramtype kv_tags: dict[str, str] + :keyword properties: Dictionary of :code:`<string>`. + :paramtype properties: dict[str, str] + :keyword derived_model_ids: + :paramtype derived_model_ids: list[str] + :keyword inputs_schema: + :paramtype inputs_schema: list[~azure.mgmt.machinelearningservices.models.ModelSchema] + :keyword outputs_schema: + :paramtype outputs_schema: list[~azure.mgmt.machinelearningservices.models.ModelSchema] + :keyword sample_input_data: + :paramtype sample_input_data: str + :keyword sample_output_data: + :paramtype sample_output_data: str + :keyword resource_requirements: + :paramtype resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :keyword created_by: + :paramtype created_by: ~azure.mgmt.machinelearningservices.models.User + :keyword modified_by: + :paramtype modified_by: ~azure.mgmt.machinelearningservices.models.User + :keyword flavors: Dictionary of + <components·8urbg9·schemas·model·properties·flavors·additionalproperties>. + :paramtype flavors: dict[str, dict[str, str]] + :keyword model_format: Possible values include: "CUSTOM", "MLFLOW", "TRITON", "PRESETS". + :paramtype model_format: str or ~azure.mgmt.machinelearningservices.models.ModelFormatEnum + :keyword stage: + :paramtype stage: str + :keyword model_container_id: + :paramtype model_container_id: str + :keyword mms_id: + :paramtype mms_id: str + :keyword default_deployment_settings: + :paramtype default_deployment_settings: + ~azure.mgmt.machinelearningservices.models.ModelDeploymentSettings + :keyword is_anonymous: + :paramtype is_anonymous: bool + :keyword is_archived: + :paramtype is_archived: bool + :keyword is_registered: + :paramtype is_registered: bool + :keyword data_path: + :paramtype data_path: str + :keyword model_type: + :paramtype model_type: str + :keyword asset_id: + :paramtype asset_id: str + """ + super(Model, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs['name'] + self.framework = kwargs.get('framework', None) + self.framework_version = kwargs.get('framework_version', None) + self.version = kwargs.get('version', None) + self.tags = kwargs.get('tags', None) + self.datasets = kwargs.get('datasets', None) + self.url = kwargs.get('url', None) + self.mime_type = kwargs['mime_type'] + self.description = kwargs.get('description', None) + self.created_time = kwargs.get('created_time', None) + self.modified_time = kwargs.get('modified_time', None) + self.unpack = kwargs.get('unpack', None) + self.parent_model_id = kwargs.get('parent_model_id', None) + self.run_id = kwargs.get('run_id', None) + self.experiment_name = kwargs.get('experiment_name', None) + self.kv_tags = kwargs.get('kv_tags', None) + self.properties = kwargs.get('properties', None) + self.derived_model_ids = kwargs.get('derived_model_ids', None) + self.inputs_schema = kwargs.get('inputs_schema', None) + self.outputs_schema = kwargs.get('outputs_schema', None) + self.sample_input_data = kwargs.get('sample_input_data', None) + self.sample_output_data = kwargs.get('sample_output_data', None) + self.resource_requirements = kwargs.get('resource_requirements', None) + self.created_by = kwargs.get('created_by', None) + self.modified_by = kwargs.get('modified_by', None) + self.flavors = kwargs.get('flavors', None) + self.model_format = kwargs.get('model_format', None) + self.stage = kwargs.get('stage', None) + self.model_container_id = kwargs.get('model_container_id', None) + self.mms_id = kwargs.get('mms_id', None) + self.default_deployment_settings = kwargs.get('default_deployment_settings', None) + self.is_anonymous = kwargs.get('is_anonymous', None) + self.is_archived = kwargs.get('is_archived', None) + self.is_registered = kwargs.get('is_registered', None) + self.data_path = kwargs.get('data_path', None) + self.model_type = kwargs.get('model_type', None) + self.asset_id = kwargs.get('asset_id', None) + + +class ModelBatchDto(msrest.serialization.Model): + """ModelBatchDto. + + :ivar model_ids: + :vartype model_ids: list[str] + """ + + _attribute_map = { + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword model_ids: + :paramtype model_ids: list[str] + """ + super(ModelBatchDto, self).__init__(**kwargs) + self.model_ids = kwargs.get('model_ids', None) + + +class ModelBatchResponseDto(msrest.serialization.Model): + """ModelBatchResponseDto. + + :ivar models: Dictionary of :code:`<Model>`. + :vartype models: dict[str, ~azure.mgmt.machinelearningservices.models.Model] + """ + + _attribute_map = { + 'models': {'key': 'models', 'type': '{Model}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword models: Dictionary of :code:`<Model>`. + :paramtype models: dict[str, ~azure.mgmt.machinelearningservices.models.Model] + """ + super(ModelBatchResponseDto, self).__init__(**kwargs) + self.models = kwargs.get('models', None) + + +class ModelContainerRequest(msrest.serialization.Model): + """ModelContainerRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. + :vartype name: str + :ivar description: + :vartype description: str + :ivar kv_tags: Dictionary of :code:`<string>`. + :vartype kv_tags: dict[str, str] + :ivar is_archived: + :vartype is_archived: bool + :ivar is_registered: + :vartype is_registered: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'is_registered': {'key': 'isRegistered', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. + :paramtype name: str + :keyword description: + :paramtype description: str + :keyword kv_tags: Dictionary of :code:`<string>`. + :paramtype kv_tags: dict[str, str] + :keyword is_archived: + :paramtype is_archived: bool + :keyword is_registered: + :paramtype is_registered: bool + """ + super(ModelContainerRequest, self).__init__(**kwargs) + self.name = kwargs['name'] + self.description = kwargs.get('description', None) + self.kv_tags = kwargs.get('kv_tags', None) + self.is_archived = kwargs.get('is_archived', None) + self.is_registered = kwargs.get('is_registered', None) + + +class ModelDeploymentSettings(msrest.serialization.Model): + """ModelDeploymentSettings. + + All required parameters must be populated in order to send to Azure. + + :ivar model_format: Required. Possible values include: "CUSTOM", "MLFLOW", "TRITON", "PRESETS". + :vartype model_format: str or ~azure.mgmt.machinelearningservices.models.ModelFormatEnum + :ivar model_name: + :vartype model_name: str + :ivar model_version: + :vartype model_version: str + :ivar model_type: + :vartype model_type: str + """ + + _validation = { + 'model_format': {'required': True}, + } + + _attribute_map = { + 'model_format': {'key': 'modelFormat', 'type': 'str'}, + 'model_name': {'key': 'ModelName', 'type': 'str'}, + 'model_version': {'key': 'ModelVersion', 'type': 'str'}, + 'model_type': {'key': 'ModelType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword model_format: Required. Possible values include: "CUSTOM", "MLFLOW", "TRITON", + "PRESETS". + :paramtype model_format: str or ~azure.mgmt.machinelearningservices.models.ModelFormatEnum + :keyword model_name: + :paramtype model_name: str + :keyword model_version: + :paramtype model_version: str + :keyword model_type: + :paramtype model_type: str + """ + super(ModelDeploymentSettings, self).__init__(**kwargs) + self.model_format = kwargs['model_format'] + self.model_name = kwargs.get('model_name', None) + self.model_version = kwargs.get('model_version', None) + self.model_type = kwargs.get('model_type', None) + + +class ModelListModelsRequestPagedResponse(msrest.serialization.Model): + """ModelListModelsRequestPagedResponse. + + :ivar value: + :vartype value: list[~azure.mgmt.machinelearningservices.models.Model] + :ivar next_link: + :vartype next_link: str + :ivar continuation_token: + :vartype continuation_token: str + :ivar next_request: + :vartype next_request: ~azure.mgmt.machinelearningservices.models.ListModelsRequest + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Model]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'next_request': {'key': 'nextRequest', 'type': 'ListModelsRequest'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.machinelearningservices.models.Model] + :keyword next_link: + :paramtype next_link: str + :keyword continuation_token: + :paramtype continuation_token: str + :keyword next_request: + :paramtype next_request: ~azure.mgmt.machinelearningservices.models.ListModelsRequest + """ + super(ModelListModelsRequestPagedResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + self.continuation_token = kwargs.get('continuation_token', None) + self.next_request = kwargs.get('next_request', None) + + +class ModelPagedResponse(msrest.serialization.Model): + """ModelPagedResponse. + + :ivar value: + :vartype value: list[~azure.mgmt.machinelearningservices.models.Model] + :ivar continuation_token: + :vartype continuation_token: str + :ivar next_link: + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Model]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.machinelearningservices.models.Model] + :keyword continuation_token: + :paramtype continuation_token: str + :keyword next_link: + :paramtype next_link: str + """ + super(ModelPagedResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.continuation_token = kwargs.get('continuation_token', None) + self.next_link = kwargs.get('next_link', None) + + +class ModelPathResponseDto(msrest.serialization.Model): + """ModelPathResponseDto. + + :ivar path: + :vartype path: str + :ivar type: + :vartype type: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword path: + :paramtype path: str + :keyword type: + :paramtype type: str + """ + super(ModelPathResponseDto, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.type = kwargs.get('type', None) + + +class ModelSchema(msrest.serialization.Model): + """ModelSchema. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. + :vartype name: str + :ivar data_type: Possible values include: "undefined", "bool", "uint8", "uint16", "uint32", + "uint64", "int8", "int16", "int32", "int64", "float16", "float32", "float64", "bfloat16", + "complex64", "complex128", "string". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.ModelSchemaDataType + :ivar shape: + :vartype shape: list[int] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'shape': {'key': 'shape', 'type': '[int]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. + :paramtype name: str + :keyword data_type: Possible values include: "undefined", "bool", "uint8", "uint16", "uint32", + "uint64", "int8", "int16", "int32", "int64", "float16", "float32", "float64", "bfloat16", + "complex64", "complex128", "string". + :paramtype data_type: str or ~azure.mgmt.machinelearningservices.models.ModelSchemaDataType + :keyword shape: + :paramtype shape: list[int] + """ + super(ModelSchema, self).__init__(**kwargs) + self.name = kwargs['name'] + self.data_type = kwargs.get('data_type', None) + self.shape = kwargs.get('shape', None) + + +class ModelSettingsIdentifiers(msrest.serialization.Model): + """ModelSettingsIdentifiers. + + :ivar model_id: + :vartype model_id: str + :ivar engine_id: + :vartype engine_id: str + """ + + _attribute_map = { + 'model_id': {'key': 'modelId', 'type': 'str'}, + 'engine_id': {'key': 'engineId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword model_id: + :paramtype model_id: str + :keyword engine_id: + :paramtype engine_id: str + """ + super(ModelSettingsIdentifiers, self).__init__(**kwargs) + self.model_id = kwargs.get('model_id', None) + self.engine_id = kwargs.get('engine_id', None) + + +class Operation(msrest.serialization.Model): + """Operation. + + :ivar value: Anything. + :vartype value: any + :ivar path: + :vartype path: str + :ivar op: + :vartype op: str + :ivar from_property: + :vartype from_property: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'object'}, + 'path': {'key': 'path', 'type': 'str'}, + 'op': {'key': 'op', 'type': 'str'}, + 'from_property': {'key': 'from', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: Anything. + :paramtype value: any + :keyword path: + :paramtype path: str + :keyword op: + :paramtype op: str + :keyword from_property: + :paramtype from_property: str + """ + super(Operation, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.path = kwargs.get('path', None) + self.op = kwargs.get('op', None) + self.from_property = kwargs.get('from_property', None) + + +class ProviderFeedEntityRequestDto(msrest.serialization.Model): + """ProviderFeedEntityRequestDto. + + :ivar source_and_target_asset_ids: + :vartype source_and_target_asset_ids: + ~azure.mgmt.machinelearningservices.models.DependencyMapItemDto + :ivar dependency_map_dto: + :vartype dependency_map_dto: ~azure.mgmt.machinelearningservices.models.DependencyMapDto + :ivar label_to_version_mapping: Dictionary of :code:`<string>`. + :vartype label_to_version_mapping: dict[str, str] + """ + + _attribute_map = { + 'source_and_target_asset_ids': {'key': 'sourceAndTargetAssetIds', 'type': 'DependencyMapItemDto'}, + 'dependency_map_dto': {'key': 'dependencyMapDto', 'type': 'DependencyMapDto'}, + 'label_to_version_mapping': {'key': 'labelToVersionMapping', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword source_and_target_asset_ids: + :paramtype source_and_target_asset_ids: + ~azure.mgmt.machinelearningservices.models.DependencyMapItemDto + :keyword dependency_map_dto: + :paramtype dependency_map_dto: ~azure.mgmt.machinelearningservices.models.DependencyMapDto + :keyword label_to_version_mapping: Dictionary of :code:`<string>`. + :paramtype label_to_version_mapping: dict[str, str] + """ + super(ProviderFeedEntityRequestDto, self).__init__(**kwargs) + self.source_and_target_asset_ids = kwargs.get('source_and_target_asset_ids', None) + self.dependency_map_dto = kwargs.get('dependency_map_dto', None) + self.label_to_version_mapping = kwargs.get('label_to_version_mapping', None) + + +class Relationship(msrest.serialization.Model): + """Relationship. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar relation_type: + :vartype relation_type: str + :ivar target_entity_id: + :vartype target_entity_id: str + :ivar asset_id: + :vartype asset_id: str + :ivar entity_type: + :vartype entity_type: str + :ivar direction: + :vartype direction: str + :ivar entity_container_id: + :vartype entity_container_id: str + """ + + _validation = { + 'entity_type': {'readonly': True}, + 'entity_container_id': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'relation_type': {'key': 'relationType', 'type': 'str'}, + 'target_entity_id': {'key': 'targetEntityId', 'type': 'str'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'direction': {'key': 'direction', 'type': 'str'}, + 'entity_container_id': {'key': 'entityContainerId', '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 relation_type: + :paramtype relation_type: str + :keyword target_entity_id: + :paramtype target_entity_id: str + :keyword asset_id: + :paramtype asset_id: str + :keyword direction: + :paramtype direction: str + """ + super(Relationship, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.relation_type = kwargs.get('relation_type', None) + self.target_entity_id = kwargs.get('target_entity_id', None) + self.asset_id = kwargs.get('asset_id', None) + self.entity_type = None + self.direction = kwargs.get('direction', None) + self.entity_container_id = None + + +class ServiceResponseBase(msrest.serialization.Model): + """ServiceResponseBase. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar description: + :vartype description: str + :ivar tags: A set of tags. + :vartype tags: list[str] + :ivar kv_tags: Dictionary of :code:`<string>`. + :vartype kv_tags: dict[str, str] + :ivar properties: Dictionary of :code:`<string>`. + :vartype properties: dict[str, str] + :ivar operation_id: + :vartype operation_id: str + :ivar state: Possible values include: "Transitioning", "Healthy", "Unhealthy", "Failed", + "Unschedulable". + :vartype state: str or ~azure.mgmt.machinelearningservices.models.WebServiceState + :ivar created_time: + :vartype created_time: ~datetime.datetime + :ivar updated_time: + :vartype updated_time: ~datetime.datetime + :ivar error: + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + :ivar compute_type: Possible values include: "ACS", "FPGA", "ACI", "AKS", "AMLCOMPUTE", "IOT", + "MIR", "AKSENDPOINT", "MIRSINGLEMODEL", "MIRAMLCOMPUTE", "MIRGA", "AMLARC", "BATCHAMLCOMPUTE", + "UNKNOWN". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeEnvironmentType + :ivar deployment_type: Possible values include: "GRPCRealtimeEndpoint", "HttpRealtimeEndpoint", + "Batch". + :vartype deployment_type: str or ~azure.mgmt.machinelearningservices.models.DeploymentType + :ivar created_by: + :vartype created_by: ~azure.mgmt.machinelearningservices.models.User + :ivar endpoint_name: + :vartype endpoint_name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'User'}, + 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: + :paramtype id: str + :keyword name: + :paramtype name: str + :keyword description: + :paramtype description: str + :keyword tags: A set of tags. + :paramtype tags: list[str] + :keyword kv_tags: Dictionary of :code:`<string>`. + :paramtype kv_tags: dict[str, str] + :keyword properties: Dictionary of :code:`<string>`. + :paramtype properties: dict[str, str] + :keyword operation_id: + :paramtype operation_id: str + :keyword state: Possible values include: "Transitioning", "Healthy", "Unhealthy", "Failed", + "Unschedulable". + :paramtype state: str or ~azure.mgmt.machinelearningservices.models.WebServiceState + :keyword created_time: + :paramtype created_time: ~datetime.datetime + :keyword updated_time: + :paramtype updated_time: ~datetime.datetime + :keyword error: + :paramtype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + :keyword compute_type: Possible values include: "ACS", "FPGA", "ACI", "AKS", "AMLCOMPUTE", + "IOT", "MIR", "AKSENDPOINT", "MIRSINGLEMODEL", "MIRAMLCOMPUTE", "MIRGA", "AMLARC", + "BATCHAMLCOMPUTE", "UNKNOWN". + :paramtype compute_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeEnvironmentType + :keyword deployment_type: Possible values include: "GRPCRealtimeEndpoint", + "HttpRealtimeEndpoint", "Batch". + :paramtype deployment_type: str or ~azure.mgmt.machinelearningservices.models.DeploymentType + :keyword created_by: + :paramtype created_by: ~azure.mgmt.machinelearningservices.models.User + :keyword endpoint_name: + :paramtype endpoint_name: str + """ + super(ServiceResponseBase, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.tags = kwargs.get('tags', None) + self.kv_tags = kwargs.get('kv_tags', None) + self.properties = kwargs.get('properties', None) + self.operation_id = kwargs.get('operation_id', None) + self.state = kwargs.get('state', None) + self.created_time = kwargs.get('created_time', None) + self.updated_time = kwargs.get('updated_time', None) + self.error = kwargs.get('error', None) + self.compute_type = kwargs.get('compute_type', None) + self.deployment_type = kwargs.get('deployment_type', None) + self.created_by = kwargs.get('created_by', None) + self.endpoint_name = kwargs.get('endpoint_name', None) + + +class User(msrest.serialization.Model): + """User. + + :ivar user_object_id: + :vartype user_object_id: str + :ivar user_pu_id: + :vartype user_pu_id: str + :ivar user_idp: + :vartype user_idp: str + :ivar user_alt_sec_id: + :vartype user_alt_sec_id: str + :ivar user_iss: + :vartype user_iss: str + :ivar user_tenant_id: + :vartype user_tenant_id: str + :ivar user_name: + :vartype user_name: str + :ivar upn: + :vartype upn: str + """ + + _attribute_map = { + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + 'user_pu_id': {'key': 'userPuId', 'type': 'str'}, + 'user_idp': {'key': 'userIdp', 'type': 'str'}, + 'user_alt_sec_id': {'key': 'userAltSecId', 'type': 'str'}, + 'user_iss': {'key': 'userIss', 'type': 'str'}, + 'user_tenant_id': {'key': 'userTenantId', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword user_object_id: + :paramtype user_object_id: str + :keyword user_pu_id: + :paramtype user_pu_id: str + :keyword user_idp: + :paramtype user_idp: str + :keyword user_alt_sec_id: + :paramtype user_alt_sec_id: str + :keyword user_iss: + :paramtype user_iss: str + :keyword user_tenant_id: + :paramtype user_tenant_id: str + :keyword user_name: + :paramtype user_name: str + :keyword upn: + :paramtype upn: str + """ + super(User, self).__init__(**kwargs) + self.user_object_id = kwargs.get('user_object_id', None) + self.user_pu_id = kwargs.get('user_pu_id', None) + self.user_idp = kwargs.get('user_idp', None) + self.user_alt_sec_id = kwargs.get('user_alt_sec_id', None) + self.user_iss = kwargs.get('user_iss', None) + self.user_tenant_id = kwargs.get('user_tenant_id', None) + self.user_name = kwargs.get('user_name', None) + self.upn = kwargs.get('upn', None) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/_models_py3.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/_models_py3.py new file mode 100644 index 00000000..d44c7acc --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/models/_models_py3.py @@ -0,0 +1,2535 @@ +# 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, Union + +import msrest.serialization + +from ._azure_machine_learning_workspaces_enums import * + + +class Artifact(msrest.serialization.Model): + """Artifact. + + :ivar id: + :vartype id: str + :ivar prefix: + :vartype prefix: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'prefix': {'key': 'prefix', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + prefix: Optional[str] = None, + **kwargs + ): + """ + :keyword id: + :paramtype id: str + :keyword prefix: + :paramtype prefix: str + """ + super(Artifact, self).__init__(**kwargs) + self.id = id + self.prefix = prefix + + +class Asset(msrest.serialization.Model): + """Asset. + + All required parameters must be populated in order to send to Azure. + + :ivar id: + :vartype id: str + :ivar name: Required. + :vartype name: str + :ivar type: + :vartype type: str + :ivar description: + :vartype description: str + :ivar artifacts: + :vartype artifacts: list[~azure.mgmt.machinelearningservices.models.Artifact] + :ivar kv_tags: Dictionary of :code:`<string>`. + :vartype kv_tags: dict[str, str] + :ivar properties: Dictionary of :code:`<string>`. + :vartype properties: dict[str, str] + :ivar runid: + :vartype runid: str + :ivar projectid: + :vartype projectid: str + :ivar meta: Dictionary of :code:`<string>`. + :vartype meta: dict[str, str] + :ivar created_time: + :vartype created_time: ~datetime.datetime + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'artifacts': {'key': 'artifacts', 'type': '[Artifact]'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'runid': {'key': 'runid', 'type': 'str'}, + 'projectid': {'key': 'projectid', 'type': 'str'}, + 'meta': {'key': 'meta', 'type': '{str}'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + name: str, + id: Optional[str] = None, + type: Optional[str] = None, + description: Optional[str] = None, + artifacts: Optional[List["Artifact"]] = None, + kv_tags: Optional[Dict[str, str]] = None, + properties: Optional[Dict[str, str]] = None, + runid: Optional[str] = None, + projectid: Optional[str] = None, + meta: Optional[Dict[str, str]] = None, + created_time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword id: + :paramtype id: str + :keyword name: Required. + :paramtype name: str + :keyword type: + :paramtype type: str + :keyword description: + :paramtype description: str + :keyword artifacts: + :paramtype artifacts: list[~azure.mgmt.machinelearningservices.models.Artifact] + :keyword kv_tags: Dictionary of :code:`<string>`. + :paramtype kv_tags: dict[str, str] + :keyword properties: Dictionary of :code:`<string>`. + :paramtype properties: dict[str, str] + :keyword runid: + :paramtype runid: str + :keyword projectid: + :paramtype projectid: str + :keyword meta: Dictionary of :code:`<string>`. + :paramtype meta: dict[str, str] + :keyword created_time: + :paramtype created_time: ~datetime.datetime + """ + super(Asset, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.description = description + self.artifacts = artifacts + self.kv_tags = kv_tags + self.properties = properties + self.runid = runid + self.projectid = projectid + self.meta = meta + self.created_time = created_time + + +class AssetDto(msrest.serialization.Model): + """AssetDto. + + :ivar asset_id: + :vartype asset_id: str + :ivar entity_id: + :vartype entity_id: str + :ivar data_items: Dictionary of :code:`<DataItem>`. + :vartype data_items: dict[str, ~azure.mgmt.machinelearningservices.models.DataItem] + :ivar data_references: + :vartype data_references: ~azure.mgmt.machinelearningservices.models.DataReferences + :ivar should_index: + :vartype should_index: bool + :ivar dependencies: + :vartype dependencies: list[~azure.mgmt.machinelearningservices.models.DependentAsset] + :ivar intellectual_property_publisher_information: + :vartype intellectual_property_publisher_information: + ~azure.mgmt.machinelearningservices.models.IntellectualPropertyPublisherInformation + """ + + _attribute_map = { + 'asset_id': {'key': 'assetId', 'type': 'str'}, + 'entity_id': {'key': 'entityId', 'type': 'str'}, + 'data_items': {'key': 'dataItems', 'type': '{DataItem}'}, + 'data_references': {'key': 'dataReferences', 'type': 'DataReferences'}, + 'should_index': {'key': 'shouldIndex', 'type': 'bool'}, + 'dependencies': {'key': 'dependencies', 'type': '[DependentAsset]'}, + 'intellectual_property_publisher_information': {'key': 'intellectualPropertyPublisherInformation', 'type': 'IntellectualPropertyPublisherInformation'}, + } + + def __init__( + self, + *, + asset_id: Optional[str] = None, + entity_id: Optional[str] = None, + data_items: Optional[Dict[str, "DataItem"]] = None, + data_references: Optional["DataReferences"] = None, + should_index: Optional[bool] = None, + dependencies: Optional[List["DependentAsset"]] = None, + intellectual_property_publisher_information: Optional["IntellectualPropertyPublisherInformation"] = None, + **kwargs + ): + """ + :keyword asset_id: + :paramtype asset_id: str + :keyword entity_id: + :paramtype entity_id: str + :keyword data_items: Dictionary of :code:`<DataItem>`. + :paramtype data_items: dict[str, ~azure.mgmt.machinelearningservices.models.DataItem] + :keyword data_references: + :paramtype data_references: ~azure.mgmt.machinelearningservices.models.DataReferences + :keyword should_index: + :paramtype should_index: bool + :keyword dependencies: + :paramtype dependencies: list[~azure.mgmt.machinelearningservices.models.DependentAsset] + :keyword intellectual_property_publisher_information: + :paramtype intellectual_property_publisher_information: + ~azure.mgmt.machinelearningservices.models.IntellectualPropertyPublisherInformation + """ + super(AssetDto, self).__init__(**kwargs) + self.asset_id = asset_id + self.entity_id = entity_id + self.data_items = data_items + self.data_references = data_references + self.should_index = should_index + self.dependencies = dependencies + self.intellectual_property_publisher_information = intellectual_property_publisher_information + + +class AssetPaginatedResult(msrest.serialization.Model): + """AssetPaginatedResult. + + :ivar value: + :vartype value: list[~azure.mgmt.machinelearningservices.models.Asset] + :ivar continuation_token: + :vartype continuation_token: str + :ivar next_link: + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Asset]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Asset"]] = None, + continuation_token: Optional[str] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.machinelearningservices.models.Asset] + :keyword continuation_token: + :paramtype continuation_token: str + :keyword next_link: + :paramtype next_link: str + """ + super(AssetPaginatedResult, self).__init__(**kwargs) + self.value = value + self.continuation_token = continuation_token + self.next_link = next_link + + +class BatchGetResolvedUrisDto(msrest.serialization.Model): + """BatchGetResolvedUrisDto. + + :ivar values: + :vartype values: list[str] + """ + + _attribute_map = { + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__( + self, + *, + values: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword values: + :paramtype values: list[str] + """ + super(BatchGetResolvedUrisDto, self).__init__(**kwargs) + self.values = values + + +class BatchModelPathResponseDto(msrest.serialization.Model): + """BatchModelPathResponseDto. + + :ivar values: Dictionary of :code:`<ModelPathResponseDto>`. + :vartype values: dict[str, ~azure.mgmt.machinelearningservices.models.ModelPathResponseDto] + """ + + _attribute_map = { + 'values': {'key': 'values', 'type': '{ModelPathResponseDto}'}, + } + + def __init__( + self, + *, + values: Optional[Dict[str, "ModelPathResponseDto"]] = None, + **kwargs + ): + """ + :keyword values: Dictionary of :code:`<ModelPathResponseDto>`. + :paramtype values: dict[str, ~azure.mgmt.machinelearningservices.models.ModelPathResponseDto] + """ + super(BatchModelPathResponseDto, self).__init__(**kwargs) + self.values = values + + +class BlobReference(msrest.serialization.Model): + """BlobReference. + + :ivar blob_uri: + :vartype blob_uri: str + :ivar storage_account_arm_id: + :vartype storage_account_arm_id: str + """ + + _attribute_map = { + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'storage_account_arm_id': {'key': 'storageAccountArmId', 'type': 'str'}, + } + + def __init__( + self, + *, + blob_uri: Optional[str] = None, + storage_account_arm_id: Optional[str] = None, + **kwargs + ): + """ + :keyword blob_uri: + :paramtype blob_uri: str + :keyword storage_account_arm_id: + :paramtype storage_account_arm_id: str + """ + super(BlobReference, self).__init__(**kwargs) + self.blob_uri = blob_uri + self.storage_account_arm_id = storage_account_arm_id + + +class BlobReferenceForConsumptionDto(msrest.serialization.Model): + """BlobReferenceForConsumptionDto. + + :ivar blob_uri: + :vartype blob_uri: str + :ivar storage_account_arm_id: + :vartype storage_account_arm_id: str + :ivar credential: + :vartype credential: ~azure.mgmt.machinelearningservices.models.DataReferenceCredentialDto + """ + + _attribute_map = { + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'storage_account_arm_id': {'key': 'storageAccountArmId', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'DataReferenceCredentialDto'}, + } + + def __init__( + self, + *, + blob_uri: Optional[str] = None, + storage_account_arm_id: Optional[str] = None, + credential: Optional["DataReferenceCredentialDto"] = None, + **kwargs + ): + """ + :keyword blob_uri: + :paramtype blob_uri: str + :keyword storage_account_arm_id: + :paramtype storage_account_arm_id: str + :keyword credential: + :paramtype credential: ~azure.mgmt.machinelearningservices.models.DataReferenceCredentialDto + """ + super(BlobReferenceForConsumptionDto, self).__init__(**kwargs) + self.blob_uri = blob_uri + self.storage_account_arm_id = storage_account_arm_id + self.credential = credential + + +class ContainerResourceRequirements(msrest.serialization.Model): + """ContainerResourceRequirements. + + :ivar cpu: + :vartype cpu: float + :ivar cpu_limit: + :vartype cpu_limit: float + :ivar memory_in_gb: + :vartype memory_in_gb: float + :ivar memory_in_gb_limit: + :vartype memory_in_gb_limit: float + :ivar gpu_enabled: + :vartype gpu_enabled: bool + :ivar gpu: + :vartype gpu: int + :ivar fpga: + :vartype fpga: int + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'float'}, + 'cpu_limit': {'key': 'cpuLimit', 'type': 'float'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'memory_in_gb_limit': {'key': 'memoryInGBLimit', 'type': 'float'}, + 'gpu_enabled': {'key': 'gpuEnabled', 'type': 'bool'}, + 'gpu': {'key': 'gpu', 'type': 'int'}, + 'fpga': {'key': 'fpga', 'type': 'int'}, + } + + def __init__( + self, + *, + cpu: Optional[float] = None, + cpu_limit: Optional[float] = None, + memory_in_gb: Optional[float] = None, + memory_in_gb_limit: Optional[float] = None, + gpu_enabled: Optional[bool] = None, + gpu: Optional[int] = None, + fpga: Optional[int] = None, + **kwargs + ): + """ + :keyword cpu: + :paramtype cpu: float + :keyword cpu_limit: + :paramtype cpu_limit: float + :keyword memory_in_gb: + :paramtype memory_in_gb: float + :keyword memory_in_gb_limit: + :paramtype memory_in_gb_limit: float + :keyword gpu_enabled: + :paramtype gpu_enabled: bool + :keyword gpu: + :paramtype gpu: int + :keyword fpga: + :paramtype fpga: int + """ + super(ContainerResourceRequirements, self).__init__(**kwargs) + self.cpu = cpu + self.cpu_limit = cpu_limit + self.memory_in_gb = memory_in_gb + self.memory_in_gb_limit = memory_in_gb_limit + self.gpu_enabled = gpu_enabled + self.gpu = gpu + self.fpga = fpga + + +class CreatedBy(msrest.serialization.Model): + """CreatedBy. + + :ivar user_object_id: + :vartype user_object_id: str + :ivar user_tenant_id: + :vartype user_tenant_id: str + :ivar user_name: + :vartype user_name: str + """ + + _attribute_map = { + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + 'user_tenant_id': {'key': 'userTenantId', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + } + + def __init__( + self, + *, + user_object_id: Optional[str] = None, + user_tenant_id: Optional[str] = None, + user_name: Optional[str] = None, + **kwargs + ): + """ + :keyword user_object_id: + :paramtype user_object_id: str + :keyword user_tenant_id: + :paramtype user_tenant_id: str + :keyword user_name: + :paramtype user_name: str + """ + super(CreatedBy, self).__init__(**kwargs) + self.user_object_id = user_object_id + self.user_tenant_id = user_tenant_id + self.user_name = user_name + + +class CreateUnregisteredInputModelDto(msrest.serialization.Model): + """CreateUnregisteredInputModelDto. + + :ivar run_id: + :vartype run_id: str + :ivar input_name: + :vartype input_name: str + :ivar path: + :vartype path: str + :ivar type: + :vartype type: str + """ + + _attribute_map = { + 'run_id': {'key': 'runId', 'type': 'str'}, + 'input_name': {'key': 'inputName', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + run_id: Optional[str] = None, + input_name: Optional[str] = None, + path: Optional[str] = None, + type: Optional[str] = None, + **kwargs + ): + """ + :keyword run_id: + :paramtype run_id: str + :keyword input_name: + :paramtype input_name: str + :keyword path: + :paramtype path: str + :keyword type: + :paramtype type: str + """ + super(CreateUnregisteredInputModelDto, self).__init__(**kwargs) + self.run_id = run_id + self.input_name = input_name + self.path = path + self.type = type + + +class CreateUnregisteredOutputModelDto(msrest.serialization.Model): + """CreateUnregisteredOutputModelDto. + + :ivar run_id: + :vartype run_id: str + :ivar output_name: + :vartype output_name: str + :ivar path: + :vartype path: str + :ivar type: + :vartype type: str + """ + + _attribute_map = { + 'run_id': {'key': 'runId', 'type': 'str'}, + 'output_name': {'key': 'outputName', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + run_id: Optional[str] = None, + output_name: Optional[str] = None, + path: Optional[str] = None, + type: Optional[str] = None, + **kwargs + ): + """ + :keyword run_id: + :paramtype run_id: str + :keyword output_name: + :paramtype output_name: str + :keyword path: + :paramtype path: str + :keyword type: + :paramtype type: str + """ + super(CreateUnregisteredOutputModelDto, self).__init__(**kwargs) + self.run_id = run_id + self.output_name = output_name + self.path = path + self.type = type + + +class CreationContext(msrest.serialization.Model): + """CreationContext. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar created_time: + :vartype created_time: ~datetime.datetime + :ivar created_by: + :vartype created_by: ~azure.mgmt.machinelearningservices.models.CreatedBy + :ivar creation_source: + :vartype creation_source: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'CreatedBy'}, + 'creation_source': {'key': 'creationSource', 'type': 'str'}, + } + + def __init__( + self, + *, + additional_properties: Optional[Dict[str, Any]] = None, + created_time: Optional[datetime.datetime] = None, + created_by: Optional["CreatedBy"] = None, + creation_source: Optional[str] = None, + **kwargs + ): + """ + :keyword additional_properties: Unmatched properties from the message are deserialized to this + collection. + :paramtype additional_properties: dict[str, any] + :keyword created_time: + :paramtype created_time: ~datetime.datetime + :keyword created_by: + :paramtype created_by: ~azure.mgmt.machinelearningservices.models.CreatedBy + :keyword creation_source: + :paramtype creation_source: str + """ + super(CreationContext, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.created_time = created_time + self.created_by = created_by + self.creation_source = creation_source + + +class DataItem(msrest.serialization.Model): + """DataItem. + + :ivar data: Anything. + :vartype data: any + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': 'object'}, + } + + def __init__( + self, + *, + data: Optional[Any] = None, + **kwargs + ): + """ + :keyword data: Anything. + :paramtype data: any + """ + super(DataItem, self).__init__(**kwargs) + self.data = data + + +class DataReferenceCredentialDto(msrest.serialization.Model): + """DataReferenceCredentialDto. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar credential_type: + :vartype credential_type: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'credential_type': {'key': 'credentialType', 'type': 'str'}, + } + + def __init__( + self, + *, + additional_properties: Optional[Dict[str, Any]] = None, + credential_type: Optional[str] = None, + **kwargs + ): + """ + :keyword additional_properties: Unmatched properties from the message are deserialized to this + collection. + :paramtype additional_properties: dict[str, any] + :keyword credential_type: + :paramtype credential_type: str + """ + super(DataReferenceCredentialDto, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.credential_type = credential_type + + +class DataReferences(msrest.serialization.Model): + """DataReferences. + + :ivar blob_references: Dictionary of :code:`<BlobReference>`. + :vartype blob_references: dict[str, ~azure.mgmt.machinelearningservices.models.BlobReference] + :ivar image_registry_references: Dictionary of :code:`<ImageReference>`. + :vartype image_registry_references: dict[str, + ~azure.mgmt.machinelearningservices.models.ImageReference] + """ + + _attribute_map = { + 'blob_references': {'key': 'blobReferences', 'type': '{BlobReference}'}, + 'image_registry_references': {'key': 'imageRegistryReferences', 'type': '{ImageReference}'}, + } + + def __init__( + self, + *, + blob_references: Optional[Dict[str, "BlobReference"]] = None, + image_registry_references: Optional[Dict[str, "ImageReference"]] = None, + **kwargs + ): + """ + :keyword blob_references: Dictionary of :code:`<BlobReference>`. + :paramtype blob_references: dict[str, ~azure.mgmt.machinelearningservices.models.BlobReference] + :keyword image_registry_references: Dictionary of :code:`<ImageReference>`. + :paramtype image_registry_references: dict[str, + ~azure.mgmt.machinelearningservices.models.ImageReference] + """ + super(DataReferences, self).__init__(**kwargs) + self.blob_references = blob_references + self.image_registry_references = image_registry_references + + +class DataReferencesForConsumptionDto(msrest.serialization.Model): + """DataReferencesForConsumptionDto. + + :ivar blob_references: Dictionary of :code:`<BlobReferenceForConsumptionDto>`. + :vartype blob_references: dict[str, + ~azure.mgmt.machinelearningservices.models.BlobReferenceForConsumptionDto] + :ivar image_registry_references: Dictionary of :code:`<ImageReferenceForConsumptionDto>`. + :vartype image_registry_references: dict[str, + ~azure.mgmt.machinelearningservices.models.ImageReferenceForConsumptionDto] + """ + + _attribute_map = { + 'blob_references': {'key': 'blobReferences', 'type': '{BlobReferenceForConsumptionDto}'}, + 'image_registry_references': {'key': 'imageRegistryReferences', 'type': '{ImageReferenceForConsumptionDto}'}, + } + + def __init__( + self, + *, + blob_references: Optional[Dict[str, "BlobReferenceForConsumptionDto"]] = None, + image_registry_references: Optional[Dict[str, "ImageReferenceForConsumptionDto"]] = None, + **kwargs + ): + """ + :keyword blob_references: Dictionary of :code:`<BlobReferenceForConsumptionDto>`. + :paramtype blob_references: dict[str, + ~azure.mgmt.machinelearningservices.models.BlobReferenceForConsumptionDto] + :keyword image_registry_references: Dictionary of :code:`<ImageReferenceForConsumptionDto>`. + :paramtype image_registry_references: dict[str, + ~azure.mgmt.machinelearningservices.models.ImageReferenceForConsumptionDto] + """ + super(DataReferencesForConsumptionDto, self).__init__(**kwargs) + self.blob_references = blob_references + self.image_registry_references = image_registry_references + + +class DatasetReference(msrest.serialization.Model): + """DatasetReference. + + :ivar name: + :vartype name: str + :ivar id: + :vartype id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword id: + :paramtype id: str + """ + super(DatasetReference, self).__init__(**kwargs) + self.name = name + self.id = id + + +class DependencyMapDto(msrest.serialization.Model): + """DependencyMapDto. + + :ivar dependencies: + :vartype dependencies: list[~azure.mgmt.machinelearningservices.models.DependencyMapItemDto] + """ + + _attribute_map = { + 'dependencies': {'key': 'dependencies', 'type': '[DependencyMapItemDto]'}, + } + + def __init__( + self, + *, + dependencies: Optional[List["DependencyMapItemDto"]] = None, + **kwargs + ): + """ + :keyword dependencies: + :paramtype dependencies: list[~azure.mgmt.machinelearningservices.models.DependencyMapItemDto] + """ + super(DependencyMapDto, self).__init__(**kwargs) + self.dependencies = dependencies + + +class DependencyMapItemDto(msrest.serialization.Model): + """DependencyMapItemDto. + + :ivar source_id: + :vartype source_id: str + :ivar destination_id: + :vartype destination_id: str + """ + + _attribute_map = { + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'destination_id': {'key': 'destinationId', 'type': 'str'}, + } + + def __init__( + self, + *, + source_id: Optional[str] = None, + destination_id: Optional[str] = None, + **kwargs + ): + """ + :keyword source_id: + :paramtype source_id: str + :keyword destination_id: + :paramtype destination_id: str + """ + super(DependencyMapItemDto, self).__init__(**kwargs) + self.source_id = source_id + self.destination_id = destination_id + + +class DependentAsset(msrest.serialization.Model): + """DependentAsset. + + :ivar asset_id: + :vartype asset_id: str + """ + + _attribute_map = { + 'asset_id': {'key': 'assetId', 'type': 'str'}, + } + + def __init__( + self, + *, + asset_id: Optional[str] = None, + **kwargs + ): + """ + :keyword asset_id: + :paramtype asset_id: str + """ + super(DependentAsset, self).__init__(**kwargs) + self.asset_id = asset_id + + +class DependentEntitiesDto(msrest.serialization.Model): + """DependentEntitiesDto. + + :ivar asset_id: + :vartype asset_id: str + :ivar dependencies: + :vartype dependencies: list[~azure.mgmt.machinelearningservices.models.DependentAsset] + """ + + _attribute_map = { + 'asset_id': {'key': 'assetId', 'type': 'str'}, + 'dependencies': {'key': 'dependencies', 'type': '[DependentAsset]'}, + } + + def __init__( + self, + *, + asset_id: Optional[str] = None, + dependencies: Optional[List["DependentAsset"]] = None, + **kwargs + ): + """ + :keyword asset_id: + :paramtype asset_id: str + :keyword dependencies: + :paramtype dependencies: list[~azure.mgmt.machinelearningservices.models.DependentAsset] + """ + super(DependentEntitiesDto, self).__init__(**kwargs) + self.asset_id = asset_id + self.dependencies = dependencies + + +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + :ivar code: + :vartype code: str + :ivar status_code: + :vartype status_code: int + :ivar message: + :vartype message: str + :ivar target: + :vartype target: str + :ivar details: + :vartype details: list[~azure.mgmt.machinelearningservices.models.InnerErrorDetails] + :ivar correlation: Dictionary of :code:`<string>`. + :vartype correlation: dict[str, str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[InnerErrorDetails]'}, + 'correlation': {'key': 'correlation', 'type': '{str}'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + status_code: Optional[int] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["InnerErrorDetails"]] = None, + correlation: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword code: + :paramtype code: str + :keyword status_code: + :paramtype status_code: int + :keyword message: + :paramtype message: str + :keyword target: + :paramtype target: str + :keyword details: + :paramtype details: list[~azure.mgmt.machinelearningservices.models.InnerErrorDetails] + :keyword correlation: Dictionary of :code:`<string>`. + :paramtype correlation: dict[str, str] + """ + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.status_code = status_code + self.message = message + self.target = target + self.details = details + self.correlation = correlation + + +class ExtensiveModel(msrest.serialization.Model): + """ExtensiveModel. + + :ivar model: + :vartype model: ~azure.mgmt.machinelearningservices.models.Model + :ivar service_list: + :vartype service_list: list[~azure.mgmt.machinelearningservices.models.ServiceResponseBase] + :ivar asset_list: + :vartype asset_list: list[~azure.mgmt.machinelearningservices.models.Asset] + """ + + _attribute_map = { + 'model': {'key': 'Model', 'type': 'Model'}, + 'service_list': {'key': 'ServiceList', 'type': '[ServiceResponseBase]'}, + 'asset_list': {'key': 'AssetList', 'type': '[Asset]'}, + } + + def __init__( + self, + *, + model: Optional["Model"] = None, + service_list: Optional[List["ServiceResponseBase"]] = None, + asset_list: Optional[List["Asset"]] = None, + **kwargs + ): + """ + :keyword model: + :paramtype model: ~azure.mgmt.machinelearningservices.models.Model + :keyword service_list: + :paramtype service_list: list[~azure.mgmt.machinelearningservices.models.ServiceResponseBase] + :keyword asset_list: + :paramtype asset_list: list[~azure.mgmt.machinelearningservices.models.Asset] + """ + super(ExtensiveModel, self).__init__(**kwargs) + self.model = model + self.service_list = service_list + self.asset_list = asset_list + + +class FeedIndexEntityDto(msrest.serialization.Model): + """FeedIndexEntityDto. + + :ivar index_entity: + :vartype index_entity: ~azure.mgmt.machinelearningservices.models.IndexEntity + :ivar schema_id: + :vartype schema_id: str + :ivar entity_schema: Anything. + :vartype entity_schema: any + """ + + _attribute_map = { + 'index_entity': {'key': 'indexEntity', 'type': 'IndexEntity'}, + 'schema_id': {'key': 'schemaId', 'type': 'str'}, + 'entity_schema': {'key': 'entitySchema', 'type': 'object'}, + } + + def __init__( + self, + *, + index_entity: Optional["IndexEntity"] = None, + schema_id: Optional[str] = None, + entity_schema: Optional[Any] = None, + **kwargs + ): + """ + :keyword index_entity: + :paramtype index_entity: ~azure.mgmt.machinelearningservices.models.IndexEntity + :keyword schema_id: + :paramtype schema_id: str + :keyword entity_schema: Anything. + :paramtype entity_schema: any + """ + super(FeedIndexEntityDto, self).__init__(**kwargs) + self.index_entity = index_entity + self.schema_id = schema_id + self.entity_schema = entity_schema + + +class FeedIndexEntityRequestDto(msrest.serialization.Model): + """FeedIndexEntityRequestDto. + + :ivar feed_entity: + :vartype feed_entity: ~azure.mgmt.machinelearningservices.models.AssetDto + :ivar label_to_version_mapping: Dictionary of :code:`<string>`. + :vartype label_to_version_mapping: dict[str, str] + """ + + _attribute_map = { + 'feed_entity': {'key': 'feedEntity', 'type': 'AssetDto'}, + 'label_to_version_mapping': {'key': 'labelToVersionMapping', 'type': '{str}'}, + } + + def __init__( + self, + *, + feed_entity: Optional["AssetDto"] = None, + label_to_version_mapping: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword feed_entity: + :paramtype feed_entity: ~azure.mgmt.machinelearningservices.models.AssetDto + :keyword label_to_version_mapping: Dictionary of :code:`<string>`. + :paramtype label_to_version_mapping: dict[str, str] + """ + super(FeedIndexEntityRequestDto, self).__init__(**kwargs) + self.feed_entity = feed_entity + self.label_to_version_mapping = label_to_version_mapping + + +class ImageReference(msrest.serialization.Model): + """ImageReference. + + :ivar image_registry_reference: + :vartype image_registry_reference: str + """ + + _attribute_map = { + 'image_registry_reference': {'key': 'imageRegistryReference', 'type': 'str'}, + } + + def __init__( + self, + *, + image_registry_reference: Optional[str] = None, + **kwargs + ): + """ + :keyword image_registry_reference: + :paramtype image_registry_reference: str + """ + super(ImageReference, self).__init__(**kwargs) + self.image_registry_reference = image_registry_reference + + +class ImageReferenceForConsumptionDto(msrest.serialization.Model): + """ImageReferenceForConsumptionDto. + + :ivar image_registry_reference: + :vartype image_registry_reference: str + :ivar credential: + :vartype credential: ~azure.mgmt.machinelearningservices.models.DataReferenceCredentialDto + """ + + _attribute_map = { + 'image_registry_reference': {'key': 'imageRegistryReference', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'DataReferenceCredentialDto'}, + } + + def __init__( + self, + *, + image_registry_reference: Optional[str] = None, + credential: Optional["DataReferenceCredentialDto"] = None, + **kwargs + ): + """ + :keyword image_registry_reference: + :paramtype image_registry_reference: str + :keyword credential: + :paramtype credential: ~azure.mgmt.machinelearningservices.models.DataReferenceCredentialDto + """ + super(ImageReferenceForConsumptionDto, self).__init__(**kwargs) + self.image_registry_reference = image_registry_reference + self.credential = credential + + +class IndexAnnotations(msrest.serialization.Model): + """IndexAnnotations. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar archived: + :vartype archived: bool + :ivar tags: A set of tags. Dictionary of :code:`<string>`. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'archived': {'key': 'archived', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + additional_properties: Optional[Dict[str, Any]] = None, + archived: Optional[bool] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword additional_properties: Unmatched properties from the message are deserialized to this + collection. + :paramtype additional_properties: dict[str, any] + :keyword archived: + :paramtype archived: bool + :keyword tags: A set of tags. Dictionary of :code:`<string>`. + :paramtype tags: dict[str, str] + """ + super(IndexAnnotations, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.archived = archived + self.tags = tags + + +class IndexEntity(msrest.serialization.Model): + """IndexEntity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar schema_id: + :vartype schema_id: str + :ivar entity_id: + :vartype entity_id: str + :ivar kind: Possible values include: "Invalid", "LineageRoot", "Versioned", "Unversioned". + :vartype kind: str or ~azure.mgmt.machinelearningservices.models.EntityKind + :ivar annotations: + :vartype annotations: ~azure.mgmt.machinelearningservices.models.IndexAnnotations + :ivar properties: + :vartype properties: ~azure.mgmt.machinelearningservices.models.IndexProperties + :ivar internal: Dictionary of :code:`<any>`. + :vartype internal: dict[str, any] + :ivar update_sequence: + :vartype update_sequence: long + :ivar type: + :vartype type: str + :ivar version: + :vartype version: str + :ivar entity_container_id: + :vartype entity_container_id: str + :ivar entity_object_id: + :vartype entity_object_id: str + :ivar resource_type: + :vartype resource_type: str + :ivar relationships: + :vartype relationships: list[~azure.mgmt.machinelearningservices.models.Relationship] + :ivar asset_id: + :vartype asset_id: str + """ + + _validation = { + 'version': {'readonly': True}, + 'entity_container_id': {'readonly': True}, + 'entity_object_id': {'readonly': True}, + 'resource_type': {'readonly': True}, + } + + _attribute_map = { + 'schema_id': {'key': 'schemaId', 'type': 'str'}, + 'entity_id': {'key': 'entityId', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': 'IndexAnnotations'}, + 'properties': {'key': 'properties', 'type': 'IndexProperties'}, + 'internal': {'key': 'internal', 'type': '{object}'}, + 'update_sequence': {'key': 'updateSequence', 'type': 'long'}, + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'entity_container_id': {'key': 'entityContainerId', 'type': 'str'}, + 'entity_object_id': {'key': 'entityObjectId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'relationships': {'key': 'relationships', 'type': '[Relationship]'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + } + + def __init__( + self, + *, + schema_id: Optional[str] = None, + entity_id: Optional[str] = None, + kind: Optional[Union[str, "EntityKind"]] = None, + annotations: Optional["IndexAnnotations"] = None, + properties: Optional["IndexProperties"] = None, + internal: Optional[Dict[str, Any]] = None, + update_sequence: Optional[int] = None, + type: Optional[str] = None, + relationships: Optional[List["Relationship"]] = None, + asset_id: Optional[str] = None, + **kwargs + ): + """ + :keyword schema_id: + :paramtype schema_id: str + :keyword entity_id: + :paramtype entity_id: str + :keyword kind: Possible values include: "Invalid", "LineageRoot", "Versioned", "Unversioned". + :paramtype kind: str or ~azure.mgmt.machinelearningservices.models.EntityKind + :keyword annotations: + :paramtype annotations: ~azure.mgmt.machinelearningservices.models.IndexAnnotations + :keyword properties: + :paramtype properties: ~azure.mgmt.machinelearningservices.models.IndexProperties + :keyword internal: Dictionary of :code:`<any>`. + :paramtype internal: dict[str, any] + :keyword update_sequence: + :paramtype update_sequence: long + :keyword type: + :paramtype type: str + :keyword relationships: + :paramtype relationships: list[~azure.mgmt.machinelearningservices.models.Relationship] + :keyword asset_id: + :paramtype asset_id: str + """ + super(IndexEntity, self).__init__(**kwargs) + self.schema_id = schema_id + self.entity_id = entity_id + self.kind = kind + self.annotations = annotations + self.properties = properties + self.internal = internal + self.update_sequence = update_sequence + self.type = type + self.version = None + self.entity_container_id = None + self.entity_object_id = None + self.resource_type = None + self.relationships = relationships + self.asset_id = asset_id + + +class IndexProperties(msrest.serialization.Model): + """IndexProperties. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar creation_context: + :vartype creation_context: ~azure.mgmt.machinelearningservices.models.CreationContext + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'creation_context': {'key': 'creationContext', 'type': 'CreationContext'}, + } + + def __init__( + self, + *, + additional_properties: Optional[Dict[str, Any]] = None, + creation_context: Optional["CreationContext"] = None, + **kwargs + ): + """ + :keyword additional_properties: Unmatched properties from the message are deserialized to this + collection. + :paramtype additional_properties: dict[str, any] + :keyword creation_context: + :paramtype creation_context: ~azure.mgmt.machinelearningservices.models.CreationContext + """ + super(IndexProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.creation_context = creation_context + + +class InnerErrorDetails(msrest.serialization.Model): + """InnerErrorDetails. + + :ivar code: + :vartype code: str + :ivar message: + :vartype message: str + :ivar target: + :vartype target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + **kwargs + ): + """ + :keyword code: + :paramtype code: str + :keyword message: + :paramtype message: str + :keyword target: + :paramtype target: str + """ + super(InnerErrorDetails, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + + +class IntellectualPropertyPublisherInformation(msrest.serialization.Model): + """IntellectualPropertyPublisherInformation. + + :ivar intellectual_property_publisher: + :vartype intellectual_property_publisher: str + """ + + _attribute_map = { + 'intellectual_property_publisher': {'key': 'intellectualPropertyPublisher', 'type': 'str'}, + } + + def __init__( + self, + *, + intellectual_property_publisher: Optional[str] = None, + **kwargs + ): + """ + :keyword intellectual_property_publisher: + :paramtype intellectual_property_publisher: str + """ + super(IntellectualPropertyPublisherInformation, self).__init__(**kwargs) + self.intellectual_property_publisher = intellectual_property_publisher + + +class ListModelsRequest(msrest.serialization.Model): + """ListModelsRequest. + + :ivar name: + :vartype name: str + :ivar tag: + :vartype tag: str + :ivar version: + :vartype version: str + :ivar framework: + :vartype framework: str + :ivar description: + :vartype description: str + :ivar count: + :vartype count: int + :ivar offset: + :vartype offset: int + :ivar skip_token: + :vartype skip_token: str + :ivar tags: A set of tags. + :vartype tags: str + :ivar properties: + :vartype properties: str + :ivar run_id: + :vartype run_id: str + :ivar dataset_id: + :vartype dataset_id: str + :ivar order_by: Possible values include: "CreatedAtDesc", "CreatedAtAsc", "UpdatedAtDesc", + "UpdatedAtAsc". + :vartype order_by: str or ~azure.mgmt.machinelearningservices.models.OrderString + :ivar latest_version_only: + :vartype latest_version_only: bool + :ivar modified_after: + :vartype modified_after: ~datetime.datetime + :ivar modified_before: + :vartype modified_before: ~datetime.datetime + :ivar list_view_type: Possible values include: "ActiveOnly", "ArchivedOnly", "All". + :vartype list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'framework': {'key': 'framework', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'dataset_id': {'key': 'datasetId', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'str'}, + 'latest_version_only': {'key': 'latestVersionOnly', 'type': 'bool'}, + 'modified_after': {'key': 'modifiedAfter', 'type': 'iso-8601'}, + 'modified_before': {'key': 'modifiedBefore', 'type': 'iso-8601'}, + 'list_view_type': {'key': 'listViewType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + tag: Optional[str] = None, + version: Optional[str] = None, + framework: Optional[str] = None, + description: Optional[str] = None, + count: Optional[int] = None, + offset: Optional[int] = None, + skip_token: Optional[str] = None, + tags: Optional[str] = None, + properties: Optional[str] = None, + run_id: Optional[str] = None, + dataset_id: Optional[str] = None, + order_by: Optional[Union[str, "OrderString"]] = None, + latest_version_only: Optional[bool] = None, + modified_after: Optional[datetime.datetime] = None, + modified_before: Optional[datetime.datetime] = None, + list_view_type: Optional[Union[str, "ListViewType"]] = None, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword tag: + :paramtype tag: str + :keyword version: + :paramtype version: str + :keyword framework: + :paramtype framework: str + :keyword description: + :paramtype description: str + :keyword count: + :paramtype count: int + :keyword offset: + :paramtype offset: int + :keyword skip_token: + :paramtype skip_token: str + :keyword tags: A set of tags. + :paramtype tags: str + :keyword properties: + :paramtype properties: str + :keyword run_id: + :paramtype run_id: str + :keyword dataset_id: + :paramtype dataset_id: str + :keyword order_by: Possible values include: "CreatedAtDesc", "CreatedAtAsc", "UpdatedAtDesc", + "UpdatedAtAsc". + :paramtype order_by: str or ~azure.mgmt.machinelearningservices.models.OrderString + :keyword latest_version_only: + :paramtype latest_version_only: bool + :keyword modified_after: + :paramtype modified_after: ~datetime.datetime + :keyword modified_before: + :paramtype modified_before: ~datetime.datetime + :keyword list_view_type: Possible values include: "ActiveOnly", "ArchivedOnly", "All". + :paramtype list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + """ + super(ListModelsRequest, self).__init__(**kwargs) + self.name = name + self.tag = tag + self.version = version + self.framework = framework + self.description = description + self.count = count + self.offset = offset + self.skip_token = skip_token + self.tags = tags + self.properties = properties + self.run_id = run_id + self.dataset_id = dataset_id + self.order_by = order_by + self.latest_version_only = latest_version_only + self.modified_after = modified_after + self.modified_before = modified_before + self.list_view_type = list_view_type + + +class Model(msrest.serialization.Model): + """Model. + + All required parameters must be populated in order to send to Azure. + + :ivar id: + :vartype id: str + :ivar name: Required. + :vartype name: str + :ivar framework: + :vartype framework: str + :ivar framework_version: + :vartype framework_version: str + :ivar version: + :vartype version: long + :ivar tags: A set of tags. + :vartype tags: list[str] + :ivar datasets: + :vartype datasets: list[~azure.mgmt.machinelearningservices.models.DatasetReference] + :ivar url: + :vartype url: str + :ivar mime_type: Required. + :vartype mime_type: str + :ivar description: + :vartype description: str + :ivar created_time: + :vartype created_time: ~datetime.datetime + :ivar modified_time: + :vartype modified_time: ~datetime.datetime + :ivar unpack: + :vartype unpack: bool + :ivar parent_model_id: + :vartype parent_model_id: str + :ivar run_id: + :vartype run_id: str + :ivar experiment_name: + :vartype experiment_name: str + :ivar kv_tags: Dictionary of :code:`<string>`. + :vartype kv_tags: dict[str, str] + :ivar properties: Dictionary of :code:`<string>`. + :vartype properties: dict[str, str] + :ivar derived_model_ids: + :vartype derived_model_ids: list[str] + :ivar inputs_schema: + :vartype inputs_schema: list[~azure.mgmt.machinelearningservices.models.ModelSchema] + :ivar outputs_schema: + :vartype outputs_schema: list[~azure.mgmt.machinelearningservices.models.ModelSchema] + :ivar sample_input_data: + :vartype sample_input_data: str + :ivar sample_output_data: + :vartype sample_output_data: str + :ivar resource_requirements: + :vartype resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :ivar created_by: + :vartype created_by: ~azure.mgmt.machinelearningservices.models.User + :ivar modified_by: + :vartype modified_by: ~azure.mgmt.machinelearningservices.models.User + :ivar flavors: Dictionary of + <components·8urbg9·schemas·model·properties·flavors·additionalproperties>. + :vartype flavors: dict[str, dict[str, str]] + :ivar model_format: Possible values include: "CUSTOM", "MLFLOW", "TRITON", "PRESETS". + :vartype model_format: str or ~azure.mgmt.machinelearningservices.models.ModelFormatEnum + :ivar stage: + :vartype stage: str + :ivar model_container_id: + :vartype model_container_id: str + :ivar mms_id: + :vartype mms_id: str + :ivar default_deployment_settings: + :vartype default_deployment_settings: + ~azure.mgmt.machinelearningservices.models.ModelDeploymentSettings + :ivar is_anonymous: + :vartype is_anonymous: bool + :ivar is_archived: + :vartype is_archived: bool + :ivar is_registered: + :vartype is_registered: bool + :ivar data_path: + :vartype data_path: str + :ivar model_type: + :vartype model_type: str + :ivar asset_id: + :vartype asset_id: str + """ + + _validation = { + 'name': {'required': True}, + 'mime_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'framework': {'key': 'framework', 'type': 'str'}, + 'framework_version': {'key': 'frameworkVersion', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'long'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'datasets': {'key': 'datasets', 'type': '[DatasetReference]'}, + 'url': {'key': 'url', 'type': 'str'}, + 'mime_type': {'key': 'mimeType', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'modified_time': {'key': 'modifiedTime', 'type': 'iso-8601'}, + 'unpack': {'key': 'unpack', 'type': 'bool'}, + 'parent_model_id': {'key': 'parentModelId', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'derived_model_ids': {'key': 'derivedModelIds', 'type': '[str]'}, + 'inputs_schema': {'key': 'inputsSchema', 'type': '[ModelSchema]'}, + 'outputs_schema': {'key': 'outputsSchema', 'type': '[ModelSchema]'}, + 'sample_input_data': {'key': 'sampleInputData', 'type': 'str'}, + 'sample_output_data': {'key': 'sampleOutputData', 'type': 'str'}, + 'resource_requirements': {'key': 'resourceRequirements', 'type': 'ContainerResourceRequirements'}, + 'created_by': {'key': 'createdBy', 'type': 'User'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'User'}, + 'flavors': {'key': 'flavors', 'type': '{{str}}'}, + 'model_format': {'key': 'modelFormat', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'model_container_id': {'key': 'modelContainerId', 'type': 'str'}, + 'mms_id': {'key': 'mmsId', 'type': 'str'}, + 'default_deployment_settings': {'key': 'defaultDeploymentSettings', 'type': 'ModelDeploymentSettings'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'is_registered': {'key': 'isRegistered', 'type': 'bool'}, + 'data_path': {'key': 'dataPath', 'type': 'str'}, + 'model_type': {'key': 'modelType', 'type': 'str'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + mime_type: str, + id: Optional[str] = None, + framework: Optional[str] = None, + framework_version: Optional[str] = None, + version: Optional[int] = None, + tags: Optional[List[str]] = None, + datasets: Optional[List["DatasetReference"]] = None, + url: Optional[str] = None, + description: Optional[str] = None, + created_time: Optional[datetime.datetime] = None, + modified_time: Optional[datetime.datetime] = None, + unpack: Optional[bool] = None, + parent_model_id: Optional[str] = None, + run_id: Optional[str] = None, + experiment_name: Optional[str] = None, + kv_tags: Optional[Dict[str, str]] = None, + properties: Optional[Dict[str, str]] = None, + derived_model_ids: Optional[List[str]] = None, + inputs_schema: Optional[List["ModelSchema"]] = None, + outputs_schema: Optional[List["ModelSchema"]] = None, + sample_input_data: Optional[str] = None, + sample_output_data: Optional[str] = None, + resource_requirements: Optional["ContainerResourceRequirements"] = None, + created_by: Optional["User"] = None, + modified_by: Optional["User"] = None, + flavors: Optional[Dict[str, Dict[str, str]]] = None, + model_format: Optional[Union[str, "ModelFormatEnum"]] = None, + stage: Optional[str] = None, + model_container_id: Optional[str] = None, + mms_id: Optional[str] = None, + default_deployment_settings: Optional["ModelDeploymentSettings"] = None, + is_anonymous: Optional[bool] = None, + is_archived: Optional[bool] = None, + is_registered: Optional[bool] = None, + data_path: Optional[str] = None, + model_type: Optional[str] = None, + asset_id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: + :paramtype id: str + :keyword name: Required. + :paramtype name: str + :keyword framework: + :paramtype framework: str + :keyword framework_version: + :paramtype framework_version: str + :keyword version: + :paramtype version: long + :keyword tags: A set of tags. + :paramtype tags: list[str] + :keyword datasets: + :paramtype datasets: list[~azure.mgmt.machinelearningservices.models.DatasetReference] + :keyword url: + :paramtype url: str + :keyword mime_type: Required. + :paramtype mime_type: str + :keyword description: + :paramtype description: str + :keyword created_time: + :paramtype created_time: ~datetime.datetime + :keyword modified_time: + :paramtype modified_time: ~datetime.datetime + :keyword unpack: + :paramtype unpack: bool + :keyword parent_model_id: + :paramtype parent_model_id: str + :keyword run_id: + :paramtype run_id: str + :keyword experiment_name: + :paramtype experiment_name: str + :keyword kv_tags: Dictionary of :code:`<string>`. + :paramtype kv_tags: dict[str, str] + :keyword properties: Dictionary of :code:`<string>`. + :paramtype properties: dict[str, str] + :keyword derived_model_ids: + :paramtype derived_model_ids: list[str] + :keyword inputs_schema: + :paramtype inputs_schema: list[~azure.mgmt.machinelearningservices.models.ModelSchema] + :keyword outputs_schema: + :paramtype outputs_schema: list[~azure.mgmt.machinelearningservices.models.ModelSchema] + :keyword sample_input_data: + :paramtype sample_input_data: str + :keyword sample_output_data: + :paramtype sample_output_data: str + :keyword resource_requirements: + :paramtype resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :keyword created_by: + :paramtype created_by: ~azure.mgmt.machinelearningservices.models.User + :keyword modified_by: + :paramtype modified_by: ~azure.mgmt.machinelearningservices.models.User + :keyword flavors: Dictionary of + <components·8urbg9·schemas·model·properties·flavors·additionalproperties>. + :paramtype flavors: dict[str, dict[str, str]] + :keyword model_format: Possible values include: "CUSTOM", "MLFLOW", "TRITON", "PRESETS". + :paramtype model_format: str or ~azure.mgmt.machinelearningservices.models.ModelFormatEnum + :keyword stage: + :paramtype stage: str + :keyword model_container_id: + :paramtype model_container_id: str + :keyword mms_id: + :paramtype mms_id: str + :keyword default_deployment_settings: + :paramtype default_deployment_settings: + ~azure.mgmt.machinelearningservices.models.ModelDeploymentSettings + :keyword is_anonymous: + :paramtype is_anonymous: bool + :keyword is_archived: + :paramtype is_archived: bool + :keyword is_registered: + :paramtype is_registered: bool + :keyword data_path: + :paramtype data_path: str + :keyword model_type: + :paramtype model_type: str + :keyword asset_id: + :paramtype asset_id: str + """ + super(Model, self).__init__(**kwargs) + self.id = id + self.name = name + self.framework = framework + self.framework_version = framework_version + self.version = version + self.tags = tags + self.datasets = datasets + self.url = url + self.mime_type = mime_type + self.description = description + self.created_time = created_time + self.modified_time = modified_time + self.unpack = unpack + self.parent_model_id = parent_model_id + self.run_id = run_id + self.experiment_name = experiment_name + self.kv_tags = kv_tags + self.properties = properties + self.derived_model_ids = derived_model_ids + self.inputs_schema = inputs_schema + self.outputs_schema = outputs_schema + self.sample_input_data = sample_input_data + self.sample_output_data = sample_output_data + self.resource_requirements = resource_requirements + self.created_by = created_by + self.modified_by = modified_by + self.flavors = flavors + self.model_format = model_format + self.stage = stage + self.model_container_id = model_container_id + self.mms_id = mms_id + self.default_deployment_settings = default_deployment_settings + self.is_anonymous = is_anonymous + self.is_archived = is_archived + self.is_registered = is_registered + self.data_path = data_path + self.model_type = model_type + self.asset_id = asset_id + + +class ModelBatchDto(msrest.serialization.Model): + """ModelBatchDto. + + :ivar model_ids: + :vartype model_ids: list[str] + """ + + _attribute_map = { + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + } + + def __init__( + self, + *, + model_ids: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword model_ids: + :paramtype model_ids: list[str] + """ + super(ModelBatchDto, self).__init__(**kwargs) + self.model_ids = model_ids + + +class ModelBatchResponseDto(msrest.serialization.Model): + """ModelBatchResponseDto. + + :ivar models: Dictionary of :code:`<Model>`. + :vartype models: dict[str, ~azure.mgmt.machinelearningservices.models.Model] + """ + + _attribute_map = { + 'models': {'key': 'models', 'type': '{Model}'}, + } + + def __init__( + self, + *, + models: Optional[Dict[str, "Model"]] = None, + **kwargs + ): + """ + :keyword models: Dictionary of :code:`<Model>`. + :paramtype models: dict[str, ~azure.mgmt.machinelearningservices.models.Model] + """ + super(ModelBatchResponseDto, self).__init__(**kwargs) + self.models = models + + +class ModelContainerRequest(msrest.serialization.Model): + """ModelContainerRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. + :vartype name: str + :ivar description: + :vartype description: str + :ivar kv_tags: Dictionary of :code:`<string>`. + :vartype kv_tags: dict[str, str] + :ivar is_archived: + :vartype is_archived: bool + :ivar is_registered: + :vartype is_registered: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'is_registered': {'key': 'isRegistered', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: str, + description: Optional[str] = None, + kv_tags: Optional[Dict[str, str]] = None, + is_archived: Optional[bool] = None, + is_registered: Optional[bool] = None, + **kwargs + ): + """ + :keyword name: Required. + :paramtype name: str + :keyword description: + :paramtype description: str + :keyword kv_tags: Dictionary of :code:`<string>`. + :paramtype kv_tags: dict[str, str] + :keyword is_archived: + :paramtype is_archived: bool + :keyword is_registered: + :paramtype is_registered: bool + """ + super(ModelContainerRequest, self).__init__(**kwargs) + self.name = name + self.description = description + self.kv_tags = kv_tags + self.is_archived = is_archived + self.is_registered = is_registered + + +class ModelDeploymentSettings(msrest.serialization.Model): + """ModelDeploymentSettings. + + All required parameters must be populated in order to send to Azure. + + :ivar model_format: Required. Possible values include: "CUSTOM", "MLFLOW", "TRITON", "PRESETS". + :vartype model_format: str or ~azure.mgmt.machinelearningservices.models.ModelFormatEnum + :ivar model_name: + :vartype model_name: str + :ivar model_version: + :vartype model_version: str + :ivar model_type: + :vartype model_type: str + """ + + _validation = { + 'model_format': {'required': True}, + } + + _attribute_map = { + 'model_format': {'key': 'modelFormat', 'type': 'str'}, + 'model_name': {'key': 'ModelName', 'type': 'str'}, + 'model_version': {'key': 'ModelVersion', 'type': 'str'}, + 'model_type': {'key': 'ModelType', 'type': 'str'}, + } + + def __init__( + self, + *, + model_format: Union[str, "ModelFormatEnum"], + model_name: Optional[str] = None, + model_version: Optional[str] = None, + model_type: Optional[str] = None, + **kwargs + ): + """ + :keyword model_format: Required. Possible values include: "CUSTOM", "MLFLOW", "TRITON", + "PRESETS". + :paramtype model_format: str or ~azure.mgmt.machinelearningservices.models.ModelFormatEnum + :keyword model_name: + :paramtype model_name: str + :keyword model_version: + :paramtype model_version: str + :keyword model_type: + :paramtype model_type: str + """ + super(ModelDeploymentSettings, self).__init__(**kwargs) + self.model_format = model_format + self.model_name = model_name + self.model_version = model_version + self.model_type = model_type + + +class ModelListModelsRequestPagedResponse(msrest.serialization.Model): + """ModelListModelsRequestPagedResponse. + + :ivar value: + :vartype value: list[~azure.mgmt.machinelearningservices.models.Model] + :ivar next_link: + :vartype next_link: str + :ivar continuation_token: + :vartype continuation_token: str + :ivar next_request: + :vartype next_request: ~azure.mgmt.machinelearningservices.models.ListModelsRequest + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Model]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'next_request': {'key': 'nextRequest', 'type': 'ListModelsRequest'}, + } + + def __init__( + self, + *, + value: Optional[List["Model"]] = None, + next_link: Optional[str] = None, + continuation_token: Optional[str] = None, + next_request: Optional["ListModelsRequest"] = None, + **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.machinelearningservices.models.Model] + :keyword next_link: + :paramtype next_link: str + :keyword continuation_token: + :paramtype continuation_token: str + :keyword next_request: + :paramtype next_request: ~azure.mgmt.machinelearningservices.models.ListModelsRequest + """ + super(ModelListModelsRequestPagedResponse, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + self.continuation_token = continuation_token + self.next_request = next_request + + +class ModelPagedResponse(msrest.serialization.Model): + """ModelPagedResponse. + + :ivar value: + :vartype value: list[~azure.mgmt.machinelearningservices.models.Model] + :ivar continuation_token: + :vartype continuation_token: str + :ivar next_link: + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Model]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Model"]] = None, + continuation_token: Optional[str] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.machinelearningservices.models.Model] + :keyword continuation_token: + :paramtype continuation_token: str + :keyword next_link: + :paramtype next_link: str + """ + super(ModelPagedResponse, self).__init__(**kwargs) + self.value = value + self.continuation_token = continuation_token + self.next_link = next_link + + +class ModelPathResponseDto(msrest.serialization.Model): + """ModelPathResponseDto. + + :ivar path: + :vartype path: str + :ivar type: + :vartype type: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + path: Optional[str] = None, + type: Optional[str] = None, + **kwargs + ): + """ + :keyword path: + :paramtype path: str + :keyword type: + :paramtype type: str + """ + super(ModelPathResponseDto, self).__init__(**kwargs) + self.path = path + self.type = type + + +class ModelSchema(msrest.serialization.Model): + """ModelSchema. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. + :vartype name: str + :ivar data_type: Possible values include: "undefined", "bool", "uint8", "uint16", "uint32", + "uint64", "int8", "int16", "int32", "int64", "float16", "float32", "float64", "bfloat16", + "complex64", "complex128", "string". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.ModelSchemaDataType + :ivar shape: + :vartype shape: list[int] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'shape': {'key': 'shape', 'type': '[int]'}, + } + + def __init__( + self, + *, + name: str, + data_type: Optional[Union[str, "ModelSchemaDataType"]] = None, + shape: Optional[List[int]] = None, + **kwargs + ): + """ + :keyword name: Required. + :paramtype name: str + :keyword data_type: Possible values include: "undefined", "bool", "uint8", "uint16", "uint32", + "uint64", "int8", "int16", "int32", "int64", "float16", "float32", "float64", "bfloat16", + "complex64", "complex128", "string". + :paramtype data_type: str or ~azure.mgmt.machinelearningservices.models.ModelSchemaDataType + :keyword shape: + :paramtype shape: list[int] + """ + super(ModelSchema, self).__init__(**kwargs) + self.name = name + self.data_type = data_type + self.shape = shape + + +class ModelSettingsIdentifiers(msrest.serialization.Model): + """ModelSettingsIdentifiers. + + :ivar model_id: + :vartype model_id: str + :ivar engine_id: + :vartype engine_id: str + """ + + _attribute_map = { + 'model_id': {'key': 'modelId', 'type': 'str'}, + 'engine_id': {'key': 'engineId', 'type': 'str'}, + } + + def __init__( + self, + *, + model_id: Optional[str] = None, + engine_id: Optional[str] = None, + **kwargs + ): + """ + :keyword model_id: + :paramtype model_id: str + :keyword engine_id: + :paramtype engine_id: str + """ + super(ModelSettingsIdentifiers, self).__init__(**kwargs) + self.model_id = model_id + self.engine_id = engine_id + + +class Operation(msrest.serialization.Model): + """Operation. + + :ivar value: Anything. + :vartype value: any + :ivar path: + :vartype path: str + :ivar op: + :vartype op: str + :ivar from_property: + :vartype from_property: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'object'}, + 'path': {'key': 'path', 'type': 'str'}, + 'op': {'key': 'op', 'type': 'str'}, + 'from_property': {'key': 'from', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[Any] = None, + path: Optional[str] = None, + op: Optional[str] = None, + from_property: Optional[str] = None, + **kwargs + ): + """ + :keyword value: Anything. + :paramtype value: any + :keyword path: + :paramtype path: str + :keyword op: + :paramtype op: str + :keyword from_property: + :paramtype from_property: str + """ + super(Operation, self).__init__(**kwargs) + self.value = value + self.path = path + self.op = op + self.from_property = from_property + + +class ProviderFeedEntityRequestDto(msrest.serialization.Model): + """ProviderFeedEntityRequestDto. + + :ivar source_and_target_asset_ids: + :vartype source_and_target_asset_ids: + ~azure.mgmt.machinelearningservices.models.DependencyMapItemDto + :ivar dependency_map_dto: + :vartype dependency_map_dto: ~azure.mgmt.machinelearningservices.models.DependencyMapDto + :ivar label_to_version_mapping: Dictionary of :code:`<string>`. + :vartype label_to_version_mapping: dict[str, str] + """ + + _attribute_map = { + 'source_and_target_asset_ids': {'key': 'sourceAndTargetAssetIds', 'type': 'DependencyMapItemDto'}, + 'dependency_map_dto': {'key': 'dependencyMapDto', 'type': 'DependencyMapDto'}, + 'label_to_version_mapping': {'key': 'labelToVersionMapping', 'type': '{str}'}, + } + + def __init__( + self, + *, + source_and_target_asset_ids: Optional["DependencyMapItemDto"] = None, + dependency_map_dto: Optional["DependencyMapDto"] = None, + label_to_version_mapping: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword source_and_target_asset_ids: + :paramtype source_and_target_asset_ids: + ~azure.mgmt.machinelearningservices.models.DependencyMapItemDto + :keyword dependency_map_dto: + :paramtype dependency_map_dto: ~azure.mgmt.machinelearningservices.models.DependencyMapDto + :keyword label_to_version_mapping: Dictionary of :code:`<string>`. + :paramtype label_to_version_mapping: dict[str, str] + """ + super(ProviderFeedEntityRequestDto, self).__init__(**kwargs) + self.source_and_target_asset_ids = source_and_target_asset_ids + self.dependency_map_dto = dependency_map_dto + self.label_to_version_mapping = label_to_version_mapping + + +class Relationship(msrest.serialization.Model): + """Relationship. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar additional_properties: Unmatched properties from the message are deserialized to this + collection. + :vartype additional_properties: dict[str, any] + :ivar relation_type: + :vartype relation_type: str + :ivar target_entity_id: + :vartype target_entity_id: str + :ivar asset_id: + :vartype asset_id: str + :ivar entity_type: + :vartype entity_type: str + :ivar direction: + :vartype direction: str + :ivar entity_container_id: + :vartype entity_container_id: str + """ + + _validation = { + 'entity_type': {'readonly': True}, + 'entity_container_id': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'relation_type': {'key': 'relationType', 'type': 'str'}, + 'target_entity_id': {'key': 'targetEntityId', 'type': 'str'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'direction': {'key': 'direction', 'type': 'str'}, + 'entity_container_id': {'key': 'entityContainerId', 'type': 'str'}, + } + + def __init__( + self, + *, + additional_properties: Optional[Dict[str, Any]] = None, + relation_type: Optional[str] = None, + target_entity_id: Optional[str] = None, + asset_id: Optional[str] = None, + direction: Optional[str] = None, + **kwargs + ): + """ + :keyword additional_properties: Unmatched properties from the message are deserialized to this + collection. + :paramtype additional_properties: dict[str, any] + :keyword relation_type: + :paramtype relation_type: str + :keyword target_entity_id: + :paramtype target_entity_id: str + :keyword asset_id: + :paramtype asset_id: str + :keyword direction: + :paramtype direction: str + """ + super(Relationship, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.relation_type = relation_type + self.target_entity_id = target_entity_id + self.asset_id = asset_id + self.entity_type = None + self.direction = direction + self.entity_container_id = None + + +class ServiceResponseBase(msrest.serialization.Model): + """ServiceResponseBase. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar description: + :vartype description: str + :ivar tags: A set of tags. + :vartype tags: list[str] + :ivar kv_tags: Dictionary of :code:`<string>`. + :vartype kv_tags: dict[str, str] + :ivar properties: Dictionary of :code:`<string>`. + :vartype properties: dict[str, str] + :ivar operation_id: + :vartype operation_id: str + :ivar state: Possible values include: "Transitioning", "Healthy", "Unhealthy", "Failed", + "Unschedulable". + :vartype state: str or ~azure.mgmt.machinelearningservices.models.WebServiceState + :ivar created_time: + :vartype created_time: ~datetime.datetime + :ivar updated_time: + :vartype updated_time: ~datetime.datetime + :ivar error: + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + :ivar compute_type: Possible values include: "ACS", "FPGA", "ACI", "AKS", "AMLCOMPUTE", "IOT", + "MIR", "AKSENDPOINT", "MIRSINGLEMODEL", "MIRAMLCOMPUTE", "MIRGA", "AMLARC", "BATCHAMLCOMPUTE", + "UNKNOWN". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeEnvironmentType + :ivar deployment_type: Possible values include: "GRPCRealtimeEndpoint", "HttpRealtimeEndpoint", + "Batch". + :vartype deployment_type: str or ~azure.mgmt.machinelearningservices.models.DeploymentType + :ivar created_by: + :vartype created_by: ~azure.mgmt.machinelearningservices.models.User + :ivar endpoint_name: + :vartype endpoint_name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'User'}, + 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + description: Optional[str] = None, + tags: Optional[List[str]] = None, + kv_tags: Optional[Dict[str, str]] = None, + properties: Optional[Dict[str, str]] = None, + operation_id: Optional[str] = None, + state: Optional[Union[str, "WebServiceState"]] = None, + created_time: Optional[datetime.datetime] = None, + updated_time: Optional[datetime.datetime] = None, + error: Optional["ErrorResponse"] = None, + compute_type: Optional[Union[str, "ComputeEnvironmentType"]] = None, + deployment_type: Optional[Union[str, "DeploymentType"]] = None, + created_by: Optional["User"] = None, + endpoint_name: Optional[str] = None, + **kwargs + ): + """ + :keyword id: + :paramtype id: str + :keyword name: + :paramtype name: str + :keyword description: + :paramtype description: str + :keyword tags: A set of tags. + :paramtype tags: list[str] + :keyword kv_tags: Dictionary of :code:`<string>`. + :paramtype kv_tags: dict[str, str] + :keyword properties: Dictionary of :code:`<string>`. + :paramtype properties: dict[str, str] + :keyword operation_id: + :paramtype operation_id: str + :keyword state: Possible values include: "Transitioning", "Healthy", "Unhealthy", "Failed", + "Unschedulable". + :paramtype state: str or ~azure.mgmt.machinelearningservices.models.WebServiceState + :keyword created_time: + :paramtype created_time: ~datetime.datetime + :keyword updated_time: + :paramtype updated_time: ~datetime.datetime + :keyword error: + :paramtype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + :keyword compute_type: Possible values include: "ACS", "FPGA", "ACI", "AKS", "AMLCOMPUTE", + "IOT", "MIR", "AKSENDPOINT", "MIRSINGLEMODEL", "MIRAMLCOMPUTE", "MIRGA", "AMLARC", + "BATCHAMLCOMPUTE", "UNKNOWN". + :paramtype compute_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeEnvironmentType + :keyword deployment_type: Possible values include: "GRPCRealtimeEndpoint", + "HttpRealtimeEndpoint", "Batch". + :paramtype deployment_type: str or ~azure.mgmt.machinelearningservices.models.DeploymentType + :keyword created_by: + :paramtype created_by: ~azure.mgmt.machinelearningservices.models.User + :keyword endpoint_name: + :paramtype endpoint_name: str + """ + super(ServiceResponseBase, self).__init__(**kwargs) + self.id = id + self.name = name + self.description = description + self.tags = tags + self.kv_tags = kv_tags + self.properties = properties + self.operation_id = operation_id + self.state = state + self.created_time = created_time + self.updated_time = updated_time + self.error = error + self.compute_type = compute_type + self.deployment_type = deployment_type + self.created_by = created_by + self.endpoint_name = endpoint_name + + +class User(msrest.serialization.Model): + """User. + + :ivar user_object_id: + :vartype user_object_id: str + :ivar user_pu_id: + :vartype user_pu_id: str + :ivar user_idp: + :vartype user_idp: str + :ivar user_alt_sec_id: + :vartype user_alt_sec_id: str + :ivar user_iss: + :vartype user_iss: str + :ivar user_tenant_id: + :vartype user_tenant_id: str + :ivar user_name: + :vartype user_name: str + :ivar upn: + :vartype upn: str + """ + + _attribute_map = { + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + 'user_pu_id': {'key': 'userPuId', 'type': 'str'}, + 'user_idp': {'key': 'userIdp', 'type': 'str'}, + 'user_alt_sec_id': {'key': 'userAltSecId', 'type': 'str'}, + 'user_iss': {'key': 'userIss', 'type': 'str'}, + 'user_tenant_id': {'key': 'userTenantId', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__( + self, + *, + user_object_id: Optional[str] = None, + user_pu_id: Optional[str] = None, + user_idp: Optional[str] = None, + user_alt_sec_id: Optional[str] = None, + user_iss: Optional[str] = None, + user_tenant_id: Optional[str] = None, + user_name: Optional[str] = None, + upn: Optional[str] = None, + **kwargs + ): + """ + :keyword user_object_id: + :paramtype user_object_id: str + :keyword user_pu_id: + :paramtype user_pu_id: str + :keyword user_idp: + :paramtype user_idp: str + :keyword user_alt_sec_id: + :paramtype user_alt_sec_id: str + :keyword user_iss: + :paramtype user_iss: str + :keyword user_tenant_id: + :paramtype user_tenant_id: str + :keyword user_name: + :paramtype user_name: str + :keyword upn: + :paramtype upn: str + """ + super(User, self).__init__(**kwargs) + self.user_object_id = user_object_id + self.user_pu_id = user_pu_id + self.user_idp = user_idp + self.user_alt_sec_id = user_alt_sec_id + self.user_iss = user_iss + self.user_tenant_id = user_tenant_id + self.user_name = user_name + self.upn = upn diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/__init__.py new file mode 100644 index 00000000..261577d5 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/__init__.py @@ -0,0 +1,19 @@ +# 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 ._assets_operations import AssetsOperations +from ._extensive_model_operations import ExtensiveModelOperations +from ._migration_operations import MigrationOperations +from ._models_operations import ModelsOperations + +__all__ = [ + 'AssetsOperations', + 'ExtensiveModelOperations', + 'MigrationOperations', + 'ModelsOperations', +] diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_assets_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_assets_operations.py new file mode 100644 index 00000000..65afa16f --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_assets_operations.py @@ -0,0 +1,609 @@ +# 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, List, Optional, TypeVar, Union + 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_create_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + run_id = kwargs.pop('run_id', None) # type: Optional[str] + project_id = kwargs.pop('project_id', None) # type: Optional[str] + name = kwargs.pop('name', None) # type: Optional[str] + tag = kwargs.pop('tag', None) # type: Optional[str] + count = kwargs.pop('count', None) # type: Optional[int] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + tags = kwargs.pop('tags', None) # type: Optional[str] + properties = kwargs.pop('properties', None) # type: Optional[str] + type = kwargs.pop('type', None) # type: Optional[str] + orderby = kwargs.pop('orderby', None) # type: Optional[Union[str, "_models.OrderString"]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if run_id is not None: + query_parameters['runId'] = _SERIALIZER.query("run_id", run_id, 'str') + if project_id is not None: + query_parameters['projectId'] = _SERIALIZER.query("project_id", project_id, 'str') + if name is not None: + query_parameters['name'] = _SERIALIZER.query("name", name, 'str') + if tag is not None: + query_parameters['tag'] = _SERIALIZER.query("tag", tag, 'str') + if count is not None: + query_parameters['count'] = _SERIALIZER.query("count", count, 'int') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + if tags is not None: + query_parameters['tags'] = _SERIALIZER.query("tags", tags, 'str') + if properties is not None: + query_parameters['properties'] = _SERIALIZER.query("properties", properties, 'str') + if type is not None: + query_parameters['type'] = _SERIALIZER.query("type", type, 'str') + if orderby is not None: + query_parameters['orderby'] = _SERIALIZER.query("orderby", orderby, 'str') + + # 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, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_patch_request( + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + return HttpRequest( + method="DELETE", + url=url, + **kwargs + ) + + +def build_query_by_id_request( + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_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 AssetsOperations(object): + """AssetsOperations 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 create( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + body=None, # type: Optional["_models.Asset"] + **kwargs # type: Any + ): + # type: (...) -> "_models.Asset" + """create. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.Asset + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Asset, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Asset + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Asset"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + if body is not None: + _json = self._serialize.body(body, 'Asset') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + if body is not None: + _json = self._serialize.body(body, 'Asset') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_create_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create.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('Asset', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets'} # type: ignore + + + @distributed_trace + def list( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + run_id=None, # type: Optional[str] + project_id=None, # type: Optional[str] + name=None, # type: Optional[str] + tag=None, # type: Optional[str] + count=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + tags=None, # type: Optional[str] + properties=None, # type: Optional[str] + type=None, # type: Optional[str] + orderby=None, # type: Optional[Union[str, "_models.OrderString"]] + **kwargs # type: Any + ): + # type: (...) -> "_models.AssetPaginatedResult" + """list. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param run_id: + :type run_id: str + :param project_id: + :type project_id: str + :param name: + :type name: str + :param tag: + :type tag: str + :param count: + :type count: int + :param skip_token: + :type skip_token: str + :param tags: + :type tags: str + :param properties: + :type properties: str + :param type: + :type type: str + :param orderby: + :type orderby: str or ~azure.mgmt.machinelearningservices.models.OrderString + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AssetPaginatedResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.AssetPaginatedResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AssetPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + run_id=run_id, + project_id=project_id, + name=name, + tag=tag, + count=count, + skip_token=skip_token, + tags=tags, + properties=properties, + type=type, + orderby=orderby, + template_url=self.list.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('AssetPaginatedResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets'} # type: ignore + + + @distributed_trace + def patch( + self, + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + body, # type: List["_models.Operation"] + **kwargs # type: Any + ): + # type: (...) -> "_models.Asset" + """patch. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: list[~azure.mgmt.machinelearningservices.models.Operation] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Asset, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Asset + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Asset"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + _json = self._serialize.body(body, '[Operation]') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + _json = self._serialize.body(body, '[Operation]') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_patch_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.patch.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('Asset', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + patch.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets/{id}'} # type: ignore + + + @distributed_trace + def delete( + self, + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """delete. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: 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_delete_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.delete.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, 204]: + 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, {}) + + delete.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets/{id}'} # type: ignore + + + @distributed_trace + def query_by_id( + self, + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Asset" + """query_by_id. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Asset, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Asset + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Asset"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_query_by_id_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.query_by_id.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('Asset', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + query_by_id.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/assets/{id}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_extensive_model_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_extensive_model_operations.py new file mode 100644 index 00000000..cd7703c6 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_extensive_model_operations.py @@ -0,0 +1,144 @@ +# 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_query_by_id_request( + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/extensiveModels/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_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 ExtensiveModelOperations(object): + """ExtensiveModelOperations 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 query_by_id( + self, + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExtensiveModel" + """query_by_id. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExtensiveModel, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ExtensiveModel + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExtensiveModel"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_query_by_id_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.query_by_id.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('ExtensiveModel', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + query_by_id.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/extensiveModels/{id}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_migration_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_migration_operations.py new file mode 100644 index 00000000..e8a39933 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_migration_operations.py @@ -0,0 +1,139 @@ +# 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 + +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_start_migration_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + migration = kwargs.pop('migration', None) # type: Optional[str] + timeout = kwargs.pop('timeout', "00:01:00") # type: Optional[str] + collection_id = kwargs.pop('collection_id', None) # type: Optional[str] + workspace_id = kwargs.pop('workspace_id', None) # type: Optional[str] + + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/meta/migration') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if migration is not None: + query_parameters['migration'] = _SERIALIZER.query("migration", migration, 'str') + if timeout is not None: + query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'str') + if collection_id is not None: + query_parameters['collectionId'] = _SERIALIZER.query("collection_id", collection_id, 'str') + if workspace_id is not None: + query_parameters['workspaceId'] = _SERIALIZER.query("workspace_id", workspace_id, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + **kwargs + ) + +# fmt: on +class MigrationOperations(object): + """MigrationOperations 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 start_migration( + self, + migration=None, # type: Optional[str] + timeout="00:01:00", # type: Optional[str] + collection_id=None, # type: Optional[str] + workspace_id=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """start_migration. + + :param migration: + :type migration: str + :param timeout: + :type timeout: str + :param collection_id: + :type collection_id: str + :param workspace_id: + :type workspace_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_start_migration_request( + migration=migration, + timeout=timeout, + collection_id=collection_id, + workspace_id=workspace_id, + template_url=self.start_migration.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, {}) + + start_migration.metadata = {'url': '/modelregistry/v1.0/meta/migration'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_models_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_models_operations.py new file mode 100644 index 00000000..e65f830d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/operations/_models_operations.py @@ -0,0 +1,1322 @@ +# 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, List, Optional, TypeVar, Union + 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_register_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + auto_version = kwargs.pop('auto_version', True) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if auto_version is not None: + query_parameters['autoVersion'] = _SERIALIZER.query("auto_version", auto_version, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + name = kwargs.pop('name', None) # type: Optional[str] + tag = kwargs.pop('tag', None) # type: Optional[str] + version = kwargs.pop('version', None) # type: Optional[str] + framework = kwargs.pop('framework', None) # type: Optional[str] + description = kwargs.pop('description', None) # type: Optional[str] + count = kwargs.pop('count', None) # type: Optional[int] + offset = kwargs.pop('offset', None) # type: Optional[int] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + tags = kwargs.pop('tags', None) # type: Optional[str] + properties = kwargs.pop('properties', None) # type: Optional[str] + run_id = kwargs.pop('run_id', None) # type: Optional[str] + dataset_id = kwargs.pop('dataset_id', None) # type: Optional[str] + order_by = kwargs.pop('order_by', None) # type: Optional[str] + latest_version_only = kwargs.pop('latest_version_only', False) # type: Optional[bool] + feed = kwargs.pop('feed', None) # type: Optional[str] + list_view_type = kwargs.pop('list_view_type', None) # type: Optional[Union[str, "_models.ListViewType"]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if name is not None: + query_parameters['name'] = _SERIALIZER.query("name", name, 'str') + if tag is not None: + query_parameters['tag'] = _SERIALIZER.query("tag", tag, 'str') + if version is not None: + query_parameters['version'] = _SERIALIZER.query("version", version, 'str') + if framework is not None: + query_parameters['framework'] = _SERIALIZER.query("framework", framework, 'str') + if description is not None: + query_parameters['description'] = _SERIALIZER.query("description", description, 'str') + if count is not None: + query_parameters['count'] = _SERIALIZER.query("count", count, 'int') + if offset is not None: + query_parameters['offset'] = _SERIALIZER.query("offset", offset, 'int') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + if tags is not None: + query_parameters['tags'] = _SERIALIZER.query("tags", tags, 'str') + if properties is not None: + query_parameters['properties'] = _SERIALIZER.query("properties", properties, 'str') + if run_id is not None: + query_parameters['runId'] = _SERIALIZER.query("run_id", run_id, 'str') + if dataset_id is not None: + query_parameters['datasetId'] = _SERIALIZER.query("dataset_id", dataset_id, 'str') + if order_by is not None: + query_parameters['orderBy'] = _SERIALIZER.query("order_by", order_by, 'str') + if latest_version_only is not None: + query_parameters['latestVersionOnly'] = _SERIALIZER.query("latest_version_only", latest_version_only, 'bool') + if feed is not None: + query_parameters['feed'] = _SERIALIZER.query("feed", feed, 'str') + if list_view_type is not None: + query_parameters['listViewType'] = _SERIALIZER.query("list_view_type", list_view_type, 'str') + + # 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, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_unregistered_input_model_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/createUnregisteredInput') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_create_unregistered_output_model_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/createUnregisteredOutput') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_batch_get_resolved_uris_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/batchGetResolvedUris') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_query_by_id_request( + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + include_deployment_settings = kwargs.pop('include_deployment_settings', False) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if include_deployment_settings is not None: + query_parameters['includeDeploymentSettings'] = _SERIALIZER.query("include_deployment_settings", include_deployment_settings, 'bool') + + # 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, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + return HttpRequest( + method="DELETE", + url=url, + **kwargs + ) + + +def build_patch_request( + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_list_query_post_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/list') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_batch_query_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/querybatch') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_deployment_settings_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + # Construct URL + url = kwargs.pop("template_url", '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/deploymentSettings') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ModelsOperations(object): + """ModelsOperations 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 register( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + body, # type: "_models.Model" + auto_version=True, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> "_models.Model" + """register. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.Model + :param auto_version: + :type auto_version: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Model, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Model + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Model"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + _json = self._serialize.body(body, 'Model') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + _json = self._serialize.body(body, 'Model') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_register_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + auto_version=auto_version, + template_url=self.register.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('Model', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + register.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models'} # type: ignore + + + @distributed_trace + def list( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name=None, # type: Optional[str] + tag=None, # type: Optional[str] + version=None, # type: Optional[str] + framework=None, # type: Optional[str] + description=None, # type: Optional[str] + count=None, # type: Optional[int] + offset=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + tags=None, # type: Optional[str] + properties=None, # type: Optional[str] + run_id=None, # type: Optional[str] + dataset_id=None, # type: Optional[str] + order_by=None, # type: Optional[str] + latest_version_only=False, # type: Optional[bool] + feed=None, # type: Optional[str] + list_view_type=None, # type: Optional[Union[str, "_models.ListViewType"]] + **kwargs # type: Any + ): + # type: (...) -> "_models.ModelPagedResponse" + """list. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param name: + :type name: str + :param tag: + :type tag: str + :param version: + :type version: str + :param framework: + :type framework: str + :param description: + :type description: str + :param count: + :type count: int + :param offset: + :type offset: int + :param skip_token: + :type skip_token: str + :param tags: + :type tags: str + :param properties: + :type properties: str + :param run_id: + :type run_id: str + :param dataset_id: + :type dataset_id: str + :param order_by: + :type order_by: str + :param latest_version_only: + :type latest_version_only: bool + :param feed: + :type feed: str + :param list_view_type: + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelPagedResponse, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelPagedResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelPagedResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + tag=tag, + version=version, + framework=framework, + description=description, + count=count, + offset=offset, + skip_token=skip_token, + tags=tags, + properties=properties, + run_id=run_id, + dataset_id=dataset_id, + order_by=order_by, + latest_version_only=latest_version_only, + feed=feed, + list_view_type=list_view_type, + template_url=self.list.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('ModelPagedResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models'} # type: ignore + + + @distributed_trace + def create_unregistered_input_model( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + body, # type: "_models.CreateUnregisteredInputModelDto" + **kwargs # type: Any + ): + # type: (...) -> "_models.Model" + """create_unregistered_input_model. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.CreateUnregisteredInputModelDto + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Model, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Model + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Model"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + _json = self._serialize.body(body, 'CreateUnregisteredInputModelDto') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + _json = self._serialize.body(body, 'CreateUnregisteredInputModelDto') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_create_unregistered_input_model_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_unregistered_input_model.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('Model', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_unregistered_input_model.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/createUnregisteredInput'} # type: ignore + + + @distributed_trace + def create_unregistered_output_model( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + body, # type: "_models.CreateUnregisteredOutputModelDto" + **kwargs # type: Any + ): + # type: (...) -> "_models.Model" + """create_unregistered_output_model. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.CreateUnregisteredOutputModelDto + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Model, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Model + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Model"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + _json = self._serialize.body(body, 'CreateUnregisteredOutputModelDto') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + _json = self._serialize.body(body, 'CreateUnregisteredOutputModelDto') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_create_unregistered_output_model_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.create_unregistered_output_model.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('Model', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_unregistered_output_model.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/createUnregisteredOutput'} # type: ignore + + + @distributed_trace + def batch_get_resolved_uris( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + body=None, # type: Optional["_models.BatchGetResolvedUrisDto"] + **kwargs # type: Any + ): + # type: (...) -> "_models.BatchModelPathResponseDto" + """batch_get_resolved_uris. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.BatchGetResolvedUrisDto + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BatchModelPathResponseDto, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.BatchModelPathResponseDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchModelPathResponseDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + if body is not None: + _json = self._serialize.body(body, 'BatchGetResolvedUrisDto') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + if body is not None: + _json = self._serialize.body(body, 'BatchGetResolvedUrisDto') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_batch_get_resolved_uris_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.batch_get_resolved_uris.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('BatchModelPathResponseDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + batch_get_resolved_uris.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/batchGetResolvedUris'} # type: ignore + + + @distributed_trace + def query_by_id( + self, + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + include_deployment_settings=False, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> "_models.Model" + """query_by_id. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param include_deployment_settings: + :type include_deployment_settings: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Model, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Model + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Model"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_query_by_id_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + include_deployment_settings=include_deployment_settings, + template_url=self.query_by_id.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('Model', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + query_by_id.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{id}'} # type: ignore + + + @distributed_trace + def delete( + self, + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """delete. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: 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_delete_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.delete.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, 204]: + 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, {}) + + delete.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{id}'} # type: ignore + + + @distributed_trace + def patch( + self, + id, # type: str + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + body, # type: List["_models.Operation"] + **kwargs # type: Any + ): + # type: (...) -> "_models.Model" + """patch. + + :param id: + :type id: str + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: list[~azure.mgmt.machinelearningservices.models.Operation] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Model, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Model + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Model"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + _json = self._serialize.body(body, '[Operation]') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + _json = self._serialize.body(body, '[Operation]') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_patch_request( + id=id, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.patch.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('Model', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + patch.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{id}'} # type: ignore + + + @distributed_trace + def list_query_post( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + body=None, # type: Optional["_models.ListModelsRequest"] + **kwargs # type: Any + ): + # type: (...) -> "_models.ModelListModelsRequestPagedResponse" + """list_query_post. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.ListModelsRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelListModelsRequestPagedResponse, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelListModelsRequestPagedResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelListModelsRequestPagedResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + if body is not None: + _json = self._serialize.body(body, 'ListModelsRequest') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + if body is not None: + _json = self._serialize.body(body, 'ListModelsRequest') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_list_query_post_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.list_query_post.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('ModelListModelsRequestPagedResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_query_post.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/list'} # type: ignore + + + @distributed_trace + def batch_query( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + body=None, # type: Optional["_models.ModelBatchDto"] + **kwargs # type: Any + ): + # type: (...) -> "_models.ModelBatchResponseDto" + """batch_query. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.ModelBatchDto + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelBatchResponseDto, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelBatchResponseDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelBatchResponseDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + if body is not None: + _json = self._serialize.body(body, 'ModelBatchDto') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + if body is not None: + _json = self._serialize.body(body, 'ModelBatchDto') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_batch_query_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.batch_query.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('ModelBatchResponseDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + batch_query.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/querybatch'} # type: ignore + + + @distributed_trace + def deployment_settings( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + body=None, # type: Optional["_models.ModelSettingsIdentifiers"] + **kwargs # type: Any + ): + # type: (...) -> None + """deployment_settings. + + :param subscription_id: + :type subscription_id: str + :param resource_group_name: + :type resource_group_name: str + :param workspace_name: + :type workspace_name: str + :param body: + :type body: ~azure.mgmt.machinelearningservices.models.ModelSettingsIdentifiers + :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', {})) + + content_type = kwargs.pop('content_type', "application/json-patch+json") # type: Optional[str] + + _json = None + _content = None + if content_type.split(";")[0] in ['application/json', 'text/json']: + if body is not None: + _json = self._serialize.body(body, 'ModelSettingsIdentifiers') + elif content_type.split(";")[0] in ['application/json-patch+json', 'application/*+json']: + if body is not None: + _json = self._serialize.body(body, 'ModelSettingsIdentifiers') + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']".format(content_type) + ) + + request = build_deployment_settings_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + content=_content, + template_url=self.deployment_settings.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, {}) + + deployment_settings.metadata = {'url': '/modelregistry/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/deploymentSettings'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/py.typed b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/py.typed new file mode 100644 index 00000000..e5aff4f8 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/model_dataplane/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561.
\ No newline at end of file |