diff --git a/sdk/databox/azure-mgmt-databox/MANIFEST.in b/sdk/databox/azure-mgmt-databox/MANIFEST.in index a3cb07df87658..3a9b6517412bc 100644 --- a/sdk/databox/azure-mgmt-databox/MANIFEST.in +++ b/sdk/databox/azure-mgmt-databox/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/databox/azure-mgmt-databox/_meta.json b/sdk/databox/azure-mgmt-databox/_meta.json new file mode 100644 index 0000000000000..0f6670845ee6f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "3ba82435d1d88354a583a832f896fd2598a8509c", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/databox/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "readme": "specification/databox/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_configuration.py index 5b8f07cf262d2..bfa1285e212dc 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_configuration.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_configuration.py @@ -8,7 +8,7 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,6 +16,11 @@ from ._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential class DataBoxManagementClientConfiguration(Configuration): """Configuration for DataBoxManagementClient. diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_data_box_management_client.py index 7706fb0d1a024..4921f8d33679b 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_data_box_management_client.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_data_box_management_client.py @@ -9,12 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import ARMPipelineClient -from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING +from azure.mgmt.core import ARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + from ._configuration import DataBoxManagementClientConfiguration +from ._operations_mixin import DataBoxManagementClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse class _SDKClient(object): def __init__(self, *args, **kwargs): @@ -23,7 +33,7 @@ def __init__(self, *args, **kwargs): """ pass -class DataBoxManagementClient(MultiApiClientMixin, _SDKClient): +class DataBoxManagementClient(DataBoxManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): """The DataBox Client. This ready contains multiple API versions, to help you deal with all of the Azure clouds @@ -38,15 +48,16 @@ class DataBoxManagementClient(MultiApiClientMixin, _SDKClient): :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The Subscription Id. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2020-11-01' + DEFAULT_API_VERSION = '2021-05-01' _PROFILE_TAG = "azure.mgmt.databox.DataBoxManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -59,9 +70,9 @@ def __init__( self, credential, # type: "TokenCredential" subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + api_version=None, # type: Optional[str] + base_url=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): if not base_url: @@ -85,6 +96,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-09-01: :mod:`v2019_09_01.models` * 2020-04-01: :mod:`v2020_04_01.models` * 2020-11-01: :mod:`v2020_11_01.models` + * 2021-03-01: :mod:`v2021_03_01.models` + * 2021-05-01: :mod:`v2021_05_01.models` + * 2021-08-01-preview: :mod:`v2021_08_01_preview.models` """ if api_version == '2018-01-01': from .v2018_01_01 import models @@ -98,6 +112,15 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-11-01': from .v2020_11_01 import models return models + elif api_version == '2021-03-01': + from .v2021_03_01 import models + return models + elif api_version == '2021-05-01': + from .v2021_05_01 import models + return models + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -108,6 +131,9 @@ def jobs(self): * 2019-09-01: :class:`JobsOperations` * 2020-04-01: :class:`JobsOperations` * 2020-11-01: :class:`JobsOperations` + * 2021-03-01: :class:`JobsOperations` + * 2021-05-01: :class:`JobsOperations` + * 2021-08-01-preview: :class:`JobsOperations` """ api_version = self._get_api_version('jobs') if api_version == '2018-01-01': @@ -118,6 +144,12 @@ def jobs(self): from .v2020_04_01.operations import JobsOperations as OperationClass elif api_version == '2020-11-01': from .v2020_11_01.operations import JobsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import JobsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import JobsOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import JobsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'jobs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -130,6 +162,9 @@ def operations(self): * 2019-09-01: :class:`Operations` * 2020-04-01: :class:`Operations` * 2020-11-01: :class:`Operations` + * 2021-03-01: :class:`Operations` + * 2021-05-01: :class:`Operations` + * 2021-08-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2018-01-01': @@ -140,6 +175,12 @@ def operations(self): from .v2020_04_01.operations import Operations as OperationClass elif api_version == '2020-11-01': from .v2020_11_01.operations import Operations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import Operations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import Operations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -152,6 +193,9 @@ def service(self): * 2019-09-01: :class:`ServiceOperations` * 2020-04-01: :class:`ServiceOperations` * 2020-11-01: :class:`ServiceOperations` + * 2021-03-01: :class:`ServiceOperations` + * 2021-05-01: :class:`ServiceOperations` + * 2021-08-01-preview: :class:`ServiceOperations` """ api_version = self._get_api_version('service') if api_version == '2018-01-01': @@ -162,6 +206,12 @@ def service(self): from .v2020_04_01.operations import ServiceOperations as OperationClass elif api_version == '2020-11-01': from .v2020_11_01.operations import ServiceOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ServiceOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import ServiceOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_operations_mixin.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_operations_mixin.py new file mode 100644 index 0000000000000..9f386492252f2 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_operations_mixin.py @@ -0,0 +1,63 @@ +# 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 msrest import Serializer, Deserializer +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 HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + +class DataBoxManagementClientOperationsMixin(object): + + def mitigate( + self, + job_name, # type: str + resource_group_name, # type: str + mitigate_job_request, # type: "_models.MitigateJobRequest" + **kwargs # type: Any + ): + """Request to mitigate for a given job. + + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param mitigate_job_request: Mitigation Request. + :type mitigate_job_request: ~azure.mgmt.databox.v2021_05_01.models.MitigateJobRequest + :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 + """ + api_version = self._get_api_version('mitigate') + if api_version == '2021-03-01': + from .v2021_03_01.operations import DataBoxManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import DataBoxManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import DataBoxManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'mitigate'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.mitigate(job_name, resource_group_name, mitigate_job_request, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_configuration.py index 71fd4699f32f6..80f9b33593886 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_configuration.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_configuration.py @@ -8,7 +8,7 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,6 +16,9 @@ from .._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class DataBoxManagementClientConfiguration(Configuration): """Configuration for DataBoxManagementClient. @@ -31,8 +34,8 @@ class DataBoxManagementClientConfiguration(Configuration): def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str + credential: "AsyncTokenCredential", + subscription_id: str, **kwargs # type: Any ) -> None: if credential is None: diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_data_box_management_client.py index 3d3baff157442..7c4a1bd808e0b 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_data_box_management_client.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_data_box_management_client.py @@ -9,12 +9,20 @@ # regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Serializer, Deserializer +from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + from ._configuration import DataBoxManagementClientConfiguration +from ._operations_mixin import DataBoxManagementClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class _SDKClient(object): def __init__(self, *args, **kwargs): @@ -23,7 +31,7 @@ def __init__(self, *args, **kwargs): """ pass -class DataBoxManagementClient(MultiApiClientMixin, _SDKClient): +class DataBoxManagementClient(DataBoxManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): """The DataBox Client. This ready contains multiple API versions, to help you deal with all of the Azure clouds @@ -38,15 +46,16 @@ class DataBoxManagementClient(MultiApiClientMixin, _SDKClient): :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The Subscription Id. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2020-11-01' + DEFAULT_API_VERSION = '2021-05-01' _PROFILE_TAG = "azure.mgmt.databox.DataBoxManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -57,11 +66,11 @@ class DataBoxManagementClient(MultiApiClientMixin, _SDKClient): def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + credential: "AsyncTokenCredential", + subscription_id: str, + api_version: Optional[str] = None, + base_url: Optional[str] = None, + profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: if not base_url: @@ -85,6 +94,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-09-01: :mod:`v2019_09_01.models` * 2020-04-01: :mod:`v2020_04_01.models` * 2020-11-01: :mod:`v2020_11_01.models` + * 2021-03-01: :mod:`v2021_03_01.models` + * 2021-05-01: :mod:`v2021_05_01.models` + * 2021-08-01-preview: :mod:`v2021_08_01_preview.models` """ if api_version == '2018-01-01': from ..v2018_01_01 import models @@ -98,6 +110,15 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-11-01': from ..v2020_11_01 import models return models + elif api_version == '2021-03-01': + from ..v2021_03_01 import models + return models + elif api_version == '2021-05-01': + from ..v2021_05_01 import models + return models + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -108,6 +129,9 @@ def jobs(self): * 2019-09-01: :class:`JobsOperations` * 2020-04-01: :class:`JobsOperations` * 2020-11-01: :class:`JobsOperations` + * 2021-03-01: :class:`JobsOperations` + * 2021-05-01: :class:`JobsOperations` + * 2021-08-01-preview: :class:`JobsOperations` """ api_version = self._get_api_version('jobs') if api_version == '2018-01-01': @@ -118,6 +142,12 @@ def jobs(self): from ..v2020_04_01.aio.operations import JobsOperations as OperationClass elif api_version == '2020-11-01': from ..v2020_11_01.aio.operations import JobsOperations as OperationClass + elif api_version == '2021-03-01': + from ..v2021_03_01.aio.operations import JobsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import JobsOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import JobsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'jobs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -130,6 +160,9 @@ def operations(self): * 2019-09-01: :class:`Operations` * 2020-04-01: :class:`Operations` * 2020-11-01: :class:`Operations` + * 2021-03-01: :class:`Operations` + * 2021-05-01: :class:`Operations` + * 2021-08-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2018-01-01': @@ -140,6 +173,12 @@ def operations(self): from ..v2020_04_01.aio.operations import Operations as OperationClass elif api_version == '2020-11-01': from ..v2020_11_01.aio.operations import Operations as OperationClass + elif api_version == '2021-03-01': + from ..v2021_03_01.aio.operations import Operations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import Operations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -152,6 +191,9 @@ def service(self): * 2019-09-01: :class:`ServiceOperations` * 2020-04-01: :class:`ServiceOperations` * 2020-11-01: :class:`ServiceOperations` + * 2021-03-01: :class:`ServiceOperations` + * 2021-05-01: :class:`ServiceOperations` + * 2021-08-01-preview: :class:`ServiceOperations` """ api_version = self._get_api_version('service') if api_version == '2018-01-01': @@ -162,6 +204,12 @@ def service(self): from ..v2020_04_01.aio.operations import ServiceOperations as OperationClass elif api_version == '2020-11-01': from ..v2020_11_01.aio.operations import ServiceOperations as OperationClass + elif api_version == '2021-03-01': + from ..v2021_03_01.aio.operations import ServiceOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import ServiceOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_operations_mixin.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_operations_mixin.py new file mode 100644 index 0000000000000..565c97ca4a991 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_operations_mixin.py @@ -0,0 +1,59 @@ +# 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 msrest import Serializer, Deserializer +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, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + + +class DataBoxManagementClientOperationsMixin(object): + + async def mitigate( + self, + job_name: str, + resource_group_name: str, + mitigate_job_request: "_models.MitigateJobRequest", + **kwargs: Any + ) -> None: + """Request to mitigate for a given job. + + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param mitigate_job_request: Mitigation Request. + :type mitigate_job_request: ~azure.mgmt.databox.v2021_05_01.models.MitigateJobRequest + :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 + """ + api_version = self._get_api_version('mitigate') + if api_version == '2021-03-01': + from ..v2021_03_01.aio.operations import DataBoxManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import DataBoxManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import DataBoxManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'mitigate'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.mitigate(job_name, resource_group_name, mitigate_job_request, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models.py index 3194fab613a3d..ce393b27bae3b 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models.py @@ -4,4 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from .v2020_11_01.models import * +from .v2021_05_01.models import * diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_data_box_management_client.py index e696cb06a7805..20cc7fe56a18c 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_data_box_management_client.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_data_box_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import DataBoxManagementClientConfiguration from .operations import Operations @@ -28,11 +29,11 @@ class DataBoxManagementClient(object): """The DataBox Client. :ivar operations: Operations operations - :vartype operations: azure.mgmt.databox.operations.Operations + :vartype operations: azure.mgmt.databox.v2018_01_01.operations.Operations :ivar jobs: JobsOperations operations - :vartype jobs: azure.mgmt.databox.operations.JobsOperations + :vartype jobs: azure.mgmt.databox.v2018_01_01.operations.JobsOperations :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.databox.operations.ServiceOperations + :vartype service: azure.mgmt.databox.v2018_01_01.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The Subscription Id. @@ -66,6 +67,24 @@ def __init__( self.service = ServiceOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_metadata.json b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_metadata.json index 2f491dd3621f4..807faeb81f488 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_metadata.json +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The Subscription Id.", "docstring_type": "str", "required": true @@ -42,22 +44,62 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "operations": "Operations", "jobs": "JobsOperations", "service": "ServiceOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_version.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_version.py index eae7c95b6fbdb..e5754a47ce68f 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_version.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/_data_box_management_client.py index b192ff7cd7714..3efcb1c015e5b 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/_data_box_management_client.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/_data_box_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -26,11 +27,11 @@ class DataBoxManagementClient(object): """The DataBox Client. :ivar operations: Operations operations - :vartype operations: azure.mgmt.databox.aio.operations.Operations + :vartype operations: azure.mgmt.databox.v2018_01_01.aio.operations.Operations :ivar jobs: JobsOperations operations - :vartype jobs: azure.mgmt.databox.aio.operations.JobsOperations + :vartype jobs: azure.mgmt.databox.v2018_01_01.aio.operations.JobsOperations :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.databox.aio.operations.ServiceOperations + :vartype service: azure.mgmt.databox.v2018_01_01.aio.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The Subscription Id. @@ -63,6 +64,23 @@ def __init__( self.service = ServiceOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_jobs_operations.py index 0a54ebde341c8..728bf4f1a645e 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_jobs_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_jobs_operations.py @@ -28,7 +28,7 @@ class JobsOperations: 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.databox.models + :type models: ~azure.mgmt.databox.v2018_01_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobResourceList"]: """Lists all the jobs available under the subscription. @@ -55,7 +55,7 @@ def list( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2018_01_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -119,7 +119,7 @@ def list_by_resource_group( self, resource_group_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobResourceList"]: """Lists all the jobs available under the given resource group. @@ -130,7 +130,7 @@ def list_by_resource_group( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2018_01_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -196,7 +196,7 @@ async def get( resource_group_name: str, job_name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.JobResource": """Gets information about the specified job. @@ -210,7 +210,7 @@ async def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.JobResource + :rtype: ~azure.mgmt.databox.v2018_01_01.models.JobResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] @@ -261,7 +261,7 @@ async def _create_initial( resource_group_name: str, job_name: str, job_resource: "_models.JobResource", - **kwargs + **kwargs: Any ) -> Optional["_models.JobResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] error_map = { @@ -316,7 +316,7 @@ async def begin_create( resource_group_name: str, job_name: str, job_resource: "_models.JobResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.JobResource"]: """Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API. @@ -327,15 +327,15 @@ async def begin_create( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource: Job details from request body. - :type job_resource: ~azure.mgmt.databox.models.JobResource + :type job_resource: ~azure.mgmt.databox.v2018_01_01.models.JobResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2018_01_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -388,7 +388,7 @@ async def _delete_initial( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -430,7 +430,7 @@ async def begin_delete( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a job. @@ -441,8 +441,8 @@ async def begin_delete( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -497,7 +497,7 @@ async def _update_initial( job_name: str, job_resource_update_parameter: "_models.JobResourceUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.JobResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] error_map = { @@ -555,7 +555,7 @@ async def begin_update( job_name: str, job_resource_update_parameter: "_models.JobResourceUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.JobResource"]: """Updates the properties of an existing job. @@ -565,18 +565,18 @@ async def begin_update( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource_update_parameter: Job update parameters from request body. - :type job_resource_update_parameter: ~azure.mgmt.databox.models.JobResourceUpdateParameter + :type job_resource_update_parameter: ~azure.mgmt.databox.v2018_01_01.models.JobResourceUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2018_01_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -631,7 +631,7 @@ async def book_shipment_pick_up( resource_group_name: str, job_name: str, shipment_pick_up_request: "_models.ShipmentPickUpRequest", - **kwargs + **kwargs: Any ) -> "_models.ShipmentPickUpResponse": """Book shipment pick up. @@ -641,10 +641,10 @@ async def book_shipment_pick_up( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param shipment_pick_up_request: Details of shipment pick up request. - :type shipment_pick_up_request: ~azure.mgmt.databox.models.ShipmentPickUpRequest + :type shipment_pick_up_request: ~azure.mgmt.databox.v2018_01_01.models.ShipmentPickUpRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ShipmentPickUpResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse + :rtype: ~azure.mgmt.databox.v2018_01_01.models.ShipmentPickUpResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] @@ -698,7 +698,7 @@ async def cancel( resource_group_name: str, job_name: str, cancellation_reason: "_models.CancellationReason", - **kwargs + **kwargs: Any ) -> None: """CancelJob. @@ -708,7 +708,7 @@ async def cancel( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param cancellation_reason: Reason for cancellation. - :type cancellation_reason: ~azure.mgmt.databox.models.CancellationReason + :type cancellation_reason: ~azure.mgmt.databox.v2018_01_01.models.CancellationReason :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 @@ -759,7 +759,7 @@ def list_credentials( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UnencryptedCredentialsList"]: """This method gets the unencrypted secrets related to the job. @@ -770,7 +770,7 @@ def list_credentials( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.UnencryptedCredentialsList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2018_01_01.models.UnencryptedCredentialsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_operations.py index f0dde5272cb27..6e98411b4e931 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_operations.py @@ -26,7 +26,7 @@ class Operations: 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.databox.models + :type models: ~azure.mgmt.databox.v2018_01_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,13 +43,13 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """This method gets all the operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.OperationList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2018_01_01.models.OperationList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_service_operations.py index 10e5b276c56f2..0237aacdc9ba0 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_service_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/aio/operations/_service_operations.py @@ -26,7 +26,7 @@ class ServiceOperations: 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.databox.models + :type models: ~azure.mgmt.databox.v2018_01_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,17 +45,17 @@ def list_available_skus( self, location: str, available_sku_request: "_models.AvailableSkuRequest", - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AvailableSkusResult"]: """This method provides the list of available skus for the given subscription and location. :param location: The location of the resource. :type location: str :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :type available_sku_request: ~azure.mgmt.databox.v2018_01_01.models.AvailableSkuRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2018_01_01.models.AvailableSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] @@ -126,17 +126,17 @@ async def validate_address( self, location: str, validate_address: "_models.ValidateAddress", - **kwargs + **kwargs: Any ) -> "_models.AddressValidationOutput": """This method validates the customer shipping address and provide alternate addresses if any. :param location: The location of the resource. :type location: str :param validate_address: Shipping address of the customer. - :type validate_address: ~azure.mgmt.databox.models.ValidateAddress + :type validate_address: ~azure.mgmt.databox.v2018_01_01.models.ValidateAddress :keyword callable cls: A custom type or function that will be passed the direct response :return: AddressValidationOutput, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.AddressValidationOutput + :rtype: ~azure.mgmt.databox.v2018_01_01.models.AddressValidationOutput :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_data_box_management_client_enums.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_data_box_management_client_enums.py index d7085516d5621..f0d5adcf57e14 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_data_box_management_client_enums.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_data_box_management_client_enums.py @@ -28,117 +28,179 @@ def __getattr__(cls, name): class AccessProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - SMB = "SMB" #: Server Message Block protocol(SMB). - NFS = "NFS" #: Network File System protocol(NFS). + #: Server Message Block protocol(SMB). + SMB = "SMB" + #: Network File System protocol(NFS). + NFS = "NFS" class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of address. """ - NONE = "None" #: Address type not known. - RESIDENTIAL = "Residential" #: Residential Address. - COMMERCIAL = "Commercial" #: Commercial Address. + #: Address type not known. + NONE = "None" + #: Residential Address. + RESIDENTIAL = "Residential" + #: Commercial Address. + COMMERCIAL = "Commercial" class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The address validation status. """ - VALID = "Valid" #: Address provided is valid. - INVALID = "Invalid" #: Address provided is invalid or not supported. - AMBIGUOUS = "Ambiguous" #: Address provided is ambiguous, please choose one of the alternate addresses returned. + #: Address provided is valid. + VALID = "Valid" + #: Address provided is invalid or not supported. + INVALID = "Invalid" + #: Address provided is ambiguous, please choose one of the alternate addresses returned. + AMBIGUOUS = "Ambiguous" class ClassDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates the type of job details. """ - DATA_BOX = "DataBox" #: DataBox orders. - DATA_BOX_DISK = "DataBoxDisk" #: DataBoxDisk orders. - DATA_BOX_HEAVY = "DataBoxHeavy" #: DataBoxHeavy orders. + #: DataBox orders. + DATA_BOX = "DataBox" + #: DataBoxDisk orders. + DATA_BOX_DISK = "DataBoxDisk" + #: DataBoxHeavy orders. + DATA_BOX_HEAVY = "DataBoxHeavy" class CopyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The Status of the copy """ - NOT_STARTED = "NotStarted" #: Data copy hasn't started yet. - IN_PROGRESS = "InProgress" #: Data copy is in progress. - COMPLETED = "Completed" #: Data copy completed. - COMPLETED_WITH_ERRORS = "CompletedWithErrors" #: Data copy completed with errors. - FAILED = "Failed" #: Data copy failed. No data was copied. - NOT_RETURNED = "NotReturned" #: No copy triggered as device was not returned. + #: Data copy hasn't started yet. + NOT_STARTED = "NotStarted" + #: Data copy is in progress. + IN_PROGRESS = "InProgress" + #: Data copy completed. + COMPLETED = "Completed" + #: Data copy completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Data copy failed. No data was copied. + FAILED = "Failed" + #: No copy triggered as device was not returned. + NOT_RETURNED = "NotReturned" class DataDestinationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Data Destination Type. """ - UNKNOWN_TYPE = "UnknownType" #: Unknown type. - STORAGE_ACCOUNT = "StorageAccount" #: Storage Accounts . - MANAGED_DISK = "ManagedDisk" #: Azure Managed disk storage. + #: Unknown type. + UNKNOWN_TYPE = "UnknownType" + #: Storage Accounts . + STORAGE_ACCOUNT = "StorageAccount" + #: Azure Managed disk storage. + MANAGED_DISK = "ManagedDisk" class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Name of the stage. """ - DEVICE_PREPARED = "DevicePrepared" #: Notification at device prepared stage. - DISPATCHED = "Dispatched" #: Notification at device dispatched stage. - DELIVERED = "Delivered" #: Notification at device delivered stage. - PICKED_UP = "PickedUp" #: Notification at device picked up from user stage. - AT_AZURE_DC = "AtAzureDC" #: Notification at device received at azure datacenter stage. - DATA_COPY = "DataCopy" #: Notification at data copy started stage. + #: Notification at device prepared stage. + DEVICE_PREPARED = "DevicePrepared" + #: Notification at device dispatched stage. + DISPATCHED = "Dispatched" + #: Notification at device delivered stage. + DELIVERED = "Delivered" + #: Notification at device picked up from user stage. + PICKED_UP = "PickedUp" + #: Notification at device received at azure datacenter stage. + AT_AZURE_DC = "AtAzureDC" + #: Notification at data copy started stage. + DATA_COPY = "DataCopy" class ShareDestinationFormatType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the share. """ - UNKNOWN_TYPE = "UnknownType" #: Unknown format. - HCS = "HCS" #: StorSimple data format. - BLOCK_BLOB = "BlockBlob" #: Azure storage block blob format. - PAGE_BLOB = "PageBlob" #: Azure storage page blob format. - AZURE_FILE = "AzureFile" #: Azure storage file format. - MANAGED_DISK = "ManagedDisk" #: Azure Compute Disk. + #: Unknown format. + UNKNOWN_TYPE = "UnknownType" + #: StorSimple data format. + HCS = "HCS" + #: Azure storage block blob format. + BLOCK_BLOB = "BlockBlob" + #: Azure storage page blob format. + PAGE_BLOB = "PageBlob" + #: Azure storage file format. + AZURE_FILE = "AzureFile" + #: Azure Compute Disk. + MANAGED_DISK = "ManagedDisk" class SkuDisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Reason why the Sku is disabled. """ - NONE = "None" #: SKU is not disabled. - COUNTRY = "Country" #: SKU is not available in the requested country. - REGION = "Region" #: SKU is not available to push data to the requested Azure region. - FEATURE = "Feature" #: Required features are not enabled for the SKU. - OFFER_TYPE = "OfferType" #: Subscription does not have required offer types for the SKU. - NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription notification. + #: SKU is not disabled. + NONE = "None" + #: SKU is not available in the requested country. + COUNTRY = "Country" + #: SKU is not available to push data to the requested Azure region. + REGION = "Region" + #: Required features are not enabled for the SKU. + FEATURE = "Feature" + #: Subscription does not have required offer types for the SKU. + OFFER_TYPE = "OfferType" + #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription + #: notification. + NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - DATA_BOX = "DataBox" #: DataBox. - DATA_BOX_DISK = "DataBoxDisk" #: DataBoxDisk. - DATA_BOX_HEAVY = "DataBoxHeavy" #: DataBoxHeavy. + #: DataBox. + DATA_BOX = "DataBox" + #: DataBoxDisk. + DATA_BOX_DISK = "DataBoxDisk" + #: DataBoxHeavy. + DATA_BOX_HEAVY = "DataBoxHeavy" class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Name of the stage which is in progress. """ - DEVICE_ORDERED = "DeviceOrdered" #: An order has been created. - DEVICE_PREPARED = "DevicePrepared" #: A device has been prepared for the order. - DISPATCHED = "Dispatched" #: Device has been dispatched to the user of the order. - DELIVERED = "Delivered" #: Device has been delivered to the user of the order. - PICKED_UP = "PickedUp" #: Device has been picked up from user and in transit to azure datacenter. - AT_AZURE_DC = "AtAzureDC" #: Device has been received at azure datacenter from the user. - DATA_COPY = "DataCopy" #: Data copy from the device at azure datacenter. - COMPLETED = "Completed" #: Order has completed. - COMPLETED_WITH_ERRORS = "CompletedWithErrors" #: Order has completed with errors. - CANCELLED = "Cancelled" #: Order has been cancelled. - FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" #: Order has failed due to issue reported by user. - FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" #: Order has failed due to issue detected at azure datacenter. - ABORTED = "Aborted" #: Order has been aborted. + #: An order has been created. + DEVICE_ORDERED = "DeviceOrdered" + #: A device has been prepared for the order. + DEVICE_PREPARED = "DevicePrepared" + #: Device has been dispatched to the user of the order. + DISPATCHED = "Dispatched" + #: Device has been delivered to the user of the order. + DELIVERED = "Delivered" + #: Device has been picked up from user and in transit to azure datacenter. + PICKED_UP = "PickedUp" + #: Device has been received at azure datacenter from the user. + AT_AZURE_DC = "AtAzureDC" + #: Data copy from the device at azure datacenter. + DATA_COPY = "DataCopy" + #: Order has completed. + COMPLETED = "Completed" + #: Order has completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Order has been cancelled. + CANCELLED = "Cancelled" + #: Order has failed due to issue reported by user. + FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" + #: Order has failed due to issue detected at azure datacenter. + FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" + #: Order has been aborted. + ABORTED = "Aborted" class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of the job stage. """ - NONE = "None" #: No status available yet. - IN_PROGRESS = "InProgress" #: Stage is in progress. - SUCCEEDED = "Succeeded" #: Stage has succeeded. - FAILED = "Failed" #: Stage has failed. - CANCELLED = "Cancelled" #: Stage has been cancelled. - CANCELLING = "Cancelling" #: Stage is cancelling. - SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" #: Stage has succeeded with errors. + #: No status available yet. + NONE = "None" + #: Stage is in progress. + IN_PROGRESS = "InProgress" + #: Stage has succeeded. + SUCCEEDED = "Succeeded" + #: Stage has failed. + FAILED = "Failed" + #: Stage has been cancelled. + CANCELLED = "Cancelled" + #: Stage is cancelling. + CANCELLING = "Cancelling" + #: Stage has succeeded with errors. + SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models.py index 08c25212fb89d..a2b4a2764136e 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models.py @@ -20,7 +20,8 @@ class AccountCredentialDetails(msrest.serialization.Model): as a storage endpoint on the device. :vartype account_connection_string: str :ivar share_credential_details: Per share level unencrypted access credentials. - :vartype share_credential_details: list[~azure.mgmt.databox.models.ShareCredentialDetails] + :vartype share_credential_details: + list[~azure.mgmt.databox.v2018_01_01.models.ShareCredentialDetails] """ _validation = { @@ -52,9 +53,10 @@ class AddressValidationOutput(msrest.serialization.Model): :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2018_01_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2018_01_01.models.ShippingAddress] """ _validation = { @@ -148,7 +150,7 @@ class AvailableSkuRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar transfer_type: Required. Type of the transfer. Default value: "ImportToAzure". + :ivar transfer_type: Type of the transfer. Has constant value: "ImportToAzure". :vartype transfer_type: str :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. @@ -157,7 +159,7 @@ class AvailableSkuRequest(msrest.serialization.Model): https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str :param sku_names: Sku Names to filter for available skus. - :type sku_names: list[str or ~azure.mgmt.databox.models.SkuName] + :type sku_names: list[str or ~azure.mgmt.databox.v2018_01_01.models.SkuName] """ _validation = { @@ -191,7 +193,7 @@ class AvailableSkusResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of available skus. - :vartype value: list[~azure.mgmt.databox.models.SkuInformation] + :vartype value: list[~azure.mgmt.databox.v2018_01_01.models.SkuInformation] :param next_link: Link for the next set of skus. :type next_link: str """ @@ -255,7 +257,8 @@ class ContactDetails(msrest.serialization.Model): :param email_list: Required. List of Email-ids to be notified about job progress. :type email_list: list[str] :param notification_preference: Notification preference for a job stage. - :type notification_preference: list[~azure.mgmt.databox.models.NotificationPreference] + :type notification_preference: + list[~azure.mgmt.databox.v2018_01_01.models.NotificationPreference] """ _validation = { @@ -292,15 +295,15 @@ class CopyLogDetails(msrest.serialization.Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxHeavyAccountCopyLogDetails. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. - :ivar copy_log_details_type: Indicates the type of job details.Constant filled by server. - Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator """ _validation = { - 'copy_log_details_type': {'readonly': True}, + 'copy_log_details_type': {'required': True}, } _attribute_map = { @@ -374,9 +377,11 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): Variables are only populated by the server, and will be ignored when sending a request. - :ivar copy_log_details_type: Indicates the type of job details.Constant filled by server. - Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -384,7 +389,7 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): """ _validation = { - 'copy_log_details_type': {'readonly': True}, + 'copy_log_details_type': {'required': True}, 'account_name': {'readonly': True}, 'copy_log_link': {'readonly': True}, } @@ -410,9 +415,11 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): Variables are only populated by the server, and will be ignored when sending a request. - :ivar copy_log_details_type: Indicates the type of job details.Constant filled by server. - Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :ivar disk_serial_number: Disk Serial Number. :vartype disk_serial_number: str :ivar error_log_link: Link for copy error logs. @@ -422,7 +429,7 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): """ _validation = { - 'copy_log_details_type': {'readonly': True}, + 'copy_log_details_type': {'required': True}, 'disk_serial_number': {'readonly': True}, 'error_log_link': {'readonly': True}, 'verbose_log_link': {'readonly': True}, @@ -459,7 +466,7 @@ class DataBoxDiskCopyProgress(msrest.serialization.Model): :vartype percent_complete: int :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", "Completed", "CompletedWithErrors", "Failed", "NotReturned". - :vartype status: str or ~azure.mgmt.databox.models.CopyStatus + :vartype status: str or ~azure.mgmt.databox.v2018_01_01.models.CopyStatus """ _validation = { @@ -501,26 +508,27 @@ class JobDetails(msrest.serialization.Model): transferred in this job, in terabytes. :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2018_01_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2018_01_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2018_01_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2018_01_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2018_01_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2018_01_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. @@ -592,26 +600,27 @@ class DataBoxDiskJobDetails(JobDetails): transferred in this job, in terabytes. :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2018_01_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2018_01_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2018_01_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2018_01_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2018_01_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2018_01_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. @@ -621,7 +630,7 @@ class DataBoxDiskJobDetails(JobDetails): will be checked against an int. :type preferred_disks: dict[str, int] :ivar copy_progress: Copy progress per disk. - :vartype copy_progress: list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2018_01_01.models.DataBoxDiskCopyProgress] :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. :vartype disks_and_size_details: dict[str, int] @@ -683,15 +692,15 @@ class JobSecrets(msrest.serialization.Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: DataboxJobSecrets, DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. - :ivar job_secrets_type: Used to indicate what type of job secrets object.Constant filled by - server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator """ _validation = { - 'job_secrets_type': {'readonly': True}, + 'job_secrets_type': {'required': True}, } _attribute_map = { @@ -715,11 +724,13 @@ class DataBoxDiskJobSecrets(JobSecrets): Variables are only populated by the server, and will be ignored when sending a request. - :ivar job_secrets_type: Used to indicate what type of job secrets object.Constant filled by - server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :ivar disk_secrets: Contains the list of secrets object for that device. - :vartype disk_secrets: list[~azure.mgmt.databox.models.DiskSecret] + :vartype disk_secrets: list[~azure.mgmt.databox.v2018_01_01.models.DiskSecret] :ivar pass_key: PassKey for the disk Job. :vartype pass_key: str :ivar is_passkey_user_defined: Whether passkey was provided by user. @@ -727,7 +738,7 @@ class DataBoxDiskJobSecrets(JobSecrets): """ _validation = { - 'job_secrets_type': {'readonly': True}, + 'job_secrets_type': {'required': True}, 'disk_secrets': {'readonly': True}, 'pass_key': {'readonly': True}, 'is_passkey_user_defined': {'readonly': True}, @@ -756,9 +767,11 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): Variables are only populated by the server, and will be ignored when sending a request. - :ivar copy_log_details_type: Indicates the type of job details.Constant filled by server. - Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -766,7 +779,7 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): """ _validation = { - 'copy_log_details_type': {'readonly': True}, + 'copy_log_details_type': {'required': True}, 'account_name': {'readonly': True}, 'copy_log_link': {'readonly': True}, } @@ -798,32 +811,33 @@ class DataBoxHeavyJobDetails(JobDetails): transferred in this job, in terabytes. :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2018_01_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2018_01_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2018_01_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2018_01_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2018_01_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2018_01_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar copy_progress: Copy progress per account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2018_01_01.models.CopyProgress] """ _validation = { @@ -872,15 +886,17 @@ class DataBoxHeavyJobSecrets(JobSecrets): Variables are only populated by the server, and will be ignored when sending a request. - :ivar job_secrets_type: Used to indicate what type of job secrets object.Constant filled by - server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :ivar cabinet_pod_secrets: Contains the list of secret objects for a DataBoxHeavy job. - :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.models.DataBoxHeavySecret] + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2018_01_01.models.DataBoxHeavySecret] """ _validation = { - 'job_secrets_type': {'readonly': True}, + 'job_secrets_type': {'required': True}, 'cabinet_pod_secrets': {'readonly': True}, } @@ -908,12 +924,14 @@ class DataBoxHeavySecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2018_01_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2018_01_01.models.AccountCredentialDetails] """ _validation = { @@ -955,32 +973,33 @@ class DataBoxJobDetails(JobDetails): transferred in this job, in terabytes. :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2018_01_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2018_01_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2018_01_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2018_01_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2018_01_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2018_01_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar copy_progress: Copy progress per storage account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2018_01_01.models.CopyProgress] """ _validation = { @@ -1027,17 +1046,17 @@ def __init__( class DataboxJobSecrets(JobSecrets): """The secrets related to a DataBox job. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. - :ivar job_secrets_type: Used to indicate what type of job secrets object.Constant filled by - server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :param pod_secrets: Contains the list of secret objects for a job. - :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + :type pod_secrets: list[~azure.mgmt.databox.v2018_01_01.models.DataBoxSecret] """ _validation = { - 'job_secrets_type': {'readonly': True}, + 'job_secrets_type': {'required': True}, } _attribute_map = { @@ -1064,12 +1083,14 @@ class DataBoxSecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2018_01_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2018_01_01.models.AccountCredentialDetails] """ _validation = { @@ -1110,7 +1131,7 @@ class DestinationAccountDetails(msrest.serialization.Model): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "UnknownType", "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2018_01_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str """ @@ -1144,7 +1165,7 @@ class DestinationManagedDiskDetails(DestinationAccountDetails): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "UnknownType", "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2018_01_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param resource_group_id: Required. Destination Resource Group Id where the Compute disks @@ -1185,7 +1206,7 @@ class DestinationStorageAccountDetails(DestinationAccountDetails): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "UnknownType", "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2018_01_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param storage_account_id: Required. Destination Storage Account Arm Id. @@ -1357,7 +1378,7 @@ class Resource(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2018_01_01.models.Sku """ _validation = { @@ -1397,7 +1418,7 @@ class JobResource(Resource): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2018_01_01.models.Sku :ivar name: Name of the object. :vartype name: str :ivar id: Id of the object. @@ -1414,13 +1435,13 @@ class JobResource(Resource): "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted". - :vartype status: str or ~azure.mgmt.databox.models.StageName + :vartype status: str or ~azure.mgmt.databox.v2018_01_01.models.StageName :ivar start_time: Time at which the job was started in UTC ISO 8601 format. :vartype start_time: ~datetime.datetime :ivar error: Top level error for the job. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2018_01_01.models.Error :param details: Details of a job run. This field will only be sent for expand details filter. - :type details: ~azure.mgmt.databox.models.JobDetails + :type details: ~azure.mgmt.databox.v2018_01_01.models.JobDetails :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str """ @@ -1479,7 +1500,7 @@ class JobResourceList(msrest.serialization.Model): """Job Resource Collection. :param value: List of job resources. - :type value: list[~azure.mgmt.databox.models.JobResource] + :type value: list[~azure.mgmt.databox.v2018_01_01.models.JobResource] :param next_link: Link for the next set of job resources. :type next_link: str """ @@ -1505,9 +1526,10 @@ class JobResourceUpdateParameter(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param details: Details of a job to be updated. - :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :type details: ~azure.mgmt.databox.v2018_01_01.models.UpdateJobDetails :param destination_account_details: Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2018_01_01.models.DestinationAccountDetails] """ _attribute_map = { @@ -1535,18 +1557,18 @@ class JobStages(msrest.serialization.Model): "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted". - :vartype stage_name: str or ~azure.mgmt.databox.models.StageName + :vartype stage_name: str or ~azure.mgmt.databox.v2018_01_01.models.StageName :ivar display_name: Display name of the job stage. :vartype display_name: str :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors". - :vartype stage_status: str or ~azure.mgmt.databox.models.StageStatus + :vartype stage_status: str or ~azure.mgmt.databox.v2018_01_01.models.StageStatus :ivar stage_time: Time for the job stage in UTC ISO 8601 format. :vartype stage_time: ~datetime.datetime :ivar job_stage_details: Job Stage Details. - :vartype job_stage_details: object + :vartype job_stage_details: any :ivar error_details: Error details for the stage. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2018_01_01.models.JobErrorDetails] """ _validation = { @@ -1587,7 +1609,7 @@ class NotificationPreference(msrest.serialization.Model): :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". - :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName + :type stage_name: str or ~azure.mgmt.databox.v2018_01_01.models.NotificationStageName :param send_notification: Required. Notification is required or not. :type send_notification: bool """ @@ -1608,7 +1630,7 @@ def __init__( ): super(NotificationPreference, self).__init__(**kwargs) self.stage_name = kwargs['stage_name'] - self.send_notification = kwargs['send_notification'] + self.send_notification = kwargs.get('send_notification', True) class Operation(msrest.serialization.Model): @@ -1620,9 +1642,9 @@ class Operation(msrest.serialization.Model): {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. :vartype name: str :ivar display: Operation display values. - :vartype display: ~azure.mgmt.databox.models.OperationDisplay + :vartype display: ~azure.mgmt.databox.v2018_01_01.models.OperationDisplay :ivar properties: Operation properties. - :vartype properties: object + :vartype properties: any :ivar origin: Origin of the operation. Can be : user|system|user,system. :vartype origin: str """ @@ -1689,7 +1711,7 @@ class OperationList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of operations. - :vartype value: list[~azure.mgmt.databox.models.Operation] + :vartype value: list[~azure.mgmt.databox.v2018_01_01.models.Operation] :param next_link: Link for the next set of operations. :type next_link: str """ @@ -1775,13 +1797,14 @@ class ShareCredentialDetails(msrest.serialization.Model): :vartype share_name: str :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". - :vartype share_type: str or ~azure.mgmt.databox.models.ShareDestinationFormatType + :vartype share_type: str or ~azure.mgmt.databox.v2018_01_01.models.ShareDestinationFormatType :ivar user_name: User name for the share. :vartype user_name: str :ivar password: Password for the share. :vartype password: str :ivar supported_access_protocols: Access protocols supported on the device. - :vartype supported_access_protocols: list[str or ~azure.mgmt.databox.models.AccessProtocol] + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2018_01_01.models.AccessProtocol] """ _validation = { @@ -1904,8 +1927,8 @@ class ShippingAddress(msrest.serialization.Model): :param company_name: Name of the company. :type company_name: str :param address_type: Type of address. Possible values include: "None", "Residential", - "Commercial". - :type address_type: str or ~azure.mgmt.databox.models.AddressType + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2018_01_01.models.AddressType """ _validation = { @@ -1941,7 +1964,7 @@ def __init__( self.postal_code = kwargs['postal_code'] self.zip_extended_code = kwargs.get('zip_extended_code', None) self.company_name = kwargs.get('company_name', None) - self.address_type = kwargs.get('address_type', None) + self.address_type = kwargs.get('address_type', "None") class Sku(msrest.serialization.Model): @@ -1951,7 +1974,7 @@ class Sku(msrest.serialization.Model): :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type name: str or ~azure.mgmt.databox.models.SkuName + :type name: str or ~azure.mgmt.databox.v2018_01_01.models.SkuName :param display_name: The display name of the sku. :type display_name: str :param family: The sku family. @@ -2044,21 +2067,21 @@ class SkuInformation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.databox.models.Sku + :vartype sku: ~azure.mgmt.databox.v2018_01_01.models.Sku :ivar enabled: The sku is enabled or not. :vartype enabled: bool :ivar destination_to_service_location_map: The map of destination location to service location. :vartype destination_to_service_location_map: - list[~azure.mgmt.databox.models.DestinationToServiceLocationMap] + list[~azure.mgmt.databox.v2018_01_01.models.DestinationToServiceLocationMap] :ivar capacity: Capacity of the Sku. - :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :vartype capacity: ~azure.mgmt.databox.v2018_01_01.models.SkuCapacity :ivar costs: Cost of the Sku. - :vartype costs: list[~azure.mgmt.databox.models.SkuCost] + :vartype costs: list[~azure.mgmt.databox.v2018_01_01.models.SkuCost] :ivar api_versions: Api versions that support this Sku. :vartype api_versions: list[str] :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". - :vartype disabled_reason: str or ~azure.mgmt.databox.models.SkuDisabledReason + :vartype disabled_reason: str or ~azure.mgmt.databox.v2018_01_01.models.SkuDisabledReason :ivar disabled_reason_message: Message for why the Sku is disabled. :vartype disabled_reason_message: str :ivar required_feature: Required feature to access the sku. @@ -2113,7 +2136,7 @@ class UnencryptedCredentials(msrest.serialization.Model): :ivar job_name: Name of the job. :vartype job_name: str :ivar job_secrets: Secrets related to this job. - :vartype job_secrets: ~azure.mgmt.databox.models.JobSecrets + :vartype job_secrets: ~azure.mgmt.databox.v2018_01_01.models.JobSecrets """ _validation = { @@ -2139,7 +2162,7 @@ class UnencryptedCredentialsList(msrest.serialization.Model): """List of unencrypted credentials for accessing device. :param value: List of unencrypted credentials. - :type value: list[~azure.mgmt.databox.models.UnencryptedCredentials] + :type value: list[~azure.mgmt.databox.v2018_01_01.models.UnencryptedCredentials] :param next_link: Link for the next set of unencrypted credentials. :type next_link: str """ @@ -2162,9 +2185,9 @@ class UpdateJobDetails(msrest.serialization.Model): """Job details for update. :param contact_details: Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2018_01_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress """ _attribute_map = { @@ -2187,10 +2210,10 @@ class ValidateAddress(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2018_01_01.models.SkuName """ _validation = { diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models_py3.py index 250d9d2dfe7dc..9c3c5650855df 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models_py3.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models_py3.py @@ -25,7 +25,8 @@ class AccountCredentialDetails(msrest.serialization.Model): as a storage endpoint on the device. :vartype account_connection_string: str :ivar share_credential_details: Per share level unencrypted access credentials. - :vartype share_credential_details: list[~azure.mgmt.databox.models.ShareCredentialDetails] + :vartype share_credential_details: + list[~azure.mgmt.databox.v2018_01_01.models.ShareCredentialDetails] """ _validation = { @@ -57,9 +58,10 @@ class AddressValidationOutput(msrest.serialization.Model): :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2018_01_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2018_01_01.models.ShippingAddress] """ _validation = { @@ -153,7 +155,7 @@ class AvailableSkuRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar transfer_type: Required. Type of the transfer. Default value: "ImportToAzure". + :ivar transfer_type: Type of the transfer. Has constant value: "ImportToAzure". :vartype transfer_type: str :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. @@ -162,7 +164,7 @@ class AvailableSkuRequest(msrest.serialization.Model): https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str :param sku_names: Sku Names to filter for available skus. - :type sku_names: list[str or ~azure.mgmt.databox.models.SkuName] + :type sku_names: list[str or ~azure.mgmt.databox.v2018_01_01.models.SkuName] """ _validation = { @@ -200,7 +202,7 @@ class AvailableSkusResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of available skus. - :vartype value: list[~azure.mgmt.databox.models.SkuInformation] + :vartype value: list[~azure.mgmt.databox.v2018_01_01.models.SkuInformation] :param next_link: Link for the next set of skus. :type next_link: str """ @@ -268,7 +270,8 @@ class ContactDetails(msrest.serialization.Model): :param email_list: Required. List of Email-ids to be notified about job progress. :type email_list: list[str] :param notification_preference: Notification preference for a job stage. - :type notification_preference: list[~azure.mgmt.databox.models.NotificationPreference] + :type notification_preference: + list[~azure.mgmt.databox.v2018_01_01.models.NotificationPreference] """ _validation = { @@ -312,15 +315,15 @@ class CopyLogDetails(msrest.serialization.Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxHeavyAccountCopyLogDetails. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. - :ivar copy_log_details_type: Indicates the type of job details.Constant filled by server. - Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator """ _validation = { - 'copy_log_details_type': {'readonly': True}, + 'copy_log_details_type': {'required': True}, } _attribute_map = { @@ -394,9 +397,11 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): Variables are only populated by the server, and will be ignored when sending a request. - :ivar copy_log_details_type: Indicates the type of job details.Constant filled by server. - Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -404,7 +409,7 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): """ _validation = { - 'copy_log_details_type': {'readonly': True}, + 'copy_log_details_type': {'required': True}, 'account_name': {'readonly': True}, 'copy_log_link': {'readonly': True}, } @@ -430,9 +435,11 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): Variables are only populated by the server, and will be ignored when sending a request. - :ivar copy_log_details_type: Indicates the type of job details.Constant filled by server. - Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :ivar disk_serial_number: Disk Serial Number. :vartype disk_serial_number: str :ivar error_log_link: Link for copy error logs. @@ -442,7 +449,7 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): """ _validation = { - 'copy_log_details_type': {'readonly': True}, + 'copy_log_details_type': {'required': True}, 'disk_serial_number': {'readonly': True}, 'error_log_link': {'readonly': True}, 'verbose_log_link': {'readonly': True}, @@ -479,7 +486,7 @@ class DataBoxDiskCopyProgress(msrest.serialization.Model): :vartype percent_complete: int :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", "Completed", "CompletedWithErrors", "Failed", "NotReturned". - :vartype status: str or ~azure.mgmt.databox.models.CopyStatus + :vartype status: str or ~azure.mgmt.databox.v2018_01_01.models.CopyStatus """ _validation = { @@ -521,26 +528,27 @@ class JobDetails(msrest.serialization.Model): transferred in this job, in terabytes. :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2018_01_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2018_01_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2018_01_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2018_01_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2018_01_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2018_01_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. @@ -618,26 +626,27 @@ class DataBoxDiskJobDetails(JobDetails): transferred in this job, in terabytes. :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2018_01_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2018_01_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2018_01_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2018_01_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2018_01_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2018_01_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. @@ -647,7 +656,7 @@ class DataBoxDiskJobDetails(JobDetails): will be checked against an int. :type preferred_disks: dict[str, int] :ivar copy_progress: Copy progress per disk. - :vartype copy_progress: list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2018_01_01.models.DataBoxDiskCopyProgress] :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. :vartype disks_and_size_details: dict[str, int] @@ -717,15 +726,15 @@ class JobSecrets(msrest.serialization.Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: DataboxJobSecrets, DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. - :ivar job_secrets_type: Used to indicate what type of job secrets object.Constant filled by - server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator """ _validation = { - 'job_secrets_type': {'readonly': True}, + 'job_secrets_type': {'required': True}, } _attribute_map = { @@ -749,11 +758,13 @@ class DataBoxDiskJobSecrets(JobSecrets): Variables are only populated by the server, and will be ignored when sending a request. - :ivar job_secrets_type: Used to indicate what type of job secrets object.Constant filled by - server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :ivar disk_secrets: Contains the list of secrets object for that device. - :vartype disk_secrets: list[~azure.mgmt.databox.models.DiskSecret] + :vartype disk_secrets: list[~azure.mgmt.databox.v2018_01_01.models.DiskSecret] :ivar pass_key: PassKey for the disk Job. :vartype pass_key: str :ivar is_passkey_user_defined: Whether passkey was provided by user. @@ -761,7 +772,7 @@ class DataBoxDiskJobSecrets(JobSecrets): """ _validation = { - 'job_secrets_type': {'readonly': True}, + 'job_secrets_type': {'required': True}, 'disk_secrets': {'readonly': True}, 'pass_key': {'readonly': True}, 'is_passkey_user_defined': {'readonly': True}, @@ -790,9 +801,11 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): Variables are only populated by the server, and will be ignored when sending a request. - :ivar copy_log_details_type: Indicates the type of job details.Constant filled by server. - Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -800,7 +813,7 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): """ _validation = { - 'copy_log_details_type': {'readonly': True}, + 'copy_log_details_type': {'required': True}, 'account_name': {'readonly': True}, 'copy_log_link': {'readonly': True}, } @@ -832,32 +845,33 @@ class DataBoxHeavyJobDetails(JobDetails): transferred in this job, in terabytes. :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2018_01_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2018_01_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2018_01_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2018_01_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2018_01_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2018_01_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar copy_progress: Copy progress per account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2018_01_01.models.CopyProgress] """ _validation = { @@ -912,15 +926,17 @@ class DataBoxHeavyJobSecrets(JobSecrets): Variables are only populated by the server, and will be ignored when sending a request. - :ivar job_secrets_type: Used to indicate what type of job secrets object.Constant filled by - server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :ivar cabinet_pod_secrets: Contains the list of secret objects for a DataBoxHeavy job. - :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.models.DataBoxHeavySecret] + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2018_01_01.models.DataBoxHeavySecret] """ _validation = { - 'job_secrets_type': {'readonly': True}, + 'job_secrets_type': {'required': True}, 'cabinet_pod_secrets': {'readonly': True}, } @@ -948,12 +964,14 @@ class DataBoxHeavySecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2018_01_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2018_01_01.models.AccountCredentialDetails] """ _validation = { @@ -995,32 +1013,33 @@ class DataBoxJobDetails(JobDetails): transferred in this job, in terabytes. :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2018_01_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2018_01_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2018_01_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2018_01_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2018_01_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2018_01_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2018_01_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar copy_progress: Copy progress per storage account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2018_01_01.models.CopyProgress] """ _validation = { @@ -1073,17 +1092,17 @@ def __init__( class DataboxJobSecrets(JobSecrets): """The secrets related to a DataBox job. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. - :ivar job_secrets_type: Used to indicate what type of job secrets object.Constant filled by - server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :vartype job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2018_01_01.models.ClassDiscriminator :param pod_secrets: Contains the list of secret objects for a job. - :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + :type pod_secrets: list[~azure.mgmt.databox.v2018_01_01.models.DataBoxSecret] """ _validation = { - 'job_secrets_type': {'readonly': True}, + 'job_secrets_type': {'required': True}, } _attribute_map = { @@ -1112,12 +1131,14 @@ class DataBoxSecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2018_01_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2018_01_01.models.AccountCredentialDetails] """ _validation = { @@ -1158,7 +1179,7 @@ class DestinationAccountDetails(msrest.serialization.Model): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "UnknownType", "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2018_01_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str """ @@ -1194,7 +1215,7 @@ class DestinationManagedDiskDetails(DestinationAccountDetails): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "UnknownType", "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2018_01_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param resource_group_id: Required. Destination Resource Group Id where the Compute disks @@ -1239,7 +1260,7 @@ class DestinationStorageAccountDetails(DestinationAccountDetails): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "UnknownType", "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2018_01_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param storage_account_id: Required. Destination Storage Account Arm Id. @@ -1414,7 +1435,7 @@ class Resource(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2018_01_01.models.Sku """ _validation = { @@ -1458,7 +1479,7 @@ class JobResource(Resource): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2018_01_01.models.Sku :ivar name: Name of the object. :vartype name: str :ivar id: Id of the object. @@ -1475,13 +1496,13 @@ class JobResource(Resource): "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted". - :vartype status: str or ~azure.mgmt.databox.models.StageName + :vartype status: str or ~azure.mgmt.databox.v2018_01_01.models.StageName :ivar start_time: Time at which the job was started in UTC ISO 8601 format. :vartype start_time: ~datetime.datetime :ivar error: Top level error for the job. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2018_01_01.models.Error :param details: Details of a job run. This field will only be sent for expand details filter. - :type details: ~azure.mgmt.databox.models.JobDetails + :type details: ~azure.mgmt.databox.v2018_01_01.models.JobDetails :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str """ @@ -1545,7 +1566,7 @@ class JobResourceList(msrest.serialization.Model): """Job Resource Collection. :param value: List of job resources. - :type value: list[~azure.mgmt.databox.models.JobResource] + :type value: list[~azure.mgmt.databox.v2018_01_01.models.JobResource] :param next_link: Link for the next set of job resources. :type next_link: str """ @@ -1574,9 +1595,10 @@ class JobResourceUpdateParameter(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param details: Details of a job to be updated. - :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :type details: ~azure.mgmt.databox.v2018_01_01.models.UpdateJobDetails :param destination_account_details: Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2018_01_01.models.DestinationAccountDetails] """ _attribute_map = { @@ -1608,18 +1630,18 @@ class JobStages(msrest.serialization.Model): "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted". - :vartype stage_name: str or ~azure.mgmt.databox.models.StageName + :vartype stage_name: str or ~azure.mgmt.databox.v2018_01_01.models.StageName :ivar display_name: Display name of the job stage. :vartype display_name: str :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors". - :vartype stage_status: str or ~azure.mgmt.databox.models.StageStatus + :vartype stage_status: str or ~azure.mgmt.databox.v2018_01_01.models.StageStatus :ivar stage_time: Time for the job stage in UTC ISO 8601 format. :vartype stage_time: ~datetime.datetime :ivar job_stage_details: Job Stage Details. - :vartype job_stage_details: object + :vartype job_stage_details: any :ivar error_details: Error details for the stage. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2018_01_01.models.JobErrorDetails] """ _validation = { @@ -1660,7 +1682,7 @@ class NotificationPreference(msrest.serialization.Model): :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". - :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName + :type stage_name: str or ~azure.mgmt.databox.v2018_01_01.models.NotificationStageName :param send_notification: Required. Notification is required or not. :type send_notification: bool """ @@ -1679,7 +1701,7 @@ def __init__( self, *, stage_name: Union[str, "NotificationStageName"], - send_notification: bool, + send_notification: bool = True, **kwargs ): super(NotificationPreference, self).__init__(**kwargs) @@ -1696,9 +1718,9 @@ class Operation(msrest.serialization.Model): {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. :vartype name: str :ivar display: Operation display values. - :vartype display: ~azure.mgmt.databox.models.OperationDisplay + :vartype display: ~azure.mgmt.databox.v2018_01_01.models.OperationDisplay :ivar properties: Operation properties. - :vartype properties: object + :vartype properties: any :ivar origin: Origin of the operation. Can be : user|system|user,system. :vartype origin: str """ @@ -1770,7 +1792,7 @@ class OperationList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of operations. - :vartype value: list[~azure.mgmt.databox.models.Operation] + :vartype value: list[~azure.mgmt.databox.v2018_01_01.models.Operation] :param next_link: Link for the next set of operations. :type next_link: str """ @@ -1860,13 +1882,14 @@ class ShareCredentialDetails(msrest.serialization.Model): :vartype share_name: str :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". - :vartype share_type: str or ~azure.mgmt.databox.models.ShareDestinationFormatType + :vartype share_type: str or ~azure.mgmt.databox.v2018_01_01.models.ShareDestinationFormatType :ivar user_name: User name for the share. :vartype user_name: str :ivar password: Password for the share. :vartype password: str :ivar supported_access_protocols: Access protocols supported on the device. - :vartype supported_access_protocols: list[str or ~azure.mgmt.databox.models.AccessProtocol] + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2018_01_01.models.AccessProtocol] """ _validation = { @@ -1993,8 +2016,8 @@ class ShippingAddress(msrest.serialization.Model): :param company_name: Name of the company. :type company_name: str :param address_type: Type of address. Possible values include: "None", "Residential", - "Commercial". - :type address_type: str or ~azure.mgmt.databox.models.AddressType + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2018_01_01.models.AddressType """ _validation = { @@ -2028,7 +2051,7 @@ def __init__( state_or_province: Optional[str] = None, zip_extended_code: Optional[str] = None, company_name: Optional[str] = None, - address_type: Optional[Union[str, "AddressType"]] = None, + address_type: Optional[Union[str, "AddressType"]] = "None", **kwargs ): super(ShippingAddress, self).__init__(**kwargs) @@ -2051,7 +2074,7 @@ class Sku(msrest.serialization.Model): :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type name: str or ~azure.mgmt.databox.models.SkuName + :type name: str or ~azure.mgmt.databox.v2018_01_01.models.SkuName :param display_name: The display name of the sku. :type display_name: str :param family: The sku family. @@ -2148,21 +2171,21 @@ class SkuInformation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.databox.models.Sku + :vartype sku: ~azure.mgmt.databox.v2018_01_01.models.Sku :ivar enabled: The sku is enabled or not. :vartype enabled: bool :ivar destination_to_service_location_map: The map of destination location to service location. :vartype destination_to_service_location_map: - list[~azure.mgmt.databox.models.DestinationToServiceLocationMap] + list[~azure.mgmt.databox.v2018_01_01.models.DestinationToServiceLocationMap] :ivar capacity: Capacity of the Sku. - :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :vartype capacity: ~azure.mgmt.databox.v2018_01_01.models.SkuCapacity :ivar costs: Cost of the Sku. - :vartype costs: list[~azure.mgmt.databox.models.SkuCost] + :vartype costs: list[~azure.mgmt.databox.v2018_01_01.models.SkuCost] :ivar api_versions: Api versions that support this Sku. :vartype api_versions: list[str] :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". - :vartype disabled_reason: str or ~azure.mgmt.databox.models.SkuDisabledReason + :vartype disabled_reason: str or ~azure.mgmt.databox.v2018_01_01.models.SkuDisabledReason :ivar disabled_reason_message: Message for why the Sku is disabled. :vartype disabled_reason_message: str :ivar required_feature: Required feature to access the sku. @@ -2217,7 +2240,7 @@ class UnencryptedCredentials(msrest.serialization.Model): :ivar job_name: Name of the job. :vartype job_name: str :ivar job_secrets: Secrets related to this job. - :vartype job_secrets: ~azure.mgmt.databox.models.JobSecrets + :vartype job_secrets: ~azure.mgmt.databox.v2018_01_01.models.JobSecrets """ _validation = { @@ -2243,7 +2266,7 @@ class UnencryptedCredentialsList(msrest.serialization.Model): """List of unencrypted credentials for accessing device. :param value: List of unencrypted credentials. - :type value: list[~azure.mgmt.databox.models.UnencryptedCredentials] + :type value: list[~azure.mgmt.databox.v2018_01_01.models.UnencryptedCredentials] :param next_link: Link for the next set of unencrypted credentials. :type next_link: str """ @@ -2269,9 +2292,9 @@ class UpdateJobDetails(msrest.serialization.Model): """Job details for update. :param contact_details: Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2018_01_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress """ _attribute_map = { @@ -2297,10 +2320,10 @@ class ValidateAddress(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2018_01_01.models.ShippingAddress :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2018_01_01.models.SkuName """ _validation = { diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_jobs_operations.py index 680eb7dbdbdd2..6e878884ca7a1 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_jobs_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_jobs_operations.py @@ -32,7 +32,7 @@ class JobsOperations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2018_01_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2018_01_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -136,7 +136,7 @@ def list_by_resource_group( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2018_01_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -217,7 +217,7 @@ def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.JobResource + :rtype: ~azure.mgmt.databox.v2018_01_01.models.JobResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] @@ -336,15 +336,15 @@ def begin_create( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource: Job details from request body. - :type job_resource: ~azure.mgmt.databox.models.JobResource + :type job_resource: ~azure.mgmt.databox.v2018_01_01.models.JobResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2018_01_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -452,8 +452,8 @@ def begin_delete( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -578,18 +578,18 @@ def begin_update( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource_update_parameter: Job update parameters from request body. - :type job_resource_update_parameter: ~azure.mgmt.databox.models.JobResourceUpdateParameter + :type job_resource_update_parameter: ~azure.mgmt.databox.v2018_01_01.models.JobResourceUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2018_01_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -655,10 +655,10 @@ def book_shipment_pick_up( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param shipment_pick_up_request: Details of shipment pick up request. - :type shipment_pick_up_request: ~azure.mgmt.databox.models.ShipmentPickUpRequest + :type shipment_pick_up_request: ~azure.mgmt.databox.v2018_01_01.models.ShipmentPickUpRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ShipmentPickUpResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse + :rtype: ~azure.mgmt.databox.v2018_01_01.models.ShipmentPickUpResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] @@ -723,7 +723,7 @@ def cancel( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param cancellation_reason: Reason for cancellation. - :type cancellation_reason: ~azure.mgmt.databox.models.CancellationReason + :type cancellation_reason: ~azure.mgmt.databox.v2018_01_01.models.CancellationReason :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 @@ -786,7 +786,7 @@ def list_credentials( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.UnencryptedCredentialsList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2018_01_01.models.UnencryptedCredentialsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_operations.py index c67bbf185f943..42c815ab3b927 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_operations.py @@ -30,7 +30,7 @@ class Operations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2018_01_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.OperationList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2018_01_01.models.OperationList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_service_operations.py index 1bd91217c4897..4ce1cb3a57685 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_service_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_service_operations.py @@ -30,7 +30,7 @@ class ServiceOperations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2018_01_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -57,10 +57,10 @@ def list_available_skus( :param location: The location of the resource. :type location: str :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :type available_sku_request: ~azure.mgmt.databox.v2018_01_01.models.AvailableSkuRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2018_01_01.models.AvailableSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] @@ -139,10 +139,10 @@ def validate_address( :param location: The location of the resource. :type location: str :param validate_address: Shipping address of the customer. - :type validate_address: ~azure.mgmt.databox.models.ValidateAddress + :type validate_address: ~azure.mgmt.databox.v2018_01_01.models.ValidateAddress :keyword callable cls: A custom type or function that will be passed the direct response :return: AddressValidationOutput, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.AddressValidationOutput + :rtype: ~azure.mgmt.databox.v2018_01_01.models.AddressValidationOutput :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_data_box_management_client.py index e696cb06a7805..3001ede3afdf7 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_data_box_management_client.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_data_box_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import DataBoxManagementClientConfiguration from .operations import Operations @@ -28,11 +29,11 @@ class DataBoxManagementClient(object): """The DataBox Client. :ivar operations: Operations operations - :vartype operations: azure.mgmt.databox.operations.Operations + :vartype operations: azure.mgmt.databox.v2019_09_01.operations.Operations :ivar jobs: JobsOperations operations - :vartype jobs: azure.mgmt.databox.operations.JobsOperations + :vartype jobs: azure.mgmt.databox.v2019_09_01.operations.JobsOperations :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.databox.operations.ServiceOperations + :vartype service: azure.mgmt.databox.v2019_09_01.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The Subscription Id. @@ -66,6 +67,24 @@ def __init__( self.service = ServiceOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_metadata.json b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_metadata.json index 10c0c55446ae3..c095c033f8c08 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_metadata.json +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The Subscription Id.", "docstring_type": "str", "required": true @@ -42,22 +44,62 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "operations": "Operations", "jobs": "JobsOperations", "service": "ServiceOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_version.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_version.py index eae7c95b6fbdb..e5754a47ce68f 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_version.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/_data_box_management_client.py index b192ff7cd7714..8f1e0ef45b704 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/_data_box_management_client.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/_data_box_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -26,11 +27,11 @@ class DataBoxManagementClient(object): """The DataBox Client. :ivar operations: Operations operations - :vartype operations: azure.mgmt.databox.aio.operations.Operations + :vartype operations: azure.mgmt.databox.v2019_09_01.aio.operations.Operations :ivar jobs: JobsOperations operations - :vartype jobs: azure.mgmt.databox.aio.operations.JobsOperations + :vartype jobs: azure.mgmt.databox.v2019_09_01.aio.operations.JobsOperations :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.databox.aio.operations.ServiceOperations + :vartype service: azure.mgmt.databox.v2019_09_01.aio.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The Subscription Id. @@ -63,6 +64,23 @@ def __init__( self.service = ServiceOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_jobs_operations.py index f01a52d0a1a92..8d78b487c8818 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_jobs_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_jobs_operations.py @@ -28,7 +28,7 @@ class JobsOperations: 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.databox.models + :type models: ~azure.mgmt.databox.v2019_09_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobResourceList"]: """Lists all the jobs available under the subscription. @@ -55,7 +55,7 @@ def list( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2019_09_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -119,7 +119,7 @@ def list_by_resource_group( self, resource_group_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobResourceList"]: """Lists all the jobs available under the given resource group. @@ -130,7 +130,7 @@ def list_by_resource_group( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2019_09_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -196,7 +196,7 @@ async def get( resource_group_name: str, job_name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.JobResource": """Gets information about the specified job. @@ -210,7 +210,7 @@ async def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.JobResource + :rtype: ~azure.mgmt.databox.v2019_09_01.models.JobResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] @@ -261,7 +261,7 @@ async def _create_initial( resource_group_name: str, job_name: str, job_resource: "_models.JobResource", - **kwargs + **kwargs: Any ) -> Optional["_models.JobResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] error_map = { @@ -316,7 +316,7 @@ async def begin_create( resource_group_name: str, job_name: str, job_resource: "_models.JobResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.JobResource"]: """Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API. @@ -327,15 +327,15 @@ async def begin_create( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource: Job details from request body. - :type job_resource: ~azure.mgmt.databox.models.JobResource + :type job_resource: ~azure.mgmt.databox.v2019_09_01.models.JobResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2019_09_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -388,7 +388,7 @@ async def _delete_initial( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -432,7 +432,7 @@ async def begin_delete( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a job. @@ -443,8 +443,8 @@ async def begin_delete( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -499,7 +499,7 @@ async def _update_initial( job_name: str, job_resource_update_parameter: "_models.JobResourceUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.JobResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] error_map = { @@ -557,7 +557,7 @@ async def begin_update( job_name: str, job_resource_update_parameter: "_models.JobResourceUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.JobResource"]: """Updates the properties of an existing job. @@ -567,18 +567,18 @@ async def begin_update( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource_update_parameter: Job update parameters from request body. - :type job_resource_update_parameter: ~azure.mgmt.databox.models.JobResourceUpdateParameter + :type job_resource_update_parameter: ~azure.mgmt.databox.v2019_09_01.models.JobResourceUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2019_09_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -633,7 +633,7 @@ async def book_shipment_pick_up( resource_group_name: str, job_name: str, shipment_pick_up_request: "_models.ShipmentPickUpRequest", - **kwargs + **kwargs: Any ) -> "_models.ShipmentPickUpResponse": """Book shipment pick up. @@ -643,10 +643,10 @@ async def book_shipment_pick_up( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param shipment_pick_up_request: Details of shipment pick up request. - :type shipment_pick_up_request: ~azure.mgmt.databox.models.ShipmentPickUpRequest + :type shipment_pick_up_request: ~azure.mgmt.databox.v2019_09_01.models.ShipmentPickUpRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ShipmentPickUpResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse + :rtype: ~azure.mgmt.databox.v2019_09_01.models.ShipmentPickUpResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] @@ -700,7 +700,7 @@ async def cancel( resource_group_name: str, job_name: str, cancellation_reason: "_models.CancellationReason", - **kwargs + **kwargs: Any ) -> None: """CancelJob. @@ -710,7 +710,7 @@ async def cancel( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param cancellation_reason: Reason for cancellation. - :type cancellation_reason: ~azure.mgmt.databox.models.CancellationReason + :type cancellation_reason: ~azure.mgmt.databox.v2019_09_01.models.CancellationReason :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 @@ -763,7 +763,7 @@ def list_credentials( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UnencryptedCredentialsList"]: """This method gets the unencrypted secrets related to the job. @@ -774,7 +774,7 @@ def list_credentials( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.UnencryptedCredentialsList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2019_09_01.models.UnencryptedCredentialsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_operations.py index bd99838be8c3d..caa3286212b65 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_operations.py @@ -26,7 +26,7 @@ class Operations: 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.databox.models + :type models: ~azure.mgmt.databox.v2019_09_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,13 +43,13 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """This method gets all the operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.OperationList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2019_09_01.models.OperationList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_service_operations.py index a07ce55b508d8..38664ef07c244 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_service_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/aio/operations/_service_operations.py @@ -26,7 +26,7 @@ class ServiceOperations: 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.databox.models + :type models: ~azure.mgmt.databox.v2019_09_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,17 +45,17 @@ def list_available_skus( self, location: str, available_sku_request: "_models.AvailableSkuRequest", - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AvailableSkusResult"]: """This method provides the list of available skus for the given subscription and location. :param location: The location of the resource. :type location: str :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :type available_sku_request: ~azure.mgmt.databox.v2019_09_01.models.AvailableSkuRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2019_09_01.models.AvailableSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] @@ -127,7 +127,7 @@ def list_available_skus_by_resource_group( resource_group_name: str, location: str, available_sku_request: "_models.AvailableSkuRequest", - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AvailableSkusResult"]: """This method provides the list of available skus for the given subscription, resource group and location. @@ -137,10 +137,10 @@ def list_available_skus_by_resource_group( :param location: The location of the resource. :type location: str :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :type available_sku_request: ~azure.mgmt.databox.v2019_09_01.models.AvailableSkuRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2019_09_01.models.AvailableSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] @@ -212,7 +212,7 @@ async def validate_address( self, location: str, validate_address: "_models.ValidateAddress", - **kwargs + **kwargs: Any ) -> "_models.AddressValidationOutput": """[DEPRECATED NOTICE: This operation will soon be removed] This method validates the customer shipping address and provide alternate addresses if any. @@ -220,10 +220,10 @@ async def validate_address( :param location: The location of the resource. :type location: str :param validate_address: Shipping address of the customer. - :type validate_address: ~azure.mgmt.databox.models.ValidateAddress + :type validate_address: ~azure.mgmt.databox.v2019_09_01.models.ValidateAddress :keyword callable cls: A custom type or function that will be passed the direct response :return: AddressValidationOutput, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.AddressValidationOutput + :rtype: ~azure.mgmt.databox.v2019_09_01.models.AddressValidationOutput :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] @@ -276,7 +276,7 @@ async def validate_inputs_by_resource_group( resource_group_name: str, location: str, validation_request: "_models.ValidationRequest", - **kwargs + **kwargs: Any ) -> "_models.ValidationResponse": """This method does all necessary pre-job creation validation under resource group. @@ -285,10 +285,10 @@ async def validate_inputs_by_resource_group( :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2019_09_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2019_09_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -341,17 +341,17 @@ async def validate_inputs( self, location: str, validation_request: "_models.ValidationRequest", - **kwargs + **kwargs: Any ) -> "_models.ValidationResponse": """This method does all necessary pre-job creation validation under subscription. :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2019_09_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2019_09_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -403,17 +403,17 @@ async def region_configuration( self, location: str, region_configuration_request: "_models.RegionConfigurationRequest", - **kwargs + **kwargs: Any ) -> "_models.RegionConfigurationResponse": """This API provides configuration details specific to given region/location. :param location: The location of the resource. :type location: str :param region_configuration_request: Request body to get the configuration for the region. - :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :type region_configuration_request: ~azure.mgmt.databox.v2019_09_01.models.RegionConfigurationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: RegionConfigurationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :rtype: ~azure.mgmt.databox.v2019_09_01.models.RegionConfigurationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_data_box_management_client_enums.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_data_box_management_client_enums.py index e3da769b08c07..263a8225e653a 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_data_box_management_client_enums.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_data_box_management_client_enums.py @@ -28,165 +28,250 @@ def __getattr__(cls, name): class AccessProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - SMB = "SMB" #: Server Message Block protocol(SMB). - NFS = "NFS" #: Network File System protocol(NFS). + #: Server Message Block protocol(SMB). + SMB = "SMB" + #: Network File System protocol(NFS). + NFS = "NFS" class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of address. """ - NONE = "None" #: Address type not known. - RESIDENTIAL = "Residential" #: Residential Address. - COMMERCIAL = "Commercial" #: Commercial Address. + #: Address type not known. + NONE = "None" + #: Residential Address. + RESIDENTIAL = "Residential" + #: Commercial Address. + COMMERCIAL = "Commercial" class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The address validation status. """ - VALID = "Valid" #: Address provided is valid. - INVALID = "Invalid" #: Address provided is invalid or not supported. - AMBIGUOUS = "Ambiguous" #: Address provided is ambiguous, please choose one of the alternate addresses returned. + #: Address provided is valid. + VALID = "Valid" + #: Address provided is invalid or not supported. + INVALID = "Invalid" + #: Address provided is ambiguous, please choose one of the alternate addresses returned. + AMBIGUOUS = "Ambiguous" class ClassDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates the type of job details. """ - DATA_BOX = "DataBox" #: Databox orders. - DATA_BOX_DISK = "DataBoxDisk" #: DataboxDisk orders. - DATA_BOX_HEAVY = "DataBoxHeavy" #: DataboxHeavy orders. + #: Databox orders. + DATA_BOX = "DataBox" + #: DataboxDisk orders. + DATA_BOX_DISK = "DataBoxDisk" + #: DataboxHeavy orders. + DATA_BOX_HEAVY = "DataBoxHeavy" class CopyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The Status of the copy """ - NOT_STARTED = "NotStarted" #: Data copy hasn't started yet. - IN_PROGRESS = "InProgress" #: Data copy is in progress. - COMPLETED = "Completed" #: Data copy completed. - COMPLETED_WITH_ERRORS = "CompletedWithErrors" #: Data copy completed with errors. - FAILED = "Failed" #: Data copy failed. No data was copied. - NOT_RETURNED = "NotReturned" #: No copy triggered as device was not returned. - HARDWARE_ERROR = "HardwareError" #: The Device has hit hardware issues. - DEVICE_FORMATTED = "DeviceFormatted" #: Data copy failed. The Device was formatted by user. - DEVICE_METADATA_MODIFIED = "DeviceMetadataModified" #: Data copy failed. Device metadata was modified by user. - STORAGE_ACCOUNT_NOT_ACCESSIBLE = "StorageAccountNotAccessible" #: Data copy failed. Storage Account was not accessible during copy. - UNSUPPORTED_DATA = "UnsupportedData" #: Data copy failed. The Device data content is not supported. + #: Data copy hasn't started yet. + NOT_STARTED = "NotStarted" + #: Data copy is in progress. + IN_PROGRESS = "InProgress" + #: Data copy completed. + COMPLETED = "Completed" + #: Data copy completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Data copy failed. No data was copied. + FAILED = "Failed" + #: No copy triggered as device was not returned. + NOT_RETURNED = "NotReturned" + #: The Device has hit hardware issues. + HARDWARE_ERROR = "HardwareError" + #: Data copy failed. The Device was formatted by user. + DEVICE_FORMATTED = "DeviceFormatted" + #: Data copy failed. Device metadata was modified by user. + DEVICE_METADATA_MODIFIED = "DeviceMetadataModified" + #: Data copy failed. Storage Account was not accessible during copy. + STORAGE_ACCOUNT_NOT_ACCESSIBLE = "StorageAccountNotAccessible" + #: Data copy failed. The Device data content is not supported. + UNSUPPORTED_DATA = "UnsupportedData" class DataDestinationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Data Destination Type. """ - STORAGE_ACCOUNT = "StorageAccount" #: Storage Accounts . - MANAGED_DISK = "ManagedDisk" #: Azure Managed disk storage. + #: Storage Accounts . + STORAGE_ACCOUNT = "StorageAccount" + #: Azure Managed disk storage. + MANAGED_DISK = "ManagedDisk" class JobDeliveryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Delivery type of Job. """ - NON_SCHEDULED = "NonScheduled" #: Non Scheduled job. - SCHEDULED = "Scheduled" #: Scheduled job. + #: Non Scheduled job. + NON_SCHEDULED = "NonScheduled" + #: Scheduled job. + SCHEDULED = "Scheduled" class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Name of the stage. """ - DEVICE_PREPARED = "DevicePrepared" #: Notification at device prepared stage. - DISPATCHED = "Dispatched" #: Notification at device dispatched stage. - DELIVERED = "Delivered" #: Notification at device delivered stage. - PICKED_UP = "PickedUp" #: Notification at device picked up from user stage. - AT_AZURE_DC = "AtAzureDC" #: Notification at device received at azure datacenter stage. - DATA_COPY = "DataCopy" #: Notification at data copy started stage. + #: Notification at device prepared stage. + DEVICE_PREPARED = "DevicePrepared" + #: Notification at device dispatched stage. + DISPATCHED = "Dispatched" + #: Notification at device delivered stage. + DELIVERED = "Delivered" + #: Notification at device picked up from user stage. + PICKED_UP = "PickedUp" + #: Notification at device received at azure datacenter stage. + AT_AZURE_DC = "AtAzureDC" + #: Notification at data copy started stage. + DATA_COPY = "DataCopy" class OverallValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Overall validation status. """ - ALL_VALID_TO_PROCEED = "AllValidToProceed" #: Every input request is valid. - INPUTS_REVISIT_REQUIRED = "InputsRevisitRequired" #: Some input requests are not valid. - CERTAIN_INPUT_VALIDATIONS_SKIPPED = "CertainInputValidationsSkipped" #: Certain input validations skipped. + #: Every input request is valid. + ALL_VALID_TO_PROCEED = "AllValidToProceed" + #: Some input requests are not valid. + INPUTS_REVISIT_REQUIRED = "InputsRevisitRequired" + #: Certain input validations skipped. + CERTAIN_INPUT_VALIDATIONS_SKIPPED = "CertainInputValidationsSkipped" class ShareDestinationFormatType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the share. """ - UNKNOWN_TYPE = "UnknownType" #: Unknown format. - HCS = "HCS" #: Storsimple data format. - BLOCK_BLOB = "BlockBlob" #: Azure storage block blob format. - PAGE_BLOB = "PageBlob" #: Azure storage page blob format. - AZURE_FILE = "AzureFile" #: Azure storage file format. - MANAGED_DISK = "ManagedDisk" #: Azure Compute Disk. + #: Unknown format. + UNKNOWN_TYPE = "UnknownType" + #: Storsimple data format. + HCS = "HCS" + #: Azure storage block blob format. + BLOCK_BLOB = "BlockBlob" + #: Azure storage page blob format. + PAGE_BLOB = "PageBlob" + #: Azure storage file format. + AZURE_FILE = "AzureFile" + #: Azure Compute Disk. + MANAGED_DISK = "ManagedDisk" class SkuDisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Reason why the Sku is disabled. """ - NONE = "None" #: SKU is not disabled. - COUNTRY = "Country" #: SKU is not available in the requested country. - REGION = "Region" #: SKU is not available to push data to the requested Azure region. - FEATURE = "Feature" #: Required features are not enabled for the SKU. - OFFER_TYPE = "OfferType" #: Subscription does not have required offer types for the SKU. - NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription notification. + #: SKU is not disabled. + NONE = "None" + #: SKU is not available in the requested country. + COUNTRY = "Country" + #: SKU is not available to push data to the requested Azure region. + REGION = "Region" + #: Required features are not enabled for the SKU. + FEATURE = "Feature" + #: Subscription does not have required offer types for the SKU. + OFFER_TYPE = "OfferType" + #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription + #: notification. + NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - DATA_BOX = "DataBox" #: Databox. - DATA_BOX_DISK = "DataBoxDisk" #: DataboxDisk. - DATA_BOX_HEAVY = "DataBoxHeavy" #: DataboxHeavy. + #: Databox. + DATA_BOX = "DataBox" + #: DataboxDisk. + DATA_BOX_DISK = "DataBoxDisk" + #: DataboxHeavy. + DATA_BOX_HEAVY = "DataBoxHeavy" class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Name of the stage which is in progress. """ - DEVICE_ORDERED = "DeviceOrdered" #: An order has been created. - DEVICE_PREPARED = "DevicePrepared" #: A device has been prepared for the order. - DISPATCHED = "Dispatched" #: Device has been dispatched to the user of the order. - DELIVERED = "Delivered" #: Device has been delivered to the user of the order. - PICKED_UP = "PickedUp" #: Device has been picked up from user and in transit to azure datacenter. - AT_AZURE_DC = "AtAzureDC" #: Device has been received at azure datacenter from the user. - DATA_COPY = "DataCopy" #: Data copy from the device at azure datacenter. - COMPLETED = "Completed" #: Order has completed. - COMPLETED_WITH_ERRORS = "CompletedWithErrors" #: Order has completed with errors. - CANCELLED = "Cancelled" #: Order has been cancelled. - FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" #: Order has failed due to issue reported by user. - FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" #: Order has failed due to issue detected at azure datacenter. - ABORTED = "Aborted" #: Order has been aborted. - COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" #: Order has completed with warnings. - READY_TO_DISPATCH_FROM_AZURE_DC = "ReadyToDispatchFromAzureDC" #: Device is ready to be handed to customer from Azure DC. - READY_TO_RECEIVE_AT_AZURE_DC = "ReadyToReceiveAtAzureDC" #: Device can be dropped off at Azure DC. + #: An order has been created. + DEVICE_ORDERED = "DeviceOrdered" + #: A device has been prepared for the order. + DEVICE_PREPARED = "DevicePrepared" + #: Device has been dispatched to the user of the order. + DISPATCHED = "Dispatched" + #: Device has been delivered to the user of the order. + DELIVERED = "Delivered" + #: Device has been picked up from user and in transit to azure datacenter. + PICKED_UP = "PickedUp" + #: Device has been received at azure datacenter from the user. + AT_AZURE_DC = "AtAzureDC" + #: Data copy from the device at azure datacenter. + DATA_COPY = "DataCopy" + #: Order has completed. + COMPLETED = "Completed" + #: Order has completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Order has been cancelled. + CANCELLED = "Cancelled" + #: Order has failed due to issue reported by user. + FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" + #: Order has failed due to issue detected at azure datacenter. + FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" + #: Order has been aborted. + ABORTED = "Aborted" + #: Order has completed with warnings. + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" + #: Device is ready to be handed to customer from Azure DC. + READY_TO_DISPATCH_FROM_AZURE_DC = "ReadyToDispatchFromAzureDC" + #: Device can be dropped off at Azure DC. + READY_TO_RECEIVE_AT_AZURE_DC = "ReadyToReceiveAtAzureDC" class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of the job stage. """ - NONE = "None" #: No status available yet. - IN_PROGRESS = "InProgress" #: Stage is in progress. - SUCCEEDED = "Succeeded" #: Stage has succeeded. - FAILED = "Failed" #: Stage has failed. - CANCELLED = "Cancelled" #: Stage has been cancelled. - CANCELLING = "Cancelling" #: Stage is cancelling. - SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" #: Stage has succeeded with errors. + #: No status available yet. + NONE = "None" + #: Stage is in progress. + IN_PROGRESS = "InProgress" + #: Stage has succeeded. + SUCCEEDED = "Succeeded" + #: Stage has failed. + FAILED = "Failed" + #: Stage has been cancelled. + CANCELLED = "Cancelled" + #: Stage is cancelling. + CANCELLING = "Cancelling" + #: Stage has succeeded with errors. + SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Transport Shipment Type supported for given region. """ - CUSTOMER_MANAGED = "CustomerManaged" #: Shipment Logistics is handled by the customer. - MICROSOFT_MANAGED = "MicrosoftManaged" #: Shipment Logistics is handled by Microsoft. + #: Shipment Logistics is handled by the customer. + CUSTOMER_MANAGED = "CustomerManaged" + #: Shipment Logistics is handled by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" class ValidationInputDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Identifies the type of validation request. """ - VALIDATE_ADDRESS = "ValidateAddress" #: Identify request and response of address validation. - VALIDATE_DATA_DESTINATION_DETAILS = "ValidateDataDestinationDetails" #: Identify request and response of data destination details validation. - VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB = "ValidateSubscriptionIsAllowedToCreateJob" #: Identify request and response for validation of subscription permission to create job. - VALIDATE_PREFERENCES = "ValidatePreferences" #: Identify request and response of preference validation. - VALIDATE_CREATE_ORDER_LIMIT = "ValidateCreateOrderLimit" #: Identify request and response of create order limit for subscription validation. - VALIDATE_SKU_AVAILABILITY = "ValidateSkuAvailability" #: Identify request and response of active job limit for sku availability. + #: Identify request and response of address validation. + VALIDATE_ADDRESS = "ValidateAddress" + #: Identify request and response of data destination details validation. + VALIDATE_DATA_DESTINATION_DETAILS = "ValidateDataDestinationDetails" + #: Identify request and response for validation of subscription permission to create job. + VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB = "ValidateSubscriptionIsAllowedToCreateJob" + #: Identify request and response of preference validation. + VALIDATE_PREFERENCES = "ValidatePreferences" + #: Identify request and response of create order limit for subscription validation. + VALIDATE_CREATE_ORDER_LIMIT = "ValidateCreateOrderLimit" + #: Identify request and response of active job limit for sku availability. + VALIDATE_SKU_AVAILABILITY = "ValidateSkuAvailability" class ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Create order limit validation status. """ - VALID = "Valid" #: Validation is successful. - INVALID = "Invalid" #: Validation is not successful. - SKIPPED = "Skipped" #: Validation is skipped. + #: Validation is successful. + VALID = "Valid" + #: Validation is not successful. + INVALID = "Invalid" + #: Validation is skipped. + SKIPPED = "Skipped" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models.py index 0d62bb7ec209b..025257f2a8daa 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models.py @@ -18,12 +18,14 @@ class AccountCredentialDetails(msrest.serialization.Model): :vartype account_name: str :ivar data_destination_type: Data Destination Type. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :vartype data_destination_type: str or + ~azure.mgmt.databox.v2019_09_01.models.DataDestinationType :ivar account_connection_string: Connection string of the account endpoint to use the account as a storage endpoint on the device. :vartype account_connection_string: str :ivar share_credential_details: Per share level unencrypted access credentials. - :vartype share_credential_details: list[~azure.mgmt.databox.models.ShareCredentialDetails] + :vartype share_credential_details: + list[~azure.mgmt.databox.v2019_09_01.models.ShareCredentialDetails] """ _validation = { @@ -60,14 +62,16 @@ class AddressValidationOutput(msrest.serialization.Model): Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2019_09_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2019_09_01.models.ShippingAddress] """ _validation = { @@ -108,9 +112,10 @@ class ValidationInputResponse(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error """ _validation = { @@ -147,14 +152,16 @@ class AddressValidationProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2019_09_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2019_09_01.models.ShippingAddress] """ _validation = { @@ -253,7 +260,7 @@ class AvailableSkuRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar transfer_type: Required. Type of the transfer. Default value: "ImportToAzure". + :ivar transfer_type: Type of the transfer. Has constant value: "ImportToAzure". :vartype transfer_type: str :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. @@ -262,7 +269,7 @@ class AvailableSkuRequest(msrest.serialization.Model): https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str :param sku_names: Sku Names to filter for available skus. - :type sku_names: list[str or ~azure.mgmt.databox.models.SkuName] + :type sku_names: list[str or ~azure.mgmt.databox.v2019_09_01.models.SkuName] """ _validation = { @@ -296,7 +303,7 @@ class AvailableSkusResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of available skus. - :vartype value: list[~azure.mgmt.databox.models.SkuInformation] + :vartype value: list[~azure.mgmt.databox.v2019_09_01.models.SkuInformation] :param next_link: Link for the next set of skus. :type next_link: str """ @@ -356,7 +363,7 @@ class CloudError(msrest.serialization.Model): :param target: Error target. :type target: str :param details: More detailed error information. - :type details: list[~azure.mgmt.databox.models.CloudError] + :type details: list[~azure.mgmt.databox.v2019_09_01.models.CloudError] """ _validation = { @@ -398,7 +405,8 @@ class ContactDetails(msrest.serialization.Model): :param email_list: Required. List of Email-ids to be notified about job progress. :type email_list: list[str] :param notification_preference: Notification preference for a job stage. - :type notification_preference: list[~azure.mgmt.databox.models.NotificationPreference] + :type notification_preference: + list[~azure.mgmt.databox.v2019_09_01.models.NotificationPreference] """ _validation = { @@ -439,7 +447,7 @@ class CopyLogDetails(msrest.serialization.Model): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator """ _validation = { @@ -471,7 +479,8 @@ class CopyProgress(msrest.serialization.Model): :vartype storage_account_name: str :ivar data_destination_type: Data Destination Type. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :vartype data_destination_type: str or + ~azure.mgmt.databox.v2019_09_01.models.DataDestinationType :ivar account_id: Id of the account where the data needs to be uploaded. :vartype account_id: str :ivar bytes_sent_to_cloud: Amount of data uploaded by the job as of now. @@ -551,7 +560,8 @@ class ValidationRequest(msrest.serialization.Model): :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2019_09_01.models.ValidationInputRequest] :param validation_category: Required. Identify the nature of validation.Constant filled by server. :type validation_category: str @@ -587,7 +597,8 @@ class CreateJobValidations(ValidationRequest): :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2019_09_01.models.ValidationInputRequest] :param validation_category: Required. Identify the nature of validation.Constant filled by server. :type validation_category: str @@ -623,7 +634,8 @@ class ValidationInputRequest(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator """ _validation = { @@ -655,10 +667,11 @@ class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _validation = { @@ -691,12 +704,13 @@ class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInpu server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar status: Create order limit validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.ValidationStatus """ _validation = { @@ -729,7 +743,7 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -767,7 +781,7 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :ivar disk_serial_number: Disk Serial Number. :vartype disk_serial_number: str :ivar error_log_link: Link for copy error logs. @@ -815,7 +829,7 @@ class DataBoxDiskCopyProgress(msrest.serialization.Model): :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". - :vartype status: str or ~azure.mgmt.databox.models.CopyStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.CopyStatus """ _validation = { @@ -853,30 +867,31 @@ class JobDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2019_09_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2019_09_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2019_09_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2019_09_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2019_09_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. @@ -898,7 +913,7 @@ class JobDetails(msrest.serialization.Model): } _attribute_map = { - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, @@ -922,7 +937,7 @@ def __init__( **kwargs ): super(JobDetails, self).__init__(**kwargs) - self.expected_data_size_in_terabytes = kwargs.get('expected_data_size_in_terabytes', None) + self.expected_data_size_in_tera_bytes = kwargs.get('expected_data_size_in_tera_bytes', None) self.job_stages = None self.contact_details = kwargs['contact_details'] self.shipping_address = kwargs['shipping_address'] @@ -944,30 +959,31 @@ class DataBoxDiskJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2019_09_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2019_09_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2019_09_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2019_09_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2019_09_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. @@ -977,7 +993,7 @@ class DataBoxDiskJobDetails(JobDetails): will be checked against an int. :type preferred_disks: dict[str, int] :ivar copy_progress: Copy progress per disk. - :vartype copy_progress: list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2019_09_01.models.DataBoxDiskCopyProgress] :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. :vartype disks_and_size_details: dict[str, int] @@ -1002,7 +1018,7 @@ class DataBoxDiskJobDetails(JobDetails): } _attribute_map = { - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, @@ -1043,9 +1059,9 @@ class JobSecrets(msrest.serialization.Model): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :type dc_access_security_code: ~azure.mgmt.databox.v2019_09_01.models.DcAccessSecurityCode """ _validation = { @@ -1079,11 +1095,11 @@ class DataBoxDiskJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :type dc_access_security_code: ~azure.mgmt.databox.v2019_09_01.models.DcAccessSecurityCode :ivar disk_secrets: Contains the list of secrets object for that device. - :vartype disk_secrets: list[~azure.mgmt.databox.models.DiskSecret] + :vartype disk_secrets: list[~azure.mgmt.databox.v2019_09_01.models.DiskSecret] :ivar pass_key: PassKey for the disk Job. :vartype pass_key: str :ivar is_passkey_user_defined: Whether passkey was provided by user. @@ -1125,7 +1141,7 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -1161,36 +1177,37 @@ class DataBoxHeavyJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2019_09_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2019_09_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2019_09_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2019_09_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2019_09_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar copy_progress: Copy progress per account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2019_09_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox Heavy. :type device_password: str """ @@ -1211,7 +1228,7 @@ class DataBoxHeavyJobDetails(JobDetails): } _attribute_map = { - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, @@ -1247,11 +1264,11 @@ class DataBoxHeavyJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :type dc_access_security_code: ~azure.mgmt.databox.v2019_09_01.models.DcAccessSecurityCode :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. - :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.models.DataBoxHeavySecret] + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2019_09_01.models.DataBoxHeavySecret] """ _validation = { @@ -1284,12 +1301,14 @@ class DataBoxHeavySecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2019_09_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2019_09_01.models.AccountCredentialDetails] """ _validation = { @@ -1327,36 +1346,37 @@ class DataBoxJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2019_09_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2019_09_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2019_09_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2019_09_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2019_09_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar copy_progress: Copy progress per storage account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2019_09_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox. :type device_password: str """ @@ -1377,7 +1397,7 @@ class DataBoxJobDetails(JobDetails): } _attribute_map = { - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, @@ -1411,11 +1431,11 @@ class DataboxJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :type dc_access_security_code: ~azure.mgmt.databox.v2019_09_01.models.DcAccessSecurityCode :param pod_secrets: Contains the list of secret objects for a job. - :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + :type pod_secrets: list[~azure.mgmt.databox.v2019_09_01.models.DataBoxSecret] """ _validation = { @@ -1446,12 +1466,12 @@ class ScheduleAvailabilityRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- - version=2018-01-01. + For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _validation = { @@ -1483,12 +1503,12 @@ class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- - version=2018-01-01. + For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _validation = { @@ -1519,12 +1539,14 @@ class DataBoxSecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2019_09_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2019_09_01.models.AccountCredentialDetails] """ _validation = { @@ -1564,9 +1586,11 @@ class DataDestinationDetailsValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :param destination_account_details: Required. Destination account details list. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] :param location: Required. Location of stamp or geo. :type location: str """ @@ -1604,12 +1628,13 @@ class DataDestinationDetailsValidationResponseProperties(ValidationInputResponse server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar status: Data destination details validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.ValidationStatus """ _validation = { @@ -1643,8 +1668,8 @@ class DcAccessSecurityCode(msrest.serialization.Model): """ _attribute_map = { - 'forward_dc_access_code': {'key': 'forwardDcAccessCode', 'type': 'str'}, - 'reverse_dc_access_code': {'key': 'reverseDcAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, } def __init__( @@ -1666,7 +1691,7 @@ class DestinationAccountDetails(msrest.serialization.Model): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2019_09_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. @@ -1704,7 +1729,7 @@ class DestinationManagedDiskDetails(DestinationAccountDetails): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2019_09_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. @@ -1748,7 +1773,7 @@ class DestinationStorageAccountDetails(DestinationAccountDetails): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2019_09_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. @@ -1814,27 +1839,27 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- - version=2018-01-01. + For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName - :param expected_data_size_in_terabytes: Required. The expected size of the data, which needs to - be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type sku_name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int """ _validation = { 'storage_location': {'required': True}, 'sku_name': {'required': True}, - 'expected_data_size_in_terabytes': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, } _attribute_map = { 'storage_location': {'key': 'storageLocation', 'type': 'str'}, 'sku_name': {'key': 'skuName', 'type': 'str'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } def __init__( @@ -1843,7 +1868,7 @@ def __init__( ): super(DiskScheduleAvailabilityRequest, self).__init__(**kwargs) self.sku_name = 'DataBoxDisk' # type: str - self.expected_data_size_in_terabytes = kwargs['expected_data_size_in_terabytes'] + self.expected_data_size_in_tera_bytes = kwargs['expected_data_size_in_tera_bytes'] class DiskSecret(msrest.serialization.Model): @@ -1913,12 +1938,12 @@ class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- - version=2018-01-01. + For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _validation = { @@ -2012,7 +2037,7 @@ class Resource(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2019_09_01.models.Sku """ _validation = { @@ -2052,7 +2077,7 @@ class JobResource(Resource): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2019_09_01.models.Sku :ivar name: Name of the object. :vartype name: str :ivar id: Id of the object. @@ -2070,20 +2095,20 @@ class JobResource(Resource): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype status: str or ~azure.mgmt.databox.models.StageName + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.StageName :ivar start_time: Time at which the job was started in UTC ISO 8601 format. :vartype start_time: ~datetime.datetime :ivar error: Top level error for the job. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :param details: Details of a job run. This field will only be sent for expand details filter. - :type details: ~azure.mgmt.databox.models.JobDetails + :type details: ~azure.mgmt.databox.v2019_09_01.models.JobDetails :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", - "Scheduled". - :type delivery_type: str or ~azure.mgmt.databox.models.JobDeliveryType + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2019_09_01.models.JobDeliveryType :param delivery_info: Delivery Info of Job. - :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo + :type delivery_info: ~azure.mgmt.databox.v2019_09_01.models.JobDeliveryInfo :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. :vartype is_cancellable_without_fee: bool """ @@ -2140,7 +2165,7 @@ def __init__( self.error = None self.details = kwargs.get('details', None) self.cancellation_reason = None - self.delivery_type = kwargs.get('delivery_type', None) + self.delivery_type = kwargs.get('delivery_type', "NonScheduled") self.delivery_info = kwargs.get('delivery_info', None) self.is_cancellable_without_fee = None @@ -2149,7 +2174,7 @@ class JobResourceList(msrest.serialization.Model): """Job Resource Collection. :param value: List of job resources. - :type value: list[~azure.mgmt.databox.models.JobResource] + :type value: list[~azure.mgmt.databox.v2019_09_01.models.JobResource] :param next_link: Link for the next set of job resources. :type next_link: str """ @@ -2175,9 +2200,10 @@ class JobResourceUpdateParameter(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param details: Details of a job to be updated. - :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :type details: ~azure.mgmt.databox.v2019_09_01.models.UpdateJobDetails :param destination_account_details: Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] """ _attribute_map = { @@ -2206,18 +2232,18 @@ class JobStages(msrest.serialization.Model): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype stage_name: str or ~azure.mgmt.databox.models.StageName + :vartype stage_name: str or ~azure.mgmt.databox.v2019_09_01.models.StageName :ivar display_name: Display name of the job stage. :vartype display_name: str :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors". - :vartype stage_status: str or ~azure.mgmt.databox.models.StageStatus + :vartype stage_status: str or ~azure.mgmt.databox.v2019_09_01.models.StageStatus :ivar stage_time: Time for the job stage in UTC ISO 8601 format. :vartype stage_time: ~datetime.datetime :ivar job_stage_details: Job Stage Details. - :vartype job_stage_details: object + :vartype job_stage_details: any :ivar error_details: Error details for the stage. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2019_09_01.models.JobErrorDetails] """ _validation = { @@ -2258,7 +2284,7 @@ class NotificationPreference(msrest.serialization.Model): :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". - :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName + :type stage_name: str or ~azure.mgmt.databox.v2019_09_01.models.NotificationStageName :param send_notification: Required. Notification is required or not. :type send_notification: bool """ @@ -2279,7 +2305,7 @@ def __init__( ): super(NotificationPreference, self).__init__(**kwargs) self.stage_name = kwargs['stage_name'] - self.send_notification = kwargs['send_notification'] + self.send_notification = kwargs.get('send_notification', True) class Operation(msrest.serialization.Model): @@ -2291,9 +2317,9 @@ class Operation(msrest.serialization.Model): {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. :vartype name: str :ivar display: Operation display values. - :vartype display: ~azure.mgmt.databox.models.OperationDisplay + :vartype display: ~azure.mgmt.databox.v2019_09_01.models.OperationDisplay :ivar properties: Operation properties. - :vartype properties: object + :vartype properties: any :ivar origin: Origin of the operation. Can be : user|system|user,system. :vartype origin: str """ @@ -2360,7 +2386,7 @@ class OperationList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of operations. - :vartype value: list[~azure.mgmt.databox.models.Operation] + :vartype value: list[~azure.mgmt.databox.v2019_09_01.models.Operation] :param next_link: Link for the next set of operations. :type next_link: str """ @@ -2424,7 +2450,7 @@ class Preferences(msrest.serialization.Model): :param preferred_data_center_region: Preferred Data Center Region. :type preferred_data_center_region: list[str] :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2019_09_01.models.TransportPreferences """ _attribute_map = { @@ -2450,12 +2476,13 @@ class PreferencesValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :param preference: Preference requested with respect to transport type and data center. - :type preference: ~azure.mgmt.databox.models.Preferences + :type preference: ~azure.mgmt.databox.v2019_09_01.models.Preferences :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _validation = { @@ -2490,12 +2517,13 @@ class PreferencesValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar status: Validation status of requested data center and transport. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.ValidationStatus """ _validation = { @@ -2524,10 +2552,12 @@ class RegionConfigurationRequest(msrest.serialization.Model): :param schedule_availability_request: Request body to get the availability for scheduling orders. - :type schedule_availability_request: ~azure.mgmt.databox.models.ScheduleAvailabilityRequest + :type schedule_availability_request: + ~azure.mgmt.databox.v2019_09_01.models.ScheduleAvailabilityRequest :param transport_availability_request: Request body to get the transport availability for given sku. - :type transport_availability_request: ~azure.mgmt.databox.models.TransportAvailabilityRequest + :type transport_availability_request: + ~azure.mgmt.databox.v2019_09_01.models.TransportAvailabilityRequest """ _attribute_map = { @@ -2551,10 +2581,10 @@ class RegionConfigurationResponse(msrest.serialization.Model): :ivar schedule_availability_response: Schedule availability for given sku in a region. :vartype schedule_availability_response: - ~azure.mgmt.databox.models.ScheduleAvailabilityResponse + ~azure.mgmt.databox.v2019_09_01.models.ScheduleAvailabilityResponse :ivar transport_availability_response: Transport options available for given sku in a region. :vartype transport_availability_response: - ~azure.mgmt.databox.models.TransportAvailabilityResponse + ~azure.mgmt.databox.v2019_09_01.models.TransportAvailabilityResponse """ _validation = { @@ -2610,13 +2640,14 @@ class ShareCredentialDetails(msrest.serialization.Model): :vartype share_name: str :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". - :vartype share_type: str or ~azure.mgmt.databox.models.ShareDestinationFormatType + :vartype share_type: str or ~azure.mgmt.databox.v2019_09_01.models.ShareDestinationFormatType :ivar user_name: User name for the share. :vartype user_name: str :ivar password: Password for the share. :vartype password: str :ivar supported_access_protocols: Access protocols supported on the device. - :vartype supported_access_protocols: list[str or ~azure.mgmt.databox.models.AccessProtocol] + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2019_09_01.models.AccessProtocol] """ _validation = { @@ -2739,8 +2770,8 @@ class ShippingAddress(msrest.serialization.Model): :param company_name: Name of the company. :type company_name: str :param address_type: Type of address. Possible values include: "None", "Residential", - "Commercial". - :type address_type: str or ~azure.mgmt.databox.models.AddressType + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2019_09_01.models.AddressType """ _validation = { @@ -2776,7 +2807,7 @@ def __init__( self.postal_code = kwargs['postal_code'] self.zip_extended_code = kwargs.get('zip_extended_code', None) self.company_name = kwargs.get('company_name', None) - self.address_type = kwargs.get('address_type', None) + self.address_type = kwargs.get('address_type', "None") class Sku(msrest.serialization.Model): @@ -2786,7 +2817,7 @@ class Sku(msrest.serialization.Model): :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type name: str or ~azure.mgmt.databox.models.SkuName + :type name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName :param display_name: The display name of the sku. :type display_name: str :param family: The sku family. @@ -2824,11 +2855,12 @@ class SkuAvailabilityValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName - :ivar transfer_type: Required. Type of the transfer. Default value: "ImportToAzure". + :type device_type: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName + :ivar transfer_type: Type of the transfer. Has constant value: "ImportToAzure". :vartype transfer_type: str :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. @@ -2878,12 +2910,13 @@ class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.ValidationStatus """ _validation = { @@ -2973,21 +3006,21 @@ class SkuInformation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.databox.models.Sku + :vartype sku: ~azure.mgmt.databox.v2019_09_01.models.Sku :ivar enabled: The sku is enabled or not. :vartype enabled: bool :ivar destination_to_service_location_map: The map of destination location to service location. :vartype destination_to_service_location_map: - list[~azure.mgmt.databox.models.DestinationToServiceLocationMap] + list[~azure.mgmt.databox.v2019_09_01.models.DestinationToServiceLocationMap] :ivar capacity: Capacity of the Sku. - :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :vartype capacity: ~azure.mgmt.databox.v2019_09_01.models.SkuCapacity :ivar costs: Cost of the Sku. - :vartype costs: list[~azure.mgmt.databox.models.SkuCost] + :vartype costs: list[~azure.mgmt.databox.v2019_09_01.models.SkuCost] :ivar api_versions: Api versions that support this Sku. :vartype api_versions: list[str] :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". - :vartype disabled_reason: str or ~azure.mgmt.databox.models.SkuDisabledReason + :vartype disabled_reason: str or ~azure.mgmt.databox.v2019_09_01.models.SkuDisabledReason :ivar disabled_reason_message: Message for why the Sku is disabled. :vartype disabled_reason_message: str :ivar required_feature: Required feature to access the sku. @@ -3043,7 +3076,8 @@ class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator """ _validation = { @@ -3073,12 +3107,13 @@ class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInp server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar status: Validation status of subscription permission to create job. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.ValidationStatus """ _validation = { @@ -3109,7 +3144,7 @@ class TransportAvailabilityDetails(msrest.serialization.Model): :ivar shipment_type: Transport Shipment Type supported for given region. Possible values include: "CustomerManaged", "MicrosoftManaged". - :vartype shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :vartype shipment_type: str or ~azure.mgmt.databox.v2019_09_01.models.TransportShipmentTypes """ _validation = { @@ -3133,7 +3168,7 @@ class TransportAvailabilityRequest(msrest.serialization.Model): :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _attribute_map = { @@ -3155,7 +3190,7 @@ class TransportAvailabilityResponse(msrest.serialization.Model): :ivar transport_availability_details: List of transport availability details for given region. :vartype transport_availability_details: - list[~azure.mgmt.databox.models.TransportAvailabilityDetails] + list[~azure.mgmt.databox.v2019_09_01.models.TransportAvailabilityDetails] """ _validation = { @@ -3181,7 +3216,8 @@ class TransportPreferences(msrest.serialization.Model): :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". - :type preferred_shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2019_09_01.models.TransportShipmentTypes """ _validation = { @@ -3208,7 +3244,7 @@ class UnencryptedCredentials(msrest.serialization.Model): :ivar job_name: Name of the job. :vartype job_name: str :ivar job_secrets: Secrets related to this job. - :vartype job_secrets: ~azure.mgmt.databox.models.JobSecrets + :vartype job_secrets: ~azure.mgmt.databox.v2019_09_01.models.JobSecrets """ _validation = { @@ -3234,7 +3270,7 @@ class UnencryptedCredentialsList(msrest.serialization.Model): """List of unencrypted credentials for accessing device. :param value: List of unencrypted credentials. - :type value: list[~azure.mgmt.databox.models.UnencryptedCredentials] + :type value: list[~azure.mgmt.databox.v2019_09_01.models.UnencryptedCredentials] :param next_link: Link for the next set of unencrypted credentials. :type next_link: str """ @@ -3257,9 +3293,9 @@ class UpdateJobDetails(msrest.serialization.Model): """Job details for update. :param contact_details: Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2019_09_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress """ _attribute_map = { @@ -3285,14 +3321,15 @@ class ValidateAddress(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2019_09_01.models.TransportPreferences """ _validation = { @@ -3326,10 +3363,11 @@ class ValidationResponse(msrest.serialization.Model): :ivar status: Overall validation status. Possible values include: "AllValidToProceed", "InputsRevisitRequired", "CertainInputValidationsSkipped". - :vartype status: str or ~azure.mgmt.databox.models.OverallValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.OverallValidationStatus :ivar individual_response_details: List of response details contain validationType and its response as key and value respectively. - :vartype individual_response_details: list[~azure.mgmt.databox.models.ValidationInputResponse] + :vartype individual_response_details: + list[~azure.mgmt.databox.v2019_09_01.models.ValidationInputResponse] """ _validation = { diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models_py3.py index 89c4169845901..d951d4c398a43 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models_py3.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models_py3.py @@ -23,12 +23,14 @@ class AccountCredentialDetails(msrest.serialization.Model): :vartype account_name: str :ivar data_destination_type: Data Destination Type. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :vartype data_destination_type: str or + ~azure.mgmt.databox.v2019_09_01.models.DataDestinationType :ivar account_connection_string: Connection string of the account endpoint to use the account as a storage endpoint on the device. :vartype account_connection_string: str :ivar share_credential_details: Per share level unencrypted access credentials. - :vartype share_credential_details: list[~azure.mgmt.databox.models.ShareCredentialDetails] + :vartype share_credential_details: + list[~azure.mgmt.databox.v2019_09_01.models.ShareCredentialDetails] """ _validation = { @@ -65,14 +67,16 @@ class AddressValidationOutput(msrest.serialization.Model): Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2019_09_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2019_09_01.models.ShippingAddress] """ _validation = { @@ -113,9 +117,10 @@ class ValidationInputResponse(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error """ _validation = { @@ -152,14 +157,16 @@ class AddressValidationProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2019_09_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2019_09_01.models.ShippingAddress] """ _validation = { @@ -258,7 +265,7 @@ class AvailableSkuRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar transfer_type: Required. Type of the transfer. Default value: "ImportToAzure". + :ivar transfer_type: Type of the transfer. Has constant value: "ImportToAzure". :vartype transfer_type: str :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. @@ -267,7 +274,7 @@ class AvailableSkuRequest(msrest.serialization.Model): https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str :param sku_names: Sku Names to filter for available skus. - :type sku_names: list[str or ~azure.mgmt.databox.models.SkuName] + :type sku_names: list[str or ~azure.mgmt.databox.v2019_09_01.models.SkuName] """ _validation = { @@ -305,7 +312,7 @@ class AvailableSkusResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of available skus. - :vartype value: list[~azure.mgmt.databox.models.SkuInformation] + :vartype value: list[~azure.mgmt.databox.v2019_09_01.models.SkuInformation] :param next_link: Link for the next set of skus. :type next_link: str """ @@ -369,7 +376,7 @@ class CloudError(msrest.serialization.Model): :param target: Error target. :type target: str :param details: More detailed error information. - :type details: list[~azure.mgmt.databox.models.CloudError] + :type details: list[~azure.mgmt.databox.v2019_09_01.models.CloudError] """ _validation = { @@ -414,7 +421,8 @@ class ContactDetails(msrest.serialization.Model): :param email_list: Required. List of Email-ids to be notified about job progress. :type email_list: list[str] :param notification_preference: Notification preference for a job stage. - :type notification_preference: list[~azure.mgmt.databox.models.NotificationPreference] + :type notification_preference: + list[~azure.mgmt.databox.v2019_09_01.models.NotificationPreference] """ _validation = { @@ -462,7 +470,7 @@ class CopyLogDetails(msrest.serialization.Model): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator """ _validation = { @@ -494,7 +502,8 @@ class CopyProgress(msrest.serialization.Model): :vartype storage_account_name: str :ivar data_destination_type: Data Destination Type. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :vartype data_destination_type: str or + ~azure.mgmt.databox.v2019_09_01.models.DataDestinationType :ivar account_id: Id of the account where the data needs to be uploaded. :vartype account_id: str :ivar bytes_sent_to_cloud: Amount of data uploaded by the job as of now. @@ -574,7 +583,8 @@ class ValidationRequest(msrest.serialization.Model): :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2019_09_01.models.ValidationInputRequest] :param validation_category: Required. Identify the nature of validation.Constant filled by server. :type validation_category: str @@ -612,7 +622,8 @@ class CreateJobValidations(ValidationRequest): :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2019_09_01.models.ValidationInputRequest] :param validation_category: Required. Identify the nature of validation.Constant filled by server. :type validation_category: str @@ -650,7 +661,8 @@ class ValidationInputRequest(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator """ _validation = { @@ -682,10 +694,11 @@ class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _validation = { @@ -720,12 +733,13 @@ class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInpu server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar status: Create order limit validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.ValidationStatus """ _validation = { @@ -758,7 +772,7 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -796,7 +810,7 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :ivar disk_serial_number: Disk Serial Number. :vartype disk_serial_number: str :ivar error_log_link: Link for copy error logs. @@ -844,7 +858,7 @@ class DataBoxDiskCopyProgress(msrest.serialization.Model): :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". - :vartype status: str or ~azure.mgmt.databox.models.CopyStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.CopyStatus """ _validation = { @@ -882,30 +896,31 @@ class JobDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2019_09_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2019_09_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2019_09_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2019_09_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2019_09_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. @@ -927,7 +942,7 @@ class JobDetails(msrest.serialization.Model): } _attribute_map = { - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, @@ -952,12 +967,12 @@ def __init__( contact_details: "ContactDetails", shipping_address: "ShippingAddress", destination_account_details: List["DestinationAccountDetails"], - expected_data_size_in_terabytes: Optional[int] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, preferences: Optional["Preferences"] = None, **kwargs ): super(JobDetails, self).__init__(**kwargs) - self.expected_data_size_in_terabytes = expected_data_size_in_terabytes + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes self.job_stages = None self.contact_details = contact_details self.shipping_address = shipping_address @@ -979,30 +994,31 @@ class DataBoxDiskJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2019_09_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2019_09_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2019_09_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2019_09_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2019_09_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. @@ -1012,7 +1028,7 @@ class DataBoxDiskJobDetails(JobDetails): will be checked against an int. :type preferred_disks: dict[str, int] :ivar copy_progress: Copy progress per disk. - :vartype copy_progress: list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2019_09_01.models.DataBoxDiskCopyProgress] :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. :vartype disks_and_size_details: dict[str, int] @@ -1037,7 +1053,7 @@ class DataBoxDiskJobDetails(JobDetails): } _attribute_map = { - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, @@ -1062,13 +1078,13 @@ def __init__( contact_details: "ContactDetails", shipping_address: "ShippingAddress", destination_account_details: List["DestinationAccountDetails"], - expected_data_size_in_terabytes: Optional[int] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, preferences: Optional["Preferences"] = None, preferred_disks: Optional[Dict[str, int]] = None, passkey: Optional[str] = None, **kwargs ): - super(DataBoxDiskJobDetails, self).__init__(expected_data_size_in_terabytes=expected_data_size_in_terabytes, contact_details=contact_details, shipping_address=shipping_address, destination_account_details=destination_account_details, preferences=preferences, **kwargs) + super(DataBoxDiskJobDetails, self).__init__(expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, contact_details=contact_details, shipping_address=shipping_address, destination_account_details=destination_account_details, preferences=preferences, **kwargs) self.job_details_type = 'DataBoxDisk' # type: str self.preferred_disks = preferred_disks self.copy_progress = None @@ -1086,9 +1102,9 @@ class JobSecrets(msrest.serialization.Model): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :type dc_access_security_code: ~azure.mgmt.databox.v2019_09_01.models.DcAccessSecurityCode """ _validation = { @@ -1124,11 +1140,11 @@ class DataBoxDiskJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :type dc_access_security_code: ~azure.mgmt.databox.v2019_09_01.models.DcAccessSecurityCode :ivar disk_secrets: Contains the list of secrets object for that device. - :vartype disk_secrets: list[~azure.mgmt.databox.models.DiskSecret] + :vartype disk_secrets: list[~azure.mgmt.databox.v2019_09_01.models.DiskSecret] :ivar pass_key: PassKey for the disk Job. :vartype pass_key: str :ivar is_passkey_user_defined: Whether passkey was provided by user. @@ -1172,7 +1188,7 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :ivar account_name: Destination account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -1208,36 +1224,37 @@ class DataBoxHeavyJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2019_09_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2019_09_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2019_09_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2019_09_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2019_09_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar copy_progress: Copy progress per account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2019_09_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox Heavy. :type device_password: str """ @@ -1258,7 +1275,7 @@ class DataBoxHeavyJobDetails(JobDetails): } _attribute_map = { - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, @@ -1281,12 +1298,12 @@ def __init__( contact_details: "ContactDetails", shipping_address: "ShippingAddress", destination_account_details: List["DestinationAccountDetails"], - expected_data_size_in_terabytes: Optional[int] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, preferences: Optional["Preferences"] = None, device_password: Optional[str] = None, **kwargs ): - super(DataBoxHeavyJobDetails, self).__init__(expected_data_size_in_terabytes=expected_data_size_in_terabytes, contact_details=contact_details, shipping_address=shipping_address, destination_account_details=destination_account_details, preferences=preferences, **kwargs) + super(DataBoxHeavyJobDetails, self).__init__(expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, contact_details=contact_details, shipping_address=shipping_address, destination_account_details=destination_account_details, preferences=preferences, **kwargs) self.job_details_type = 'DataBoxHeavy' # type: str self.copy_progress = None self.device_password = device_password @@ -1301,11 +1318,11 @@ class DataBoxHeavyJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :type dc_access_security_code: ~azure.mgmt.databox.v2019_09_01.models.DcAccessSecurityCode :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. - :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.models.DataBoxHeavySecret] + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2019_09_01.models.DataBoxHeavySecret] """ _validation = { @@ -1340,12 +1357,14 @@ class DataBoxHeavySecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2019_09_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2019_09_01.models.AccountCredentialDetails] """ _validation = { @@ -1383,36 +1402,37 @@ class DataBoxJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2019_09_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2019_09_01.models.ContactDetails :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2019_09_01.models.PackageShippingDetails :param destination_account_details: Required. Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] :ivar error_details: Error details for failure. This is optional. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2019_09_01.models.JobErrorDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2019_09_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2019_09_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar copy_progress: Copy progress per storage account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2019_09_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox. :type device_password: str """ @@ -1433,7 +1453,7 @@ class DataBoxJobDetails(JobDetails): } _attribute_map = { - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, @@ -1456,12 +1476,12 @@ def __init__( contact_details: "ContactDetails", shipping_address: "ShippingAddress", destination_account_details: List["DestinationAccountDetails"], - expected_data_size_in_terabytes: Optional[int] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, preferences: Optional["Preferences"] = None, device_password: Optional[str] = None, **kwargs ): - super(DataBoxJobDetails, self).__init__(expected_data_size_in_terabytes=expected_data_size_in_terabytes, contact_details=contact_details, shipping_address=shipping_address, destination_account_details=destination_account_details, preferences=preferences, **kwargs) + super(DataBoxJobDetails, self).__init__(expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, contact_details=contact_details, shipping_address=shipping_address, destination_account_details=destination_account_details, preferences=preferences, **kwargs) self.job_details_type = 'DataBox' # type: str self.copy_progress = None self.device_password = device_password @@ -1474,11 +1494,11 @@ class DataboxJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2019_09_01.models.ClassDiscriminator :param dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :type dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :type dc_access_security_code: ~azure.mgmt.databox.v2019_09_01.models.DcAccessSecurityCode :param pod_secrets: Contains the list of secret objects for a job. - :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + :type pod_secrets: list[~azure.mgmt.databox.v2019_09_01.models.DataBoxSecret] """ _validation = { @@ -1512,12 +1532,12 @@ class ScheduleAvailabilityRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- - version=2018-01-01. + For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _validation = { @@ -1551,12 +1571,12 @@ class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- - version=2018-01-01. + For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _validation = { @@ -1589,12 +1609,14 @@ class DataBoxSecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2019_09_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2019_09_01.models.AccountCredentialDetails] """ _validation = { @@ -1634,9 +1656,11 @@ class DataDestinationDetailsValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :param destination_account_details: Required. Destination account details list. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] :param location: Required. Location of stamp or geo. :type location: str """ @@ -1677,12 +1701,13 @@ class DataDestinationDetailsValidationResponseProperties(ValidationInputResponse server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar status: Data destination details validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.ValidationStatus """ _validation = { @@ -1716,8 +1741,8 @@ class DcAccessSecurityCode(msrest.serialization.Model): """ _attribute_map = { - 'forward_dc_access_code': {'key': 'forwardDcAccessCode', 'type': 'str'}, - 'reverse_dc_access_code': {'key': 'reverseDcAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, } def __init__( @@ -1742,7 +1767,7 @@ class DestinationAccountDetails(msrest.serialization.Model): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2019_09_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. @@ -1783,7 +1808,7 @@ class DestinationManagedDiskDetails(DestinationAccountDetails): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2019_09_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. @@ -1832,7 +1857,7 @@ class DestinationStorageAccountDetails(DestinationAccountDetails): :param data_destination_type: Required. Data Destination Type.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_destination_type: str or ~azure.mgmt.databox.models.DataDestinationType + :type data_destination_type: str or ~azure.mgmt.databox.v2019_09_01.models.DataDestinationType :param account_id: Arm Id of the destination where the data has to be moved. :type account_id: str :param share_password: Share password to be shared by all shares in SA. @@ -1902,39 +1927,39 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- - version=2018-01-01. + For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName - :param expected_data_size_in_terabytes: Required. The expected size of the data, which needs to - be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type sku_name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int """ _validation = { 'storage_location': {'required': True}, 'sku_name': {'required': True}, - 'expected_data_size_in_terabytes': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, } _attribute_map = { 'storage_location': {'key': 'storageLocation', 'type': 'str'}, 'sku_name': {'key': 'skuName', 'type': 'str'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } def __init__( self, *, storage_location: str, - expected_data_size_in_terabytes: int, + expected_data_size_in_tera_bytes: int, **kwargs ): super(DiskScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, **kwargs) self.sku_name = 'DataBoxDisk' # type: str - self.expected_data_size_in_terabytes = expected_data_size_in_terabytes + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes class DiskSecret(msrest.serialization.Model): @@ -2004,12 +2029,12 @@ class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): All required parameters must be populated in order to send to Azure. :param storage_location: Required. Location for data transfer. - For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api- - version=2018-01-01. + For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _validation = { @@ -2107,7 +2132,7 @@ class Resource(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2019_09_01.models.Sku """ _validation = { @@ -2151,7 +2176,7 @@ class JobResource(Resource): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2019_09_01.models.Sku :ivar name: Name of the object. :vartype name: str :ivar id: Id of the object. @@ -2169,20 +2194,20 @@ class JobResource(Resource): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype status: str or ~azure.mgmt.databox.models.StageName + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.StageName :ivar start_time: Time at which the job was started in UTC ISO 8601 format. :vartype start_time: ~datetime.datetime :ivar error: Top level error for the job. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :param details: Details of a job run. This field will only be sent for expand details filter. - :type details: ~azure.mgmt.databox.models.JobDetails + :type details: ~azure.mgmt.databox.v2019_09_01.models.JobDetails :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", - "Scheduled". - :type delivery_type: str or ~azure.mgmt.databox.models.JobDeliveryType + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2019_09_01.models.JobDeliveryType :param delivery_info: Delivery Info of Job. - :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo + :type delivery_info: ~azure.mgmt.databox.v2019_09_01.models.JobDeliveryInfo :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. :vartype is_cancellable_without_fee: bool """ @@ -2230,7 +2255,7 @@ def __init__( sku: "Sku", tags: Optional[Dict[str, str]] = None, details: Optional["JobDetails"] = None, - delivery_type: Optional[Union[str, "JobDeliveryType"]] = None, + delivery_type: Optional[Union[str, "JobDeliveryType"]] = "NonScheduled", delivery_info: Optional["JobDeliveryInfo"] = None, **kwargs ): @@ -2255,7 +2280,7 @@ class JobResourceList(msrest.serialization.Model): """Job Resource Collection. :param value: List of job resources. - :type value: list[~azure.mgmt.databox.models.JobResource] + :type value: list[~azure.mgmt.databox.v2019_09_01.models.JobResource] :param next_link: Link for the next set of job resources. :type next_link: str """ @@ -2284,9 +2309,10 @@ class JobResourceUpdateParameter(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param details: Details of a job to be updated. - :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :type details: ~azure.mgmt.databox.v2019_09_01.models.UpdateJobDetails :param destination_account_details: Destination account details. - :type destination_account_details: list[~azure.mgmt.databox.models.DestinationAccountDetails] + :type destination_account_details: + list[~azure.mgmt.databox.v2019_09_01.models.DestinationAccountDetails] """ _attribute_map = { @@ -2319,18 +2345,18 @@ class JobStages(msrest.serialization.Model): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype stage_name: str or ~azure.mgmt.databox.models.StageName + :vartype stage_name: str or ~azure.mgmt.databox.v2019_09_01.models.StageName :ivar display_name: Display name of the job stage. :vartype display_name: str :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors". - :vartype stage_status: str or ~azure.mgmt.databox.models.StageStatus + :vartype stage_status: str or ~azure.mgmt.databox.v2019_09_01.models.StageStatus :ivar stage_time: Time for the job stage in UTC ISO 8601 format. :vartype stage_time: ~datetime.datetime :ivar job_stage_details: Job Stage Details. - :vartype job_stage_details: object + :vartype job_stage_details: any :ivar error_details: Error details for the stage. - :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :vartype error_details: list[~azure.mgmt.databox.v2019_09_01.models.JobErrorDetails] """ _validation = { @@ -2371,7 +2397,7 @@ class NotificationPreference(msrest.serialization.Model): :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". - :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName + :type stage_name: str or ~azure.mgmt.databox.v2019_09_01.models.NotificationStageName :param send_notification: Required. Notification is required or not. :type send_notification: bool """ @@ -2390,7 +2416,7 @@ def __init__( self, *, stage_name: Union[str, "NotificationStageName"], - send_notification: bool, + send_notification: bool = True, **kwargs ): super(NotificationPreference, self).__init__(**kwargs) @@ -2407,9 +2433,9 @@ class Operation(msrest.serialization.Model): {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. :vartype name: str :ivar display: Operation display values. - :vartype display: ~azure.mgmt.databox.models.OperationDisplay + :vartype display: ~azure.mgmt.databox.v2019_09_01.models.OperationDisplay :ivar properties: Operation properties. - :vartype properties: object + :vartype properties: any :ivar origin: Origin of the operation. Can be : user|system|user,system. :vartype origin: str """ @@ -2481,7 +2507,7 @@ class OperationList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of operations. - :vartype value: list[~azure.mgmt.databox.models.Operation] + :vartype value: list[~azure.mgmt.databox.v2019_09_01.models.Operation] :param next_link: Link for the next set of operations. :type next_link: str """ @@ -2547,7 +2573,7 @@ class Preferences(msrest.serialization.Model): :param preferred_data_center_region: Preferred Data Center Region. :type preferred_data_center_region: list[str] :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2019_09_01.models.TransportPreferences """ _attribute_map = { @@ -2576,12 +2602,13 @@ class PreferencesValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :param preference: Preference requested with respect to transport type and data center. - :type preference: ~azure.mgmt.databox.models.Preferences + :type preference: ~azure.mgmt.databox.v2019_09_01.models.Preferences :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _validation = { @@ -2619,12 +2646,13 @@ class PreferencesValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar status: Validation status of requested data center and transport. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.ValidationStatus """ _validation = { @@ -2653,10 +2681,12 @@ class RegionConfigurationRequest(msrest.serialization.Model): :param schedule_availability_request: Request body to get the availability for scheduling orders. - :type schedule_availability_request: ~azure.mgmt.databox.models.ScheduleAvailabilityRequest + :type schedule_availability_request: + ~azure.mgmt.databox.v2019_09_01.models.ScheduleAvailabilityRequest :param transport_availability_request: Request body to get the transport availability for given sku. - :type transport_availability_request: ~azure.mgmt.databox.models.TransportAvailabilityRequest + :type transport_availability_request: + ~azure.mgmt.databox.v2019_09_01.models.TransportAvailabilityRequest """ _attribute_map = { @@ -2683,10 +2713,10 @@ class RegionConfigurationResponse(msrest.serialization.Model): :ivar schedule_availability_response: Schedule availability for given sku in a region. :vartype schedule_availability_response: - ~azure.mgmt.databox.models.ScheduleAvailabilityResponse + ~azure.mgmt.databox.v2019_09_01.models.ScheduleAvailabilityResponse :ivar transport_availability_response: Transport options available for given sku in a region. :vartype transport_availability_response: - ~azure.mgmt.databox.models.TransportAvailabilityResponse + ~azure.mgmt.databox.v2019_09_01.models.TransportAvailabilityResponse """ _validation = { @@ -2742,13 +2772,14 @@ class ShareCredentialDetails(msrest.serialization.Model): :vartype share_name: str :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". - :vartype share_type: str or ~azure.mgmt.databox.models.ShareDestinationFormatType + :vartype share_type: str or ~azure.mgmt.databox.v2019_09_01.models.ShareDestinationFormatType :ivar user_name: User name for the share. :vartype user_name: str :ivar password: Password for the share. :vartype password: str :ivar supported_access_protocols: Access protocols supported on the device. - :vartype supported_access_protocols: list[str or ~azure.mgmt.databox.models.AccessProtocol] + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2019_09_01.models.AccessProtocol] """ _validation = { @@ -2875,8 +2906,8 @@ class ShippingAddress(msrest.serialization.Model): :param company_name: Name of the company. :type company_name: str :param address_type: Type of address. Possible values include: "None", "Residential", - "Commercial". - :type address_type: str or ~azure.mgmt.databox.models.AddressType + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2019_09_01.models.AddressType """ _validation = { @@ -2910,7 +2941,7 @@ def __init__( state_or_province: Optional[str] = None, zip_extended_code: Optional[str] = None, company_name: Optional[str] = None, - address_type: Optional[Union[str, "AddressType"]] = None, + address_type: Optional[Union[str, "AddressType"]] = "None", **kwargs ): super(ShippingAddress, self).__init__(**kwargs) @@ -2933,7 +2964,7 @@ class Sku(msrest.serialization.Model): :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type name: str or ~azure.mgmt.databox.models.SkuName + :type name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName :param display_name: The display name of the sku. :type display_name: str :param family: The sku family. @@ -2975,11 +3006,12 @@ class SkuAvailabilityValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName - :ivar transfer_type: Required. Type of the transfer. Default value: "ImportToAzure". + :type device_type: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName + :ivar transfer_type: Type of the transfer. Has constant value: "ImportToAzure". :vartype transfer_type: str :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. @@ -3033,12 +3065,13 @@ class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.ValidationStatus """ _validation = { @@ -3128,21 +3161,21 @@ class SkuInformation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.databox.models.Sku + :vartype sku: ~azure.mgmt.databox.v2019_09_01.models.Sku :ivar enabled: The sku is enabled or not. :vartype enabled: bool :ivar destination_to_service_location_map: The map of destination location to service location. :vartype destination_to_service_location_map: - list[~azure.mgmt.databox.models.DestinationToServiceLocationMap] + list[~azure.mgmt.databox.v2019_09_01.models.DestinationToServiceLocationMap] :ivar capacity: Capacity of the Sku. - :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :vartype capacity: ~azure.mgmt.databox.v2019_09_01.models.SkuCapacity :ivar costs: Cost of the Sku. - :vartype costs: list[~azure.mgmt.databox.models.SkuCost] + :vartype costs: list[~azure.mgmt.databox.v2019_09_01.models.SkuCost] :ivar api_versions: Api versions that support this Sku. :vartype api_versions: list[str] :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". - :vartype disabled_reason: str or ~azure.mgmt.databox.models.SkuDisabledReason + :vartype disabled_reason: str or ~azure.mgmt.databox.v2019_09_01.models.SkuDisabledReason :ivar disabled_reason_message: Message for why the Sku is disabled. :vartype disabled_reason_message: str :ivar required_feature: Required feature to access the sku. @@ -3198,7 +3231,8 @@ class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator """ _validation = { @@ -3228,12 +3262,13 @@ class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInp server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.Error + :vartype error: ~azure.mgmt.databox.v2019_09_01.models.Error :ivar status: Validation status of subscription permission to create job. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.ValidationStatus """ _validation = { @@ -3264,7 +3299,7 @@ class TransportAvailabilityDetails(msrest.serialization.Model): :ivar shipment_type: Transport Shipment Type supported for given region. Possible values include: "CustomerManaged", "MicrosoftManaged". - :vartype shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :vartype shipment_type: str or ~azure.mgmt.databox.v2019_09_01.models.TransportShipmentTypes """ _validation = { @@ -3288,7 +3323,7 @@ class TransportAvailabilityRequest(msrest.serialization.Model): :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName """ _attribute_map = { @@ -3312,7 +3347,7 @@ class TransportAvailabilityResponse(msrest.serialization.Model): :ivar transport_availability_details: List of transport availability details for given region. :vartype transport_availability_details: - list[~azure.mgmt.databox.models.TransportAvailabilityDetails] + list[~azure.mgmt.databox.v2019_09_01.models.TransportAvailabilityDetails] """ _validation = { @@ -3338,7 +3373,8 @@ class TransportPreferences(msrest.serialization.Model): :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". - :type preferred_shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2019_09_01.models.TransportShipmentTypes """ _validation = { @@ -3367,7 +3403,7 @@ class UnencryptedCredentials(msrest.serialization.Model): :ivar job_name: Name of the job. :vartype job_name: str :ivar job_secrets: Secrets related to this job. - :vartype job_secrets: ~azure.mgmt.databox.models.JobSecrets + :vartype job_secrets: ~azure.mgmt.databox.v2019_09_01.models.JobSecrets """ _validation = { @@ -3393,7 +3429,7 @@ class UnencryptedCredentialsList(msrest.serialization.Model): """List of unencrypted credentials for accessing device. :param value: List of unencrypted credentials. - :type value: list[~azure.mgmt.databox.models.UnencryptedCredentials] + :type value: list[~azure.mgmt.databox.v2019_09_01.models.UnencryptedCredentials] :param next_link: Link for the next set of unencrypted credentials. :type next_link: str """ @@ -3419,9 +3455,9 @@ class UpdateJobDetails(msrest.serialization.Model): """Job details for update. :param contact_details: Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2019_09_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress """ _attribute_map = { @@ -3450,14 +3486,15 @@ class ValidateAddress(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateDataDestinationDetails", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2019_09_01.models.ValidationInputDiscriminator :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2019_09_01.models.ShippingAddress :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2019_09_01.models.SkuName :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2019_09_01.models.TransportPreferences """ _validation = { @@ -3495,10 +3532,11 @@ class ValidationResponse(msrest.serialization.Model): :ivar status: Overall validation status. Possible values include: "AllValidToProceed", "InputsRevisitRequired", "CertainInputValidationsSkipped". - :vartype status: str or ~azure.mgmt.databox.models.OverallValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2019_09_01.models.OverallValidationStatus :ivar individual_response_details: List of response details contain validationType and its response as key and value respectively. - :vartype individual_response_details: list[~azure.mgmt.databox.models.ValidationInputResponse] + :vartype individual_response_details: + list[~azure.mgmt.databox.v2019_09_01.models.ValidationInputResponse] """ _validation = { diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_jobs_operations.py index e984b83e43a54..0a7192dff9a58 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_jobs_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_jobs_operations.py @@ -32,7 +32,7 @@ class JobsOperations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2019_09_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2019_09_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -136,7 +136,7 @@ def list_by_resource_group( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2019_09_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -217,7 +217,7 @@ def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.JobResource + :rtype: ~azure.mgmt.databox.v2019_09_01.models.JobResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] @@ -336,15 +336,15 @@ def begin_create( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource: Job details from request body. - :type job_resource: ~azure.mgmt.databox.models.JobResource + :type job_resource: ~azure.mgmt.databox.v2019_09_01.models.JobResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2019_09_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -454,8 +454,8 @@ def begin_delete( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -580,18 +580,18 @@ def begin_update( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource_update_parameter: Job update parameters from request body. - :type job_resource_update_parameter: ~azure.mgmt.databox.models.JobResourceUpdateParameter + :type job_resource_update_parameter: ~azure.mgmt.databox.v2019_09_01.models.JobResourceUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2019_09_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -657,10 +657,10 @@ def book_shipment_pick_up( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param shipment_pick_up_request: Details of shipment pick up request. - :type shipment_pick_up_request: ~azure.mgmt.databox.models.ShipmentPickUpRequest + :type shipment_pick_up_request: ~azure.mgmt.databox.v2019_09_01.models.ShipmentPickUpRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ShipmentPickUpResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse + :rtype: ~azure.mgmt.databox.v2019_09_01.models.ShipmentPickUpResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] @@ -725,7 +725,7 @@ def cancel( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param cancellation_reason: Reason for cancellation. - :type cancellation_reason: ~azure.mgmt.databox.models.CancellationReason + :type cancellation_reason: ~azure.mgmt.databox.v2019_09_01.models.CancellationReason :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 @@ -790,7 +790,7 @@ def list_credentials( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.UnencryptedCredentialsList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2019_09_01.models.UnencryptedCredentialsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_operations.py index cc8b348336275..2e975aa1ff7bd 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_operations.py @@ -30,7 +30,7 @@ class Operations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2019_09_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.OperationList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2019_09_01.models.OperationList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_service_operations.py index f8cf7bdbaa344..7b3ac60207884 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_service_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_service_operations.py @@ -30,7 +30,7 @@ class ServiceOperations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2019_09_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -57,10 +57,10 @@ def list_available_skus( :param location: The location of the resource. :type location: str :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :type available_sku_request: ~azure.mgmt.databox.v2019_09_01.models.AvailableSkuRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2019_09_01.models.AvailableSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] @@ -143,10 +143,10 @@ def list_available_skus_by_resource_group( :param location: The location of the resource. :type location: str :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :type available_sku_request: ~azure.mgmt.databox.v2019_09_01.models.AvailableSkuRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2019_09_01.models.AvailableSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] @@ -227,10 +227,10 @@ def validate_address( :param location: The location of the resource. :type location: str :param validate_address: Shipping address of the customer. - :type validate_address: ~azure.mgmt.databox.models.ValidateAddress + :type validate_address: ~azure.mgmt.databox.v2019_09_01.models.ValidateAddress :keyword callable cls: A custom type or function that will be passed the direct response :return: AddressValidationOutput, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.AddressValidationOutput + :rtype: ~azure.mgmt.databox.v2019_09_01.models.AddressValidationOutput :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] @@ -293,10 +293,10 @@ def validate_inputs_by_resource_group( :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2019_09_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2019_09_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -357,10 +357,10 @@ def validate_inputs( :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2019_09_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2019_09_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -420,10 +420,10 @@ def region_configuration( :param location: The location of the resource. :type location: str :param region_configuration_request: Request body to get the configuration for the region. - :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :type region_configuration_request: ~azure.mgmt.databox.v2019_09_01.models.RegionConfigurationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: RegionConfigurationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :rtype: ~azure.mgmt.databox.v2019_09_01.models.RegionConfigurationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_data_box_management_client.py index e696cb06a7805..f1c9a45049afd 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_data_box_management_client.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_data_box_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import DataBoxManagementClientConfiguration from .operations import Operations @@ -28,11 +29,11 @@ class DataBoxManagementClient(object): """The DataBox Client. :ivar operations: Operations operations - :vartype operations: azure.mgmt.databox.operations.Operations + :vartype operations: azure.mgmt.databox.v2020_04_01.operations.Operations :ivar jobs: JobsOperations operations - :vartype jobs: azure.mgmt.databox.operations.JobsOperations + :vartype jobs: azure.mgmt.databox.v2020_04_01.operations.JobsOperations :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.databox.operations.ServiceOperations + :vartype service: azure.mgmt.databox.v2020_04_01.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The Subscription Id. @@ -66,6 +67,24 @@ def __init__( self.service = ServiceOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_metadata.json b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_metadata.json index 1cbb00da5e156..cd42ecd6b7fd6 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_metadata.json +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The Subscription Id.", "docstring_type": "str", "required": true @@ -42,22 +44,62 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "operations": "Operations", "jobs": "JobsOperations", "service": "ServiceOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_version.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_version.py index eae7c95b6fbdb..e5754a47ce68f 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_version.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/_data_box_management_client.py index b192ff7cd7714..3a48323749eec 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/_data_box_management_client.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/_data_box_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -26,11 +27,11 @@ class DataBoxManagementClient(object): """The DataBox Client. :ivar operations: Operations operations - :vartype operations: azure.mgmt.databox.aio.operations.Operations + :vartype operations: azure.mgmt.databox.v2020_04_01.aio.operations.Operations :ivar jobs: JobsOperations operations - :vartype jobs: azure.mgmt.databox.aio.operations.JobsOperations + :vartype jobs: azure.mgmt.databox.v2020_04_01.aio.operations.JobsOperations :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.databox.aio.operations.ServiceOperations + :vartype service: azure.mgmt.databox.v2020_04_01.aio.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The Subscription Id. @@ -63,6 +64,23 @@ def __init__( self.service = ServiceOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_jobs_operations.py index c4130aabaa871..74c436cc47588 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_jobs_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_jobs_operations.py @@ -28,7 +28,7 @@ class JobsOperations: 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.databox.models + :type models: ~azure.mgmt.databox.v2020_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobResourceList"]: """Lists all the jobs available under the subscription. @@ -55,7 +55,7 @@ def list( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2020_04_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -105,7 +105,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -120,7 +120,7 @@ def list_by_resource_group( self, resource_group_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobResourceList"]: """Lists all the jobs available under the given resource group. @@ -131,7 +131,7 @@ def list_by_resource_group( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2020_04_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -182,7 +182,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -198,7 +198,7 @@ async def get( resource_group_name: str, job_name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.JobResource": """Gets information about the specified job. @@ -212,7 +212,7 @@ async def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.JobResource + :rtype: ~azure.mgmt.databox.v2020_04_01.models.JobResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] @@ -248,7 +248,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobResource', pipeline_response) @@ -264,7 +264,7 @@ async def _create_initial( resource_group_name: str, job_name: str, job_resource: "_models.JobResource", - **kwargs + **kwargs: Any ) -> Optional["_models.JobResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] error_map = { @@ -302,7 +302,7 @@ async def _create_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -320,7 +320,7 @@ async def begin_create( resource_group_name: str, job_name: str, job_resource: "_models.JobResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.JobResource"]: """Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API. @@ -331,15 +331,15 @@ async def begin_create( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource: Job details from request body. - :type job_resource: ~azure.mgmt.databox.models.JobResource + :type job_resource: ~azure.mgmt.databox.v2020_04_01.models.JobResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2020_04_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -392,7 +392,7 @@ async def _delete_initial( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -425,7 +425,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -437,7 +437,7 @@ async def begin_delete( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a job. @@ -448,8 +448,8 @@ async def begin_delete( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -504,7 +504,7 @@ async def _update_initial( job_name: str, job_resource_update_parameter: "_models.JobResourceUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.JobResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] error_map = { @@ -544,7 +544,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -563,7 +563,7 @@ async def begin_update( job_name: str, job_resource_update_parameter: "_models.JobResourceUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.JobResource"]: """Updates the properties of an existing job. @@ -573,18 +573,18 @@ async def begin_update( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource_update_parameter: Job update parameters from request body. - :type job_resource_update_parameter: ~azure.mgmt.databox.models.JobResourceUpdateParameter + :type job_resource_update_parameter: ~azure.mgmt.databox.v2020_04_01.models.JobResourceUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2020_04_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -639,7 +639,7 @@ async def book_shipment_pick_up( resource_group_name: str, job_name: str, shipment_pick_up_request: "_models.ShipmentPickUpRequest", - **kwargs + **kwargs: Any ) -> "_models.ShipmentPickUpResponse": """Book shipment pick up. @@ -649,10 +649,10 @@ async def book_shipment_pick_up( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param shipment_pick_up_request: Details of shipment pick up request. - :type shipment_pick_up_request: ~azure.mgmt.databox.models.ShipmentPickUpRequest + :type shipment_pick_up_request: ~azure.mgmt.databox.v2020_04_01.models.ShipmentPickUpRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ShipmentPickUpResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse + :rtype: ~azure.mgmt.databox.v2020_04_01.models.ShipmentPickUpResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] @@ -691,7 +691,7 @@ async def book_shipment_pick_up( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) @@ -707,7 +707,7 @@ async def cancel( resource_group_name: str, job_name: str, cancellation_reason: "_models.CancellationReason", - **kwargs + **kwargs: Any ) -> None: """CancelJob. @@ -717,7 +717,7 @@ async def cancel( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param cancellation_reason: Reason for cancellation. - :type cancellation_reason: ~azure.mgmt.databox.models.CancellationReason + :type cancellation_reason: ~azure.mgmt.databox.v2020_04_01.models.CancellationReason :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 @@ -759,7 +759,7 @@ async def cancel( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -771,7 +771,7 @@ def list_credentials( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UnencryptedCredentialsList"]: """This method gets the unencrypted secrets related to the job. @@ -782,7 +782,7 @@ def list_credentials( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.UnencryptedCredentialsList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2020_04_01.models.UnencryptedCredentialsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] @@ -832,7 +832,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_operations.py index 9447a09290582..85ec66280cea5 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_operations.py @@ -26,7 +26,7 @@ class Operations: 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.databox.models + :type models: ~azure.mgmt.databox.v2020_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,13 +43,13 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """This method gets all the operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.OperationList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2020_04_01.models.OperationList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_service_operations.py index 102a614814c90..3e74981970ae9 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_service_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/aio/operations/_service_operations.py @@ -26,7 +26,7 @@ class ServiceOperations: 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.databox.models + :type models: ~azure.mgmt.databox.v2020_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def list_available_skus_by_resource_group( resource_group_name: str, location: str, available_sku_request: "_models.AvailableSkuRequest", - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AvailableSkusResult"]: """This method provides the list of available skus for the given subscription, resource group and location. @@ -56,10 +56,10 @@ def list_available_skus_by_resource_group( :param location: The location of the resource. :type location: str :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :type available_sku_request: ~azure.mgmt.databox.v2020_04_01.models.AvailableSkuRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2020_04_01.models.AvailableSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] @@ -117,7 +117,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -132,7 +132,7 @@ async def validate_address( self, location: str, validate_address: "_models.ValidateAddress", - **kwargs + **kwargs: Any ) -> "_models.AddressValidationOutput": """[DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and provide alternate addresses if any. @@ -140,10 +140,10 @@ async def validate_address( :param location: The location of the resource. :type location: str :param validate_address: Shipping address of the customer. - :type validate_address: ~azure.mgmt.databox.models.ValidateAddress + :type validate_address: ~azure.mgmt.databox.v2020_04_01.models.ValidateAddress :keyword callable cls: A custom type or function that will be passed the direct response :return: AddressValidationOutput, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.AddressValidationOutput + :rtype: ~azure.mgmt.databox.v2020_04_01.models.AddressValidationOutput :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] @@ -181,7 +181,7 @@ async def validate_address( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressValidationOutput', pipeline_response) @@ -197,7 +197,7 @@ async def validate_inputs_by_resource_group( resource_group_name: str, location: str, validation_request: "_models.ValidationRequest", - **kwargs + **kwargs: Any ) -> "_models.ValidationResponse": """This method does all necessary pre-job creation validation under resource group. @@ -206,10 +206,10 @@ async def validate_inputs_by_resource_group( :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2020_04_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2020_04_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -248,7 +248,7 @@ async def validate_inputs_by_resource_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidationResponse', pipeline_response) @@ -263,17 +263,17 @@ async def validate_inputs( self, location: str, validation_request: "_models.ValidationRequest", - **kwargs + **kwargs: Any ) -> "_models.ValidationResponse": """This method does all necessary pre-job creation validation under subscription. :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2020_04_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2020_04_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -311,7 +311,7 @@ async def validate_inputs( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidationResponse', pipeline_response) @@ -326,7 +326,7 @@ async def region_configuration( self, location: str, region_configuration_request: "_models.RegionConfigurationRequest", - **kwargs + **kwargs: Any ) -> "_models.RegionConfigurationResponse": """This API provides configuration details specific to given region/location at Subscription level. @@ -334,10 +334,10 @@ async def region_configuration( :param location: The location of the resource. :type location: str :param region_configuration_request: Request body to get the configuration for the region. - :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :type region_configuration_request: ~azure.mgmt.databox.v2020_04_01.models.RegionConfigurationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: RegionConfigurationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :rtype: ~azure.mgmt.databox.v2020_04_01.models.RegionConfigurationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] @@ -375,7 +375,7 @@ async def region_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) @@ -391,7 +391,7 @@ async def region_configuration_by_resource_group( resource_group_name: str, location: str, region_configuration_request: "_models.RegionConfigurationRequest", - **kwargs + **kwargs: Any ) -> "_models.RegionConfigurationResponse": """This API provides configuration details specific to given region/location at Resource group level. @@ -402,10 +402,10 @@ async def region_configuration_by_resource_group( :type location: str :param region_configuration_request: Request body to get the configuration for the region at resource group level. - :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :type region_configuration_request: ~azure.mgmt.databox.v2020_04_01.models.RegionConfigurationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: RegionConfigurationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :rtype: ~azure.mgmt.databox.v2020_04_01.models.RegionConfigurationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] @@ -444,7 +444,7 @@ async def region_configuration_by_resource_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_data_box_management_client_enums.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_data_box_management_client_enums.py index 88bd323185f71..cf22abab0b5f4 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_data_box_management_client_enums.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_data_box_management_client_enums.py @@ -28,202 +28,299 @@ def __getattr__(cls, name): class AccessProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - SMB = "SMB" #: Server Message Block protocol(SMB). - NFS = "NFS" #: Network File System protocol(NFS). + #: Server Message Block protocol(SMB). + SMB = "SMB" + #: Network File System protocol(NFS). + NFS = "NFS" class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of address. """ - NONE = "None" #: Address type not known. - RESIDENTIAL = "Residential" #: Residential Address. - COMMERCIAL = "Commercial" #: Commercial Address. + #: Address type not known. + NONE = "None" + #: Residential Address. + RESIDENTIAL = "Residential" + #: Commercial Address. + COMMERCIAL = "Commercial" class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The address validation status. """ - VALID = "Valid" #: Address provided is valid. - INVALID = "Invalid" #: Address provided is invalid or not supported. - AMBIGUOUS = "Ambiguous" #: Address provided is ambiguous, please choose one of the alternate addresses returned. + #: Address provided is valid. + VALID = "Valid" + #: Address provided is invalid or not supported. + INVALID = "Invalid" + #: Address provided is ambiguous, please choose one of the alternate addresses returned. + AMBIGUOUS = "Ambiguous" class ClassDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates the type of job details. """ - DATA_BOX = "DataBox" #: Data Box orders. - DATA_BOX_DISK = "DataBoxDisk" #: Data Box Disk orders. - DATA_BOX_HEAVY = "DataBoxHeavy" #: Data Box Heavy orders. + #: Data Box orders. + DATA_BOX = "DataBox" + #: Data Box Disk orders. + DATA_BOX_DISK = "DataBoxDisk" + #: Data Box Heavy orders. + DATA_BOX_HEAVY = "DataBoxHeavy" class CopyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The Status of the copy """ - NOT_STARTED = "NotStarted" #: Data copy hasn't started yet. - IN_PROGRESS = "InProgress" #: Data copy is in progress. - COMPLETED = "Completed" #: Data copy completed. - COMPLETED_WITH_ERRORS = "CompletedWithErrors" #: Data copy completed with errors. - FAILED = "Failed" #: Data copy failed. No data was copied. - NOT_RETURNED = "NotReturned" #: No copy triggered as device was not returned. - HARDWARE_ERROR = "HardwareError" #: The Device has hit hardware issues. - DEVICE_FORMATTED = "DeviceFormatted" #: Data copy failed. The Device was formatted by user. - DEVICE_METADATA_MODIFIED = "DeviceMetadataModified" #: Data copy failed. Device metadata was modified by user. - STORAGE_ACCOUNT_NOT_ACCESSIBLE = "StorageAccountNotAccessible" #: Data copy failed. Storage Account was not accessible during copy. - UNSUPPORTED_DATA = "UnsupportedData" #: Data copy failed. The Device data content is not supported. + #: Data copy hasn't started yet. + NOT_STARTED = "NotStarted" + #: Data copy is in progress. + IN_PROGRESS = "InProgress" + #: Data copy completed. + COMPLETED = "Completed" + #: Data copy completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Data copy failed. No data was copied. + FAILED = "Failed" + #: No copy triggered as device was not returned. + NOT_RETURNED = "NotReturned" + #: The Device has hit hardware issues. + HARDWARE_ERROR = "HardwareError" + #: Data copy failed. The Device was formatted by user. + DEVICE_FORMATTED = "DeviceFormatted" + #: Data copy failed. Device metadata was modified by user. + DEVICE_METADATA_MODIFIED = "DeviceMetadataModified" + #: Data copy failed. Storage Account was not accessible during copy. + STORAGE_ACCOUNT_NOT_ACCESSIBLE = "StorageAccountNotAccessible" + #: Data copy failed. The Device data content is not supported. + UNSUPPORTED_DATA = "UnsupportedData" class DataAccountType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the account. """ - STORAGE_ACCOUNT = "StorageAccount" #: Storage Accounts . - MANAGED_DISK = "ManagedDisk" #: Azure Managed disk storage. + #: Storage Accounts . + STORAGE_ACCOUNT = "StorageAccount" + #: Azure Managed disk storage. + MANAGED_DISK = "ManagedDisk" class FilterFileType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the filter file. """ - AZURE_BLOB = "AzureBlob" #: Filter file is of the type AzureBlob. - AZURE_FILE = "AzureFile" #: Filter file is of the type AzureFiles. + #: Filter file is of the type AzureBlob. + AZURE_BLOB = "AzureBlob" + #: Filter file is of the type AzureFiles. + AZURE_FILE = "AzureFile" class JobDeliveryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Delivery type of Job. """ - NON_SCHEDULED = "NonScheduled" #: Non Scheduled job. - SCHEDULED = "Scheduled" #: Scheduled job. + #: Non Scheduled job. + NON_SCHEDULED = "NonScheduled" + #: Scheduled job. + SCHEDULED = "Scheduled" class KekType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of encryption key used for key encryption. """ - MICROSOFT_MANAGED = "MicrosoftManaged" #: Key encryption key is managed by Microsoft. - CUSTOMER_MANAGED = "CustomerManaged" #: Key encryption key is managed by the Customer. + #: Key encryption key is managed by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" + #: Key encryption key is managed by the Customer. + CUSTOMER_MANAGED = "CustomerManaged" class LogCollectionLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Level of the logs to be collected. """ - ERROR = "Error" #: Only Errors will be collected in the logs. - VERBOSE = "Verbose" #: Verbose logging (includes Errors, CRC, size information and others). + #: Only Errors will be collected in the logs. + ERROR = "Error" + #: Verbose logging (includes Errors, CRC, size information and others). + VERBOSE = "Verbose" class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Name of the stage. """ - DEVICE_PREPARED = "DevicePrepared" #: Notification at device prepared stage. - DISPATCHED = "Dispatched" #: Notification at device dispatched stage. - DELIVERED = "Delivered" #: Notification at device delivered stage. - PICKED_UP = "PickedUp" #: Notification at device picked up from user stage. - AT_AZURE_DC = "AtAzureDC" #: Notification at device received at Azure datacenter stage. - DATA_COPY = "DataCopy" #: Notification at data copy started stage. + #: Notification at device prepared stage. + DEVICE_PREPARED = "DevicePrepared" + #: Notification at device dispatched stage. + DISPATCHED = "Dispatched" + #: Notification at device delivered stage. + DELIVERED = "Delivered" + #: Notification at device picked up from user stage. + PICKED_UP = "PickedUp" + #: Notification at device received at Azure datacenter stage. + AT_AZURE_DC = "AtAzureDC" + #: Notification at data copy started stage. + DATA_COPY = "DataCopy" class OverallValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Overall validation status. """ - ALL_VALID_TO_PROCEED = "AllValidToProceed" #: Every input request is valid. - INPUTS_REVISIT_REQUIRED = "InputsRevisitRequired" #: Some input requests are not valid. - CERTAIN_INPUT_VALIDATIONS_SKIPPED = "CertainInputValidationsSkipped" #: Certain input validations skipped. + #: Every input request is valid. + ALL_VALID_TO_PROCEED = "AllValidToProceed" + #: Some input requests are not valid. + INPUTS_REVISIT_REQUIRED = "InputsRevisitRequired" + #: Certain input validations skipped. + CERTAIN_INPUT_VALIDATIONS_SKIPPED = "CertainInputValidationsSkipped" class ShareDestinationFormatType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the share. """ - UNKNOWN_TYPE = "UnknownType" #: Unknown format. - HCS = "HCS" #: Storsimple data format. - BLOCK_BLOB = "BlockBlob" #: Azure storage block blob format. - PAGE_BLOB = "PageBlob" #: Azure storage page blob format. - AZURE_FILE = "AzureFile" #: Azure storage file format. - MANAGED_DISK = "ManagedDisk" #: Azure Compute Disk. + #: Unknown format. + UNKNOWN_TYPE = "UnknownType" + #: Storsimple data format. + HCS = "HCS" + #: Azure storage block blob format. + BLOCK_BLOB = "BlockBlob" + #: Azure storage page blob format. + PAGE_BLOB = "PageBlob" + #: Azure storage file format. + AZURE_FILE = "AzureFile" + #: Azure Compute Disk. + MANAGED_DISK = "ManagedDisk" class SkuDisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Reason why the Sku is disabled. """ - NONE = "None" #: SKU is not disabled. - COUNTRY = "Country" #: SKU is not available in the requested country. - REGION = "Region" #: SKU is not available to push data to the requested Azure region. - FEATURE = "Feature" #: Required features are not enabled for the SKU. - OFFER_TYPE = "OfferType" #: Subscription does not have required offer types for the SKU. - NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription notification. + #: SKU is not disabled. + NONE = "None" + #: SKU is not available in the requested country. + COUNTRY = "Country" + #: SKU is not available to push data to the requested Azure region. + REGION = "Region" + #: Required features are not enabled for the SKU. + FEATURE = "Feature" + #: Subscription does not have required offer types for the SKU. + OFFER_TYPE = "OfferType" + #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription + #: notification. + NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - DATA_BOX = "DataBox" #: Data Box. - DATA_BOX_DISK = "DataBoxDisk" #: Data Box Disk. - DATA_BOX_HEAVY = "DataBoxHeavy" #: Data Box Heavy. + #: Data Box. + DATA_BOX = "DataBox" + #: Data Box Disk. + DATA_BOX_DISK = "DataBoxDisk" + #: Data Box Heavy. + DATA_BOX_HEAVY = "DataBoxHeavy" class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Name of the stage which is in progress. """ - DEVICE_ORDERED = "DeviceOrdered" #: An order has been created. - DEVICE_PREPARED = "DevicePrepared" #: A device has been prepared for the order. - DISPATCHED = "Dispatched" #: Device has been dispatched to the user of the order. - DELIVERED = "Delivered" #: Device has been delivered to the user of the order. - PICKED_UP = "PickedUp" #: Device has been picked up from user and in transit to Azure datacenter. - AT_AZURE_DC = "AtAzureDC" #: Device has been received at Azure datacenter from the user. - DATA_COPY = "DataCopy" #: Data copy from the device at Azure datacenter. - COMPLETED = "Completed" #: Order has completed. - COMPLETED_WITH_ERRORS = "CompletedWithErrors" #: Order has completed with errors. - CANCELLED = "Cancelled" #: Order has been cancelled. - FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" #: Order has failed due to issue reported by user. - FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" #: Order has failed due to issue detected at Azure datacenter. - ABORTED = "Aborted" #: Order has been aborted. - COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" #: Order has completed with warnings. - READY_TO_DISPATCH_FROM_AZURE_DC = "ReadyToDispatchFromAzureDC" #: Device is ready to be handed to customer from Azure DC. - READY_TO_RECEIVE_AT_AZURE_DC = "ReadyToReceiveAtAzureDC" #: Device can be dropped off at Azure DC. + #: An order has been created. + DEVICE_ORDERED = "DeviceOrdered" + #: A device has been prepared for the order. + DEVICE_PREPARED = "DevicePrepared" + #: Device has been dispatched to the user of the order. + DISPATCHED = "Dispatched" + #: Device has been delivered to the user of the order. + DELIVERED = "Delivered" + #: Device has been picked up from user and in transit to Azure datacenter. + PICKED_UP = "PickedUp" + #: Device has been received at Azure datacenter from the user. + AT_AZURE_DC = "AtAzureDC" + #: Data copy from the device at Azure datacenter. + DATA_COPY = "DataCopy" + #: Order has completed. + COMPLETED = "Completed" + #: Order has completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Order has been cancelled. + CANCELLED = "Cancelled" + #: Order has failed due to issue reported by user. + FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" + #: Order has failed due to issue detected at Azure datacenter. + FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" + #: Order has been aborted. + ABORTED = "Aborted" + #: Order has completed with warnings. + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" + #: Device is ready to be handed to customer from Azure DC. + READY_TO_DISPATCH_FROM_AZURE_DC = "ReadyToDispatchFromAzureDC" + #: Device can be dropped off at Azure DC. + READY_TO_RECEIVE_AT_AZURE_DC = "ReadyToReceiveAtAzureDC" class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of the job stage. """ - NONE = "None" #: No status available yet. - IN_PROGRESS = "InProgress" #: Stage is in progress. - SUCCEEDED = "Succeeded" #: Stage has succeeded. - FAILED = "Failed" #: Stage has failed. - CANCELLED = "Cancelled" #: Stage has been cancelled. - CANCELLING = "Cancelling" #: Stage is cancelling. - SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" #: Stage has succeeded with errors. - WAITING_FOR_CUSTOMER_ACTION = "WaitingForCustomerAction" #: Stage is stuck until customer takes some action. - SUCCEEDED_WITH_WARNINGS = "SucceededWithWarnings" #: Stage has succeeded with warnings. + #: No status available yet. + NONE = "None" + #: Stage is in progress. + IN_PROGRESS = "InProgress" + #: Stage has succeeded. + SUCCEEDED = "Succeeded" + #: Stage has failed. + FAILED = "Failed" + #: Stage has been cancelled. + CANCELLED = "Cancelled" + #: Stage is cancelling. + CANCELLING = "Cancelling" + #: Stage has succeeded with errors. + SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" + #: Stage is stuck until customer takes some action. + WAITING_FOR_CUSTOMER_ACTION = "WaitingForCustomerAction" + #: Stage has succeeded with warnings. + SUCCEEDED_WITH_WARNINGS = "SucceededWithWarnings" class TransferConfigurationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the configuration for transfer. """ - TRANSFER_ALL = "TransferAll" #: Transfer all the data. - TRANSFER_USING_FILTER = "TransferUsingFilter" #: Transfer using filter. + #: Transfer all the data. + TRANSFER_ALL = "TransferAll" + #: Transfer using filter. + TRANSFER_USING_FILTER = "TransferUsingFilter" class TransferType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the transfer. """ - IMPORT_TO_AZURE = "ImportToAzure" #: Import data to azure. - EXPORT_FROM_AZURE = "ExportFromAzure" #: Export data from azure. + #: Import data to azure. + IMPORT_TO_AZURE = "ImportToAzure" + #: Export data from azure. + EXPORT_FROM_AZURE = "ExportFromAzure" class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Transport Shipment Type supported for given region. """ - CUSTOMER_MANAGED = "CustomerManaged" #: Shipment Logistics is handled by the customer. - MICROSOFT_MANAGED = "MicrosoftManaged" #: Shipment Logistics is handled by Microsoft. + #: Shipment Logistics is handled by the customer. + CUSTOMER_MANAGED = "CustomerManaged" + #: Shipment Logistics is handled by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" class ValidationInputDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Identifies the type of validation request. """ - VALIDATE_ADDRESS = "ValidateAddress" #: Identify request and response of address validation. - VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB = "ValidateSubscriptionIsAllowedToCreateJob" #: Identify request and response for validation of subscription permission to create job. - VALIDATE_PREFERENCES = "ValidatePreferences" #: Identify request and response of preference validation. - VALIDATE_CREATE_ORDER_LIMIT = "ValidateCreateOrderLimit" #: Identify request and response of create order limit for subscription validation. - VALIDATE_SKU_AVAILABILITY = "ValidateSkuAvailability" #: Identify request and response of active job limit for sku availability. - VALIDATE_DATA_TRANSFER_DETAILS = "ValidateDataTransferDetails" #: Identify request and response of data transfer details validation. + #: Identify request and response of address validation. + VALIDATE_ADDRESS = "ValidateAddress" + #: Identify request and response for validation of subscription permission to create job. + VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB = "ValidateSubscriptionIsAllowedToCreateJob" + #: Identify request and response of preference validation. + VALIDATE_PREFERENCES = "ValidatePreferences" + #: Identify request and response of create order limit for subscription validation. + VALIDATE_CREATE_ORDER_LIMIT = "ValidateCreateOrderLimit" + #: Identify request and response of active job limit for sku availability. + VALIDATE_SKU_AVAILABILITY = "ValidateSkuAvailability" + #: Identify request and response of data transfer details validation. + VALIDATE_DATA_TRANSFER_DETAILS = "ValidateDataTransferDetails" class ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Create order limit validation status. """ - VALID = "Valid" #: Validation is successful. - INVALID = "Invalid" #: Validation is not successful. - SKIPPED = "Skipped" #: Validation is skipped. + #: Validation is successful. + VALID = "Valid" + #: Validation is not successful. + INVALID = "Invalid" + #: Validation is skipped. + SKIPPED = "Skipped" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models.py index eae813d0281c7..8f91b081f7b45 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models.py @@ -19,12 +19,13 @@ class AccountCredentialDetails(msrest.serialization.Model): :vartype account_name: str :ivar data_account_type: Type of the account. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :vartype data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :ivar account_connection_string: Connection string of the account endpoint to use the account as a storage endpoint on the device. :vartype account_connection_string: str :ivar share_credential_details: Per share level unencrypted access credentials. - :vartype share_credential_details: list[~azure.mgmt.databox.models.ShareCredentialDetails] + :vartype share_credential_details: + list[~azure.mgmt.databox.v2020_04_01.models.ShareCredentialDetails] """ _validation = { @@ -58,7 +59,7 @@ class AdditionalErrorInfo(msrest.serialization.Model): :param type: Additional error type. :type type: str :param info: Additional error info. - :type info: object + :type info: any """ _attribute_map = { @@ -84,14 +85,16 @@ class AddressValidationOutput(msrest.serialization.Model): Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2020_04_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2020_04_01.models.ShippingAddress] """ _validation = { @@ -132,9 +135,10 @@ class ValidationInputResponse(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError """ _validation = { @@ -171,14 +175,16 @@ class AddressValidationProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2020_04_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2020_04_01.models.ShippingAddress] """ _validation = { @@ -211,7 +217,7 @@ class ApiError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param error: Required. - :type error: ~azure.mgmt.databox.models.ErrorDetail + :type error: ~azure.mgmt.databox.v2020_04_01.models.ErrorDetail """ _validation = { @@ -302,7 +308,7 @@ class AvailableSkuRequest(msrest.serialization.Model): :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransferType :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str @@ -310,7 +316,7 @@ class AvailableSkuRequest(msrest.serialization.Model): https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str :param sku_names: Sku Names to filter for available skus. - :type sku_names: list[str or ~azure.mgmt.databox.models.SkuName] + :type sku_names: list[str or ~azure.mgmt.databox.v2020_04_01.models.SkuName] """ _validation = { @@ -343,7 +349,7 @@ class AvailableSkusResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of available skus. - :vartype value: list[~azure.mgmt.databox.models.SkuInformation] + :vartype value: list[~azure.mgmt.databox.v2020_04_01.models.SkuInformation] :param next_link: Link for the next set of skus. :type next_link: str """ @@ -457,9 +463,9 @@ class CloudError(msrest.serialization.Model): :param target: Cloud error target. :type target: str :ivar details: Cloud error details. - :vartype details: list[~azure.mgmt.databox.models.CloudError] + :vartype details: list[~azure.mgmt.databox.v2020_04_01.models.CloudError] :ivar additional_info: Cloud error additional info. - :vartype additional_info: list[~azure.mgmt.databox.models.AdditionalErrorInfo] + :vartype additional_info: list[~azure.mgmt.databox.v2020_04_01.models.AdditionalErrorInfo] """ _validation = { @@ -503,7 +509,8 @@ class ContactDetails(msrest.serialization.Model): :param email_list: Required. List of Email-ids to be notified about job progress. :type email_list: list[str] :param notification_preference: Notification preference for a job stage. - :type notification_preference: list[~azure.mgmt.databox.models.NotificationPreference] + :type notification_preference: + list[~azure.mgmt.databox.v2020_04_01.models.NotificationPreference] """ _validation = { @@ -544,7 +551,7 @@ class CopyLogDetails(msrest.serialization.Model): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator """ _validation = { @@ -577,10 +584,10 @@ class CopyProgress(msrest.serialization.Model): :vartype storage_account_name: str :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", "ExportFromAzure". - :vartype transfer_type: str or ~azure.mgmt.databox.models.TransferType + :vartype transfer_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransferType :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :vartype data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :ivar account_id: Id of the account where the data needs to be uploaded. :vartype account_id: str :ivar bytes_processed: To indicate bytes transferred. @@ -682,7 +689,8 @@ class ValidationRequest(msrest.serialization.Model): :type validation_category: str :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2020_04_01.models.ValidationInputRequest] """ _validation = { @@ -718,7 +726,8 @@ class CreateJobValidations(ValidationRequest): :type validation_category: str :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2020_04_01.models.ValidationInputRequest] """ _validation = { @@ -751,7 +760,8 @@ class ValidationInputRequest(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator """ _validation = { @@ -783,10 +793,11 @@ class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName """ _validation = { @@ -819,12 +830,13 @@ class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInpu server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar status: Create order limit validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.ValidationStatus """ _validation = { @@ -858,7 +870,7 @@ class DataAccountDetails(msrest.serialization.Model): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -899,7 +911,7 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar account_name: Account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -943,7 +955,7 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar disk_serial_number: Disk Serial Number. :vartype disk_serial_number: str :ivar error_log_link: Link for copy error logs. @@ -991,7 +1003,7 @@ class DataBoxDiskCopyProgress(msrest.serialization.Model): :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". - :vartype status: str or ~azure.mgmt.databox.models.CopyStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.CopyStatus """ _validation = { @@ -1030,35 +1042,35 @@ class JobDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_04_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_04_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_04_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_04_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_04_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_04_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :vartype key_encryption_key: ~azure.mgmt.databox.v2020_04_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int """ _validation = { @@ -1087,7 +1099,7 @@ class JobDetails(msrest.serialization.Model): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } _subtype_map = { @@ -1112,7 +1124,7 @@ def __init__( self.reverse_shipment_label_sas_key = None self.chain_of_custody_sas_key = None self.key_encryption_key = None - self.expected_data_size_in_terabytes = kwargs.get('expected_data_size_in_terabytes', None) + self.expected_data_size_in_tera_bytes = kwargs.get('expected_data_size_in_tera_bytes', None) class DataBoxDiskJobDetails(JobDetails): @@ -1123,41 +1135,41 @@ class DataBoxDiskJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_04_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_04_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_04_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_04_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_04_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_04_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :vartype key_encryption_key: ~azure.mgmt.databox.v2020_04_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :param preferred_disks: User preference on what size disks are needed for the job. The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int. :type preferred_disks: dict[str, int] :ivar copy_progress: Copy progress per disk. - :vartype copy_progress: list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_04_01.models.DataBoxDiskCopyProgress] :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. :vartype disks_and_size_details: dict[str, int] @@ -1193,7 +1205,7 @@ class DataBoxDiskJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, @@ -1224,11 +1236,11 @@ class JobSecrets(msrest.serialization.Model): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_04_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError """ _validation = { @@ -1266,13 +1278,13 @@ class DataBoxDiskJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_04_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar disk_secrets: Contains the list of secrets object for that device. - :vartype disk_secrets: list[~azure.mgmt.databox.models.DiskSecret] + :vartype disk_secrets: list[~azure.mgmt.databox.v2020_04_01.models.DiskSecret] :ivar pass_key: PassKey for the disk Job. :vartype pass_key: str :ivar is_passkey_user_defined: Whether passkey was provided by user. @@ -1317,7 +1329,7 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar account_name: Account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -1360,37 +1372,37 @@ class DataBoxHeavyJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_04_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_04_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_04_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_04_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_04_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_04_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :vartype key_encryption_key: ~azure.mgmt.databox.v2020_04_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar copy_progress: Copy progress per account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_04_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox Heavy. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -1427,7 +1439,7 @@ class DataBoxHeavyJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } @@ -1451,13 +1463,13 @@ class DataBoxHeavyJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_04_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. - :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.models.DataBoxHeavySecret] + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2020_04_01.models.DataBoxHeavySecret] """ _validation = { @@ -1493,12 +1505,14 @@ class DataBoxHeavySecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2020_04_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2020_04_01.models.AccountCredentialDetails] """ _validation = { @@ -1537,37 +1551,37 @@ class DataBoxJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_04_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_04_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_04_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_04_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_04_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_04_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :vartype key_encryption_key: ~azure.mgmt.databox.v2020_04_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar copy_progress: Copy progress per storage account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_04_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be @@ -1604,7 +1618,7 @@ class DataBoxJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } @@ -1628,13 +1642,13 @@ class DataboxJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_04_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :param pod_secrets: Contains the list of secret objects for a job. - :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + :type pod_secrets: list[~azure.mgmt.databox.v2020_04_01.models.DataBoxSecret] """ _validation = { @@ -1672,7 +1686,7 @@ class ScheduleAvailabilityRequest(msrest.serialization.Model): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -1712,7 +1726,7 @@ class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -1746,12 +1760,14 @@ class DataBoxSecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2020_04_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2020_04_01.models.AccountCredentialDetails] """ _validation = { @@ -1788,12 +1804,12 @@ class DataExportDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param transfer_configuration: Required. Configuration for the data transfer. - :type transfer_configuration: ~azure.mgmt.databox.models.TransferConfiguration + :type transfer_configuration: ~azure.mgmt.databox.v2020_04_01.models.TransferConfiguration :param log_collection_level: Level of the logs to be collected. Possible values include: - "Error", "Verbose". - :type log_collection_level: str or ~azure.mgmt.databox.models.LogCollectionLevel + "Error", "Verbose". Default value: "Error". + :type log_collection_level: str or ~azure.mgmt.databox.v2020_04_01.models.LogCollectionLevel :param account_details: Required. Account details of the data to be transferred. - :type account_details: ~azure.mgmt.databox.models.DataAccountDetails + :type account_details: ~azure.mgmt.databox.v2020_04_01.models.DataAccountDetails """ _validation = { @@ -1813,7 +1829,7 @@ def __init__( ): super(DataExportDetails, self).__init__(**kwargs) self.transfer_configuration = kwargs['transfer_configuration'] - self.log_collection_level = kwargs.get('log_collection_level', None) + self.log_collection_level = kwargs.get('log_collection_level', "Error") self.account_details = kwargs['account_details'] @@ -1823,7 +1839,7 @@ class DataImportDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param account_details: Required. Account details of the data to be transferred. - :type account_details: ~azure.mgmt.databox.models.DataAccountDetails + :type account_details: ~azure.mgmt.databox.v2020_04_01.models.DataAccountDetails """ _validation = { @@ -1881,17 +1897,18 @@ class DataTransferDetailsValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :param data_export_details: List of DataTransfer details to be used to export data from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_04_01.models.DataExportDetails] :param data_import_details: List of DataTransfer details to be used to import data to azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_04_01.models.DataImportDetails] :param device_type: Required. Device type. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransferType """ _validation = { @@ -1931,12 +1948,13 @@ class DataTransferDetailsValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar status: Data transfer details validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.ValidationStatus """ _validation = { @@ -1970,8 +1988,8 @@ class DcAccessSecurityCode(msrest.serialization.Model): """ _attribute_map = { - 'reverse_dc_access_code': {'key': 'reverseDcAccessCode', 'type': 'str'}, - 'forward_dc_access_code': {'key': 'forwardDcAccessCode', 'type': 'str'}, + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, } def __init__( @@ -2023,25 +2041,25 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str - :param expected_data_size_in_terabytes: Required. The expected size of the data, which needs to - be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int """ _validation = { 'storage_location': {'required': True}, 'sku_name': {'required': True}, - 'expected_data_size_in_terabytes': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, } _attribute_map = { 'storage_location': {'key': 'storageLocation', 'type': 'str'}, 'sku_name': {'key': 'skuName', 'type': 'str'}, 'country': {'key': 'country', 'type': 'str'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } def __init__( @@ -2050,7 +2068,7 @@ def __init__( ): super(DiskScheduleAvailabilityRequest, self).__init__(**kwargs) self.sku_name = 'DataBoxDisk' # type: str - self.expected_data_size_in_terabytes = kwargs['expected_data_size_in_terabytes'] + self.expected_data_size_in_tera_bytes = kwargs['expected_data_size_in_tera_bytes'] class DiskSecret(msrest.serialization.Model): @@ -2094,7 +2112,7 @@ class ErrorDetail(msrest.serialization.Model): :param message: Required. :type message: str :param details: - :type details: list[~azure.mgmt.databox.models.Details] + :type details: list[~azure.mgmt.databox.v2020_04_01.models.Details] :param target: :type target: str """ @@ -2129,7 +2147,7 @@ class FilterFileDetails(msrest.serialization.Model): :param filter_file_type: Required. Type of the filter file. Possible values include: "AzureBlob", "AzureFile". - :type filter_file_type: str or ~azure.mgmt.databox.models.FilterFileType + :type filter_file_type: str or ~azure.mgmt.databox.v2020_04_01.models.FilterFileType :param filter_file_path: Required. Path of the file that contains the details of all items to transfer. :type filter_file_path: str @@ -2164,7 +2182,7 @@ class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -2221,9 +2239,9 @@ class Resource(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2020_04_01.models.Sku :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_04_01.models.ResourceIdentity """ _validation = { @@ -2265,9 +2283,9 @@ class JobResource(Resource): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2020_04_01.models.Sku :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_04_01.models.ResourceIdentity :ivar name: Name of the object. :vartype name: str :ivar id: Id of the object. @@ -2276,7 +2294,7 @@ class JobResource(Resource): :vartype type: str :param transfer_type: Required. Type of the data transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransferType :ivar is_cancellable: Describes whether the job is cancellable or not. :vartype is_cancellable: bool :ivar is_deletable: Describes whether the job is deletable or not. @@ -2290,20 +2308,20 @@ class JobResource(Resource): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype status: str or ~azure.mgmt.databox.models.StageName + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.StageName :ivar start_time: Time at which the job was started in UTC ISO 8601 format. :vartype start_time: ~datetime.datetime :ivar error: Top level error for the job. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :param details: Details of a job run. This field will only be sent for expand details filter. - :type details: ~azure.mgmt.databox.models.JobDetails + :type details: ~azure.mgmt.databox.v2020_04_01.models.JobDetails :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", - "Scheduled". - :type delivery_type: str or ~azure.mgmt.databox.models.JobDeliveryType + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2020_04_01.models.JobDeliveryType :param delivery_info: Delivery Info of Job. - :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo + :type delivery_info: ~azure.mgmt.databox.v2020_04_01.models.JobDeliveryInfo :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. :vartype is_cancellable_without_fee: bool """ @@ -2367,7 +2385,7 @@ def __init__( self.error = None self.details = kwargs.get('details', None) self.cancellation_reason = None - self.delivery_type = kwargs.get('delivery_type', None) + self.delivery_type = kwargs.get('delivery_type', "NonScheduled") self.delivery_info = kwargs.get('delivery_info', None) self.is_cancellable_without_fee = None @@ -2376,7 +2394,7 @@ class JobResourceList(msrest.serialization.Model): """Job Resource Collection. :param value: List of job resources. - :type value: list[~azure.mgmt.databox.models.JobResource] + :type value: list[~azure.mgmt.databox.v2020_04_01.models.JobResource] :param next_link: Link for the next set of job resources. :type next_link: str """ @@ -2402,9 +2420,9 @@ class JobResourceUpdateParameter(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_04_01.models.ResourceIdentity :param details: Details of a job to be updated. - :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :type details: ~azure.mgmt.databox.v2020_04_01.models.UpdateJobDetails """ _attribute_map = { @@ -2433,17 +2451,17 @@ class JobStages(msrest.serialization.Model): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype stage_name: str or ~azure.mgmt.databox.models.StageName + :vartype stage_name: str or ~azure.mgmt.databox.v2020_04_01.models.StageName :ivar display_name: Display name of the job stage. :vartype display_name: str :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors", "WaitingForCustomerAction", "SucceededWithWarnings". - :vartype stage_status: str or ~azure.mgmt.databox.models.StageStatus + :vartype stage_status: str or ~azure.mgmt.databox.v2020_04_01.models.StageStatus :ivar stage_time: Time for the job stage in UTC ISO 8601 format. :vartype stage_time: ~datetime.datetime :ivar job_stage_details: Job Stage Details. - :vartype job_stage_details: object + :vartype job_stage_details: any """ _validation = { @@ -2480,8 +2498,8 @@ class KeyEncryptionKey(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param kek_type: Required. Type of encryption key used for key encryption. Possible values - include: "MicrosoftManaged", "CustomerManaged". - :type kek_type: str or ~azure.mgmt.databox.models.KekType + include: "MicrosoftManaged", "CustomerManaged". Default value: "MicrosoftManaged". + :type kek_type: str or ~azure.mgmt.databox.v2020_04_01.models.KekType :param kek_url: Key encryption key. It is required in case of Customer managed KekType. :type kek_url: str :param kek_vault_resource_id: Kek vault resource id. It is required in case of Customer managed @@ -2504,7 +2522,7 @@ def __init__( **kwargs ): super(KeyEncryptionKey, self).__init__(**kwargs) - self.kek_type = kwargs['kek_type'] + self.kek_type = kwargs.get('kek_type', "MicrosoftManaged") self.kek_url = kwargs.get('kek_url', None) self.kek_vault_resource_id = kwargs.get('kek_vault_resource_id', None) @@ -2516,7 +2534,7 @@ class ManagedDiskDetails(DataAccountDetails): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -2561,7 +2579,7 @@ class NotificationPreference(msrest.serialization.Model): :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". - :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName + :type stage_name: str or ~azure.mgmt.databox.v2020_04_01.models.NotificationStageName :param send_notification: Required. Notification is required or not. :type send_notification: bool """ @@ -2582,7 +2600,7 @@ def __init__( ): super(NotificationPreference, self).__init__(**kwargs) self.stage_name = kwargs['stage_name'] - self.send_notification = kwargs['send_notification'] + self.send_notification = kwargs.get('send_notification', True) class Operation(msrest.serialization.Model): @@ -2594,9 +2612,9 @@ class Operation(msrest.serialization.Model): {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. :vartype name: str :ivar display: Operation display values. - :vartype display: ~azure.mgmt.databox.models.OperationDisplay + :vartype display: ~azure.mgmt.databox.v2020_04_01.models.OperationDisplay :ivar properties: Operation properties. - :vartype properties: object + :vartype properties: any :ivar origin: Origin of the operation. Can be : user|system|user,system. :vartype origin: str :param is_data_action: Indicates whether the operation is a data action. @@ -2667,7 +2685,7 @@ class OperationList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of operations. - :vartype value: list[~azure.mgmt.databox.models.Operation] + :vartype value: list[~azure.mgmt.databox.v2020_04_01.models.Operation] :param next_link: Link for the next set of operations. :type next_link: str """ @@ -2731,7 +2749,7 @@ class Preferences(msrest.serialization.Model): :param preferred_data_center_region: Preferred data center region. :type preferred_data_center_region: list[str] :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2020_04_01.models.TransportPreferences """ _attribute_map = { @@ -2757,12 +2775,13 @@ class PreferencesValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :param preference: Preference of transport and data center. - :type preference: ~azure.mgmt.databox.models.Preferences + :type preference: ~azure.mgmt.databox.v2020_04_01.models.Preferences :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName """ _validation = { @@ -2797,12 +2816,13 @@ class PreferencesValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar status: Validation status of requested data center and transport. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.ValidationStatus """ _validation = { @@ -2831,10 +2851,12 @@ class RegionConfigurationRequest(msrest.serialization.Model): :param schedule_availability_request: Request body to get the availability for scheduling orders. - :type schedule_availability_request: ~azure.mgmt.databox.models.ScheduleAvailabilityRequest + :type schedule_availability_request: + ~azure.mgmt.databox.v2020_04_01.models.ScheduleAvailabilityRequest :param transport_availability_request: Request body to get the transport availability for given sku. - :type transport_availability_request: ~azure.mgmt.databox.models.TransportAvailabilityRequest + :type transport_availability_request: + ~azure.mgmt.databox.v2020_04_01.models.TransportAvailabilityRequest """ _attribute_map = { @@ -2858,10 +2880,10 @@ class RegionConfigurationResponse(msrest.serialization.Model): :ivar schedule_availability_response: Schedule availability for given sku in a region. :vartype schedule_availability_response: - ~azure.mgmt.databox.models.ScheduleAvailabilityResponse + ~azure.mgmt.databox.v2020_04_01.models.ScheduleAvailabilityResponse :ivar transport_availability_response: Transport options available for given sku in a region. :vartype transport_availability_response: - ~azure.mgmt.databox.models.TransportAvailabilityResponse + ~azure.mgmt.databox.v2020_04_01.models.TransportAvailabilityResponse """ _validation = { @@ -2951,13 +2973,14 @@ class ShareCredentialDetails(msrest.serialization.Model): :vartype share_name: str :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". - :vartype share_type: str or ~azure.mgmt.databox.models.ShareDestinationFormatType + :vartype share_type: str or ~azure.mgmt.databox.v2020_04_01.models.ShareDestinationFormatType :ivar user_name: User name for the share. :vartype user_name: str :ivar password: Password for the share. :vartype password: str :ivar supported_access_protocols: Access protocols supported on the device. - :vartype supported_access_protocols: list[str or ~azure.mgmt.databox.models.AccessProtocol] + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2020_04_01.models.AccessProtocol] """ _validation = { @@ -3080,8 +3103,8 @@ class ShippingAddress(msrest.serialization.Model): :param company_name: Name of the company. :type company_name: str :param address_type: Type of address. Possible values include: "None", "Residential", - "Commercial". - :type address_type: str or ~azure.mgmt.databox.models.AddressType + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2020_04_01.models.AddressType """ _validation = { @@ -3117,7 +3140,7 @@ def __init__( self.postal_code = kwargs['postal_code'] self.zip_extended_code = kwargs.get('zip_extended_code', None) self.company_name = kwargs.get('company_name', None) - self.address_type = kwargs.get('address_type', None) + self.address_type = kwargs.get('address_type', "None") class Sku(msrest.serialization.Model): @@ -3127,7 +3150,7 @@ class Sku(msrest.serialization.Model): :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type name: str or ~azure.mgmt.databox.models.SkuName + :type name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param display_name: The display name of the sku. :type display_name: str :param family: The sku family. @@ -3163,13 +3186,14 @@ class SkuAvailabilityValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransferType :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str @@ -3217,12 +3241,13 @@ class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.ValidationStatus """ _validation = { @@ -3319,21 +3344,21 @@ class SkuInformation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.databox.models.Sku + :vartype sku: ~azure.mgmt.databox.v2020_04_01.models.Sku :ivar enabled: The sku is enabled or not. :vartype enabled: bool :ivar data_location_to_service_location_map: The map of data location to service location. :vartype data_location_to_service_location_map: - list[~azure.mgmt.databox.models.DataLocationToServiceLocationMap] + list[~azure.mgmt.databox.v2020_04_01.models.DataLocationToServiceLocationMap] :ivar capacity: Capacity of the Sku. - :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :vartype capacity: ~azure.mgmt.databox.v2020_04_01.models.SkuCapacity :ivar costs: Cost of the Sku. - :vartype costs: list[~azure.mgmt.databox.models.SkuCost] + :vartype costs: list[~azure.mgmt.databox.v2020_04_01.models.SkuCost] :ivar api_versions: Api versions that support this Sku. :vartype api_versions: list[str] :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". - :vartype disabled_reason: str or ~azure.mgmt.databox.models.SkuDisabledReason + :vartype disabled_reason: str or ~azure.mgmt.databox.v2020_04_01.models.SkuDisabledReason :ivar disabled_reason_message: Message for why the Sku is disabled. :vartype disabled_reason_message: str :ivar required_feature: Required feature to access the sku. @@ -3387,7 +3412,7 @@ class StorageAccountDetails(DataAccountDetails): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -3428,7 +3453,8 @@ class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator """ _validation = { @@ -3458,12 +3484,13 @@ class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInp server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar status: Validation status of subscription permission to create job. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.ValidationStatus """ _validation = { @@ -3494,7 +3521,7 @@ class TransferAllDetails(msrest.serialization.Model): :param data_account_type: Required. Type of the account of data. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :param transfer_all_blobs: To indicate if all Azure blobs have to be transferred. :type transfer_all_blobs: bool :param transfer_all_files: To indicate if all Azure Files have to be transferred. @@ -3528,14 +3555,16 @@ class TransferConfiguration(msrest.serialization.Model): :param transfer_configuration_type: Required. Type of the configuration for transfer. Possible values include: "TransferAll", "TransferUsingFilter". - :type transfer_configuration_type: str or ~azure.mgmt.databox.models.TransferConfigurationType + :type transfer_configuration_type: str or + ~azure.mgmt.databox.v2020_04_01.models.TransferConfigurationType :param transfer_filter_details: Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. :type transfer_filter_details: - ~azure.mgmt.databox.models.TransferConfigurationTransferFilterDetails + ~azure.mgmt.databox.v2020_04_01.models.TransferConfigurationTransferFilterDetails :param transfer_all_details: Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. - :type transfer_all_details: ~azure.mgmt.databox.models.TransferConfigurationTransferAllDetails + :type transfer_all_details: + ~azure.mgmt.databox.v2020_04_01.models.TransferConfigurationTransferAllDetails """ _validation = { @@ -3562,7 +3591,7 @@ class TransferConfigurationTransferAllDetails(msrest.serialization.Model): """Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. :param include: Details to transfer all data. - :type include: ~azure.mgmt.databox.models.TransferAllDetails + :type include: ~azure.mgmt.databox.v2020_04_01.models.TransferAllDetails """ _attribute_map = { @@ -3581,7 +3610,7 @@ class TransferConfigurationTransferFilterDetails(msrest.serialization.Model): """Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. :param include: Details of the filtering the transfer of data. - :type include: ~azure.mgmt.databox.models.TransferFilterDetails + :type include: ~azure.mgmt.databox.v2020_04_01.models.TransferFilterDetails """ _attribute_map = { @@ -3603,13 +3632,13 @@ class TransferFilterDetails(msrest.serialization.Model): :param data_account_type: Required. Type of the account of data. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :param blob_filter_details: Filter details to transfer blobs. - :type blob_filter_details: ~azure.mgmt.databox.models.BlobFilterDetails + :type blob_filter_details: ~azure.mgmt.databox.v2020_04_01.models.BlobFilterDetails :param azure_file_filter_details: Filter details to transfer Azure files. - :type azure_file_filter_details: ~azure.mgmt.databox.models.AzureFileFilterDetails + :type azure_file_filter_details: ~azure.mgmt.databox.v2020_04_01.models.AzureFileFilterDetails :param filter_file_details: Details of the filter files to be used for data transfer. - :type filter_file_details: list[~azure.mgmt.databox.models.FilterFileDetails] + :type filter_file_details: list[~azure.mgmt.databox.v2020_04_01.models.FilterFileDetails] """ _validation = { @@ -3641,7 +3670,7 @@ class TransportAvailabilityDetails(msrest.serialization.Model): :ivar shipment_type: Transport Shipment Type supported for given region. Possible values include: "CustomerManaged", "MicrosoftManaged". - :vartype shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :vartype shipment_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransportShipmentTypes """ _validation = { @@ -3665,7 +3694,7 @@ class TransportAvailabilityRequest(msrest.serialization.Model): :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName """ _attribute_map = { @@ -3687,7 +3716,7 @@ class TransportAvailabilityResponse(msrest.serialization.Model): :ivar transport_availability_details: List of transport availability details for given region. :vartype transport_availability_details: - list[~azure.mgmt.databox.models.TransportAvailabilityDetails] + list[~azure.mgmt.databox.v2020_04_01.models.TransportAvailabilityDetails] """ _validation = { @@ -3713,7 +3742,8 @@ class TransportPreferences(msrest.serialization.Model): :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". - :type preferred_shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2020_04_01.models.TransportShipmentTypes """ _validation = { @@ -3740,7 +3770,7 @@ class UnencryptedCredentials(msrest.serialization.Model): :ivar job_name: Name of the job. :vartype job_name: str :ivar job_secrets: Secrets related to this job. - :vartype job_secrets: ~azure.mgmt.databox.models.JobSecrets + :vartype job_secrets: ~azure.mgmt.databox.v2020_04_01.models.JobSecrets """ _validation = { @@ -3766,7 +3796,7 @@ class UnencryptedCredentialsList(msrest.serialization.Model): """List of unencrypted credentials for accessing device. :param value: List of unencrypted credentials. - :type value: list[~azure.mgmt.databox.models.UnencryptedCredentials] + :type value: list[~azure.mgmt.databox.v2020_04_01.models.UnencryptedCredentials] :param next_link: Link for the next set of unencrypted credentials. :type next_link: str """ @@ -3789,11 +3819,11 @@ class UpdateJobDetails(msrest.serialization.Model): """Job details for update. :param contact_details: Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_04_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :param key_encryption_key: Key encryption key for the job. - :type key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey + :type key_encryption_key: ~azure.mgmt.databox.v2020_04_01.models.KeyEncryptionKey """ _attribute_map = { @@ -3821,14 +3851,15 @@ class ValidateAddress(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2020_04_01.models.TransportPreferences """ _validation = { @@ -3862,10 +3893,11 @@ class ValidationResponse(msrest.serialization.Model): :ivar status: Overall validation status. Possible values include: "AllValidToProceed", "InputsRevisitRequired", "CertainInputValidationsSkipped". - :vartype status: str or ~azure.mgmt.databox.models.OverallValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.OverallValidationStatus :ivar individual_response_details: List of response details contain validationType and its response as key and value respectively. - :vartype individual_response_details: list[~azure.mgmt.databox.models.ValidationInputResponse] + :vartype individual_response_details: + list[~azure.mgmt.databox.v2020_04_01.models.ValidationInputResponse] """ _validation = { diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models_py3.py index 379d6ab993933..73ac7a82f185d 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models_py3.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -24,12 +24,13 @@ class AccountCredentialDetails(msrest.serialization.Model): :vartype account_name: str :ivar data_account_type: Type of the account. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :vartype data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :ivar account_connection_string: Connection string of the account endpoint to use the account as a storage endpoint on the device. :vartype account_connection_string: str :ivar share_credential_details: Per share level unencrypted access credentials. - :vartype share_credential_details: list[~azure.mgmt.databox.models.ShareCredentialDetails] + :vartype share_credential_details: + list[~azure.mgmt.databox.v2020_04_01.models.ShareCredentialDetails] """ _validation = { @@ -63,7 +64,7 @@ class AdditionalErrorInfo(msrest.serialization.Model): :param type: Additional error type. :type type: str :param info: Additional error info. - :type info: object + :type info: any """ _attribute_map = { @@ -75,7 +76,7 @@ def __init__( self, *, type: Optional[str] = None, - info: Optional[object] = None, + info: Optional[Any] = None, **kwargs ): super(AdditionalErrorInfo, self).__init__(**kwargs) @@ -92,14 +93,16 @@ class AddressValidationOutput(msrest.serialization.Model): Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2020_04_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2020_04_01.models.ShippingAddress] """ _validation = { @@ -140,9 +143,10 @@ class ValidationInputResponse(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError """ _validation = { @@ -179,14 +183,16 @@ class AddressValidationProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2020_04_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2020_04_01.models.ShippingAddress] """ _validation = { @@ -219,7 +225,7 @@ class ApiError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param error: Required. - :type error: ~azure.mgmt.databox.models.ErrorDetail + :type error: ~azure.mgmt.databox.v2020_04_01.models.ErrorDetail """ _validation = { @@ -312,7 +318,7 @@ class AvailableSkuRequest(msrest.serialization.Model): :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransferType :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str @@ -320,7 +326,7 @@ class AvailableSkuRequest(msrest.serialization.Model): https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str :param sku_names: Sku Names to filter for available skus. - :type sku_names: list[str or ~azure.mgmt.databox.models.SkuName] + :type sku_names: list[str or ~azure.mgmt.databox.v2020_04_01.models.SkuName] """ _validation = { @@ -358,7 +364,7 @@ class AvailableSkusResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of available skus. - :vartype value: list[~azure.mgmt.databox.models.SkuInformation] + :vartype value: list[~azure.mgmt.databox.v2020_04_01.models.SkuInformation] :param next_link: Link for the next set of skus. :type next_link: str """ @@ -484,9 +490,9 @@ class CloudError(msrest.serialization.Model): :param target: Cloud error target. :type target: str :ivar details: Cloud error details. - :vartype details: list[~azure.mgmt.databox.models.CloudError] + :vartype details: list[~azure.mgmt.databox.v2020_04_01.models.CloudError] :ivar additional_info: Cloud error additional info. - :vartype additional_info: list[~azure.mgmt.databox.models.AdditionalErrorInfo] + :vartype additional_info: list[~azure.mgmt.databox.v2020_04_01.models.AdditionalErrorInfo] """ _validation = { @@ -534,7 +540,8 @@ class ContactDetails(msrest.serialization.Model): :param email_list: Required. List of Email-ids to be notified about job progress. :type email_list: list[str] :param notification_preference: Notification preference for a job stage. - :type notification_preference: list[~azure.mgmt.databox.models.NotificationPreference] + :type notification_preference: + list[~azure.mgmt.databox.v2020_04_01.models.NotificationPreference] """ _validation = { @@ -582,7 +589,7 @@ class CopyLogDetails(msrest.serialization.Model): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator """ _validation = { @@ -615,10 +622,10 @@ class CopyProgress(msrest.serialization.Model): :vartype storage_account_name: str :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", "ExportFromAzure". - :vartype transfer_type: str or ~azure.mgmt.databox.models.TransferType + :vartype transfer_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransferType :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :vartype data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :ivar account_id: Id of the account where the data needs to be uploaded. :vartype account_id: str :ivar bytes_processed: To indicate bytes transferred. @@ -720,7 +727,8 @@ class ValidationRequest(msrest.serialization.Model): :type validation_category: str :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2020_04_01.models.ValidationInputRequest] """ _validation = { @@ -758,7 +766,8 @@ class CreateJobValidations(ValidationRequest): :type validation_category: str :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2020_04_01.models.ValidationInputRequest] """ _validation = { @@ -793,7 +802,8 @@ class ValidationInputRequest(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator """ _validation = { @@ -825,10 +835,11 @@ class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName """ _validation = { @@ -863,12 +874,13 @@ class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInpu server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar status: Create order limit validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.ValidationStatus """ _validation = { @@ -902,7 +914,7 @@ class DataAccountDetails(msrest.serialization.Model): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -945,7 +957,7 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar account_name: Account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -989,7 +1001,7 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar disk_serial_number: Disk Serial Number. :vartype disk_serial_number: str :ivar error_log_link: Link for copy error logs. @@ -1037,7 +1049,7 @@ class DataBoxDiskCopyProgress(msrest.serialization.Model): :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". - :vartype status: str or ~azure.mgmt.databox.models.CopyStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.CopyStatus """ _validation = { @@ -1076,35 +1088,35 @@ class JobDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_04_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_04_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_04_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_04_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_04_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_04_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :vartype key_encryption_key: ~azure.mgmt.databox.v2020_04_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int """ _validation = { @@ -1133,7 +1145,7 @@ class JobDetails(msrest.serialization.Model): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } _subtype_map = { @@ -1148,7 +1160,7 @@ def __init__( data_import_details: Optional[List["DataImportDetails"]] = None, data_export_details: Optional[List["DataExportDetails"]] = None, preferences: Optional["Preferences"] = None, - expected_data_size_in_terabytes: Optional[int] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, **kwargs ): super(JobDetails, self).__init__(**kwargs) @@ -1165,7 +1177,7 @@ def __init__( self.reverse_shipment_label_sas_key = None self.chain_of_custody_sas_key = None self.key_encryption_key = None - self.expected_data_size_in_terabytes = expected_data_size_in_terabytes + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes class DataBoxDiskJobDetails(JobDetails): @@ -1176,41 +1188,41 @@ class DataBoxDiskJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_04_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_04_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_04_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_04_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_04_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_04_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :vartype key_encryption_key: ~azure.mgmt.databox.v2020_04_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :param preferred_disks: User preference on what size disks are needed for the job. The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int. :type preferred_disks: dict[str, int] :ivar copy_progress: Copy progress per disk. - :vartype copy_progress: list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_04_01.models.DataBoxDiskCopyProgress] :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. :vartype disks_and_size_details: dict[str, int] @@ -1246,7 +1258,7 @@ class DataBoxDiskJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, @@ -1261,12 +1273,12 @@ def __init__( data_import_details: Optional[List["DataImportDetails"]] = None, data_export_details: Optional[List["DataExportDetails"]] = None, preferences: Optional["Preferences"] = None, - expected_data_size_in_terabytes: Optional[int] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, preferred_disks: Optional[Dict[str, int]] = None, passkey: Optional[str] = None, **kwargs ): - super(DataBoxDiskJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, expected_data_size_in_terabytes=expected_data_size_in_terabytes, **kwargs) + super(DataBoxDiskJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) self.job_details_type = 'DataBoxDisk' # type: str self.preferred_disks = preferred_disks self.copy_progress = None @@ -1286,11 +1298,11 @@ class JobSecrets(msrest.serialization.Model): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_04_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError """ _validation = { @@ -1328,13 +1340,13 @@ class DataBoxDiskJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_04_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar disk_secrets: Contains the list of secrets object for that device. - :vartype disk_secrets: list[~azure.mgmt.databox.models.DiskSecret] + :vartype disk_secrets: list[~azure.mgmt.databox.v2020_04_01.models.DiskSecret] :ivar pass_key: PassKey for the disk Job. :vartype pass_key: str :ivar is_passkey_user_defined: Whether passkey was provided by user. @@ -1379,7 +1391,7 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar account_name: Account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -1422,37 +1434,37 @@ class DataBoxHeavyJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_04_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_04_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_04_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_04_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_04_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_04_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :vartype key_encryption_key: ~azure.mgmt.databox.v2020_04_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar copy_progress: Copy progress per account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_04_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox Heavy. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -1489,7 +1501,7 @@ class DataBoxHeavyJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } @@ -1502,11 +1514,11 @@ def __init__( data_import_details: Optional[List["DataImportDetails"]] = None, data_export_details: Optional[List["DataExportDetails"]] = None, preferences: Optional["Preferences"] = None, - expected_data_size_in_terabytes: Optional[int] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, device_password: Optional[str] = None, **kwargs ): - super(DataBoxHeavyJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, expected_data_size_in_terabytes=expected_data_size_in_terabytes, **kwargs) + super(DataBoxHeavyJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) self.job_details_type = 'DataBoxHeavy' # type: str self.copy_progress = None self.device_password = device_password @@ -1521,13 +1533,13 @@ class DataBoxHeavyJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_04_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. - :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.models.DataBoxHeavySecret] + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2020_04_01.models.DataBoxHeavySecret] """ _validation = { @@ -1563,12 +1575,14 @@ class DataBoxHeavySecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2020_04_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2020_04_01.models.AccountCredentialDetails] """ _validation = { @@ -1607,37 +1621,37 @@ class DataBoxJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_04_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_04_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_04_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_04_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_04_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_04_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_04_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :vartype key_encryption_key: ~azure.mgmt.databox.v2020_04_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar copy_progress: Copy progress per storage account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_04_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be @@ -1674,7 +1688,7 @@ class DataBoxJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } @@ -1687,11 +1701,11 @@ def __init__( data_import_details: Optional[List["DataImportDetails"]] = None, data_export_details: Optional[List["DataExportDetails"]] = None, preferences: Optional["Preferences"] = None, - expected_data_size_in_terabytes: Optional[int] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, device_password: Optional[str] = None, **kwargs ): - super(DataBoxJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, expected_data_size_in_terabytes=expected_data_size_in_terabytes, **kwargs) + super(DataBoxJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) self.job_details_type = 'DataBox' # type: str self.copy_progress = None self.device_password = device_password @@ -1706,13 +1720,13 @@ class DataboxJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_04_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_04_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :param pod_secrets: Contains the list of secret objects for a job. - :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + :type pod_secrets: list[~azure.mgmt.databox.v2020_04_01.models.DataBoxSecret] """ _validation = { @@ -1752,7 +1766,7 @@ class ScheduleAvailabilityRequest(msrest.serialization.Model): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -1795,7 +1809,7 @@ class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -1832,12 +1846,14 @@ class DataBoxSecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2020_04_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2020_04_01.models.AccountCredentialDetails] """ _validation = { @@ -1874,12 +1890,12 @@ class DataExportDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param transfer_configuration: Required. Configuration for the data transfer. - :type transfer_configuration: ~azure.mgmt.databox.models.TransferConfiguration + :type transfer_configuration: ~azure.mgmt.databox.v2020_04_01.models.TransferConfiguration :param log_collection_level: Level of the logs to be collected. Possible values include: - "Error", "Verbose". - :type log_collection_level: str or ~azure.mgmt.databox.models.LogCollectionLevel + "Error", "Verbose". Default value: "Error". + :type log_collection_level: str or ~azure.mgmt.databox.v2020_04_01.models.LogCollectionLevel :param account_details: Required. Account details of the data to be transferred. - :type account_details: ~azure.mgmt.databox.models.DataAccountDetails + :type account_details: ~azure.mgmt.databox.v2020_04_01.models.DataAccountDetails """ _validation = { @@ -1898,7 +1914,7 @@ def __init__( *, transfer_configuration: "TransferConfiguration", account_details: "DataAccountDetails", - log_collection_level: Optional[Union[str, "LogCollectionLevel"]] = None, + log_collection_level: Optional[Union[str, "LogCollectionLevel"]] = "Error", **kwargs ): super(DataExportDetails, self).__init__(**kwargs) @@ -1913,7 +1929,7 @@ class DataImportDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param account_details: Required. Account details of the data to be transferred. - :type account_details: ~azure.mgmt.databox.models.DataAccountDetails + :type account_details: ~azure.mgmt.databox.v2020_04_01.models.DataAccountDetails """ _validation = { @@ -1973,17 +1989,18 @@ class DataTransferDetailsValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :param data_export_details: List of DataTransfer details to be used to export data from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_04_01.models.DataExportDetails] :param data_import_details: List of DataTransfer details to be used to import data to azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_04_01.models.DataImportDetails] :param device_type: Required. Device type. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransferType """ _validation = { @@ -2028,12 +2045,13 @@ class DataTransferDetailsValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar status: Data transfer details validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.ValidationStatus """ _validation = { @@ -2067,8 +2085,8 @@ class DcAccessSecurityCode(msrest.serialization.Model): """ _attribute_map = { - 'reverse_dc_access_code': {'key': 'reverseDcAccessCode', 'type': 'str'}, - 'forward_dc_access_code': {'key': 'forwardDcAccessCode', 'type': 'str'}, + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, } def __init__( @@ -2126,38 +2144,38 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str - :param expected_data_size_in_terabytes: Required. The expected size of the data, which needs to - be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int """ _validation = { 'storage_location': {'required': True}, 'sku_name': {'required': True}, - 'expected_data_size_in_terabytes': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, } _attribute_map = { 'storage_location': {'key': 'storageLocation', 'type': 'str'}, 'sku_name': {'key': 'skuName', 'type': 'str'}, 'country': {'key': 'country', 'type': 'str'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } def __init__( self, *, storage_location: str, - expected_data_size_in_terabytes: int, + expected_data_size_in_tera_bytes: int, country: Optional[str] = None, **kwargs ): super(DiskScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) self.sku_name = 'DataBoxDisk' # type: str - self.expected_data_size_in_terabytes = expected_data_size_in_terabytes + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes class DiskSecret(msrest.serialization.Model): @@ -2201,7 +2219,7 @@ class ErrorDetail(msrest.serialization.Model): :param message: Required. :type message: str :param details: - :type details: list[~azure.mgmt.databox.models.Details] + :type details: list[~azure.mgmt.databox.v2020_04_01.models.Details] :param target: :type target: str """ @@ -2241,7 +2259,7 @@ class FilterFileDetails(msrest.serialization.Model): :param filter_file_type: Required. Type of the filter file. Possible values include: "AzureBlob", "AzureFile". - :type filter_file_type: str or ~azure.mgmt.databox.models.FilterFileType + :type filter_file_type: str or ~azure.mgmt.databox.v2020_04_01.models.FilterFileType :param filter_file_path: Required. Path of the file that contains the details of all items to transfer. :type filter_file_path: str @@ -2279,7 +2297,7 @@ class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -2341,9 +2359,9 @@ class Resource(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2020_04_01.models.Sku :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_04_01.models.ResourceIdentity """ _validation = { @@ -2390,9 +2408,9 @@ class JobResource(Resource): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2020_04_01.models.Sku :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_04_01.models.ResourceIdentity :ivar name: Name of the object. :vartype name: str :ivar id: Id of the object. @@ -2401,7 +2419,7 @@ class JobResource(Resource): :vartype type: str :param transfer_type: Required. Type of the data transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransferType :ivar is_cancellable: Describes whether the job is cancellable or not. :vartype is_cancellable: bool :ivar is_deletable: Describes whether the job is deletable or not. @@ -2415,20 +2433,20 @@ class JobResource(Resource): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype status: str or ~azure.mgmt.databox.models.StageName + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.StageName :ivar start_time: Time at which the job was started in UTC ISO 8601 format. :vartype start_time: ~datetime.datetime :ivar error: Top level error for the job. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :param details: Details of a job run. This field will only be sent for expand details filter. - :type details: ~azure.mgmt.databox.models.JobDetails + :type details: ~azure.mgmt.databox.v2020_04_01.models.JobDetails :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", - "Scheduled". - :type delivery_type: str or ~azure.mgmt.databox.models.JobDeliveryType + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2020_04_01.models.JobDeliveryType :param delivery_info: Delivery Info of Job. - :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo + :type delivery_info: ~azure.mgmt.databox.v2020_04_01.models.JobDeliveryInfo :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. :vartype is_cancellable_without_fee: bool """ @@ -2483,7 +2501,7 @@ def __init__( tags: Optional[Dict[str, str]] = None, identity: Optional["ResourceIdentity"] = None, details: Optional["JobDetails"] = None, - delivery_type: Optional[Union[str, "JobDeliveryType"]] = None, + delivery_type: Optional[Union[str, "JobDeliveryType"]] = "NonScheduled", delivery_info: Optional["JobDeliveryInfo"] = None, **kwargs ): @@ -2510,7 +2528,7 @@ class JobResourceList(msrest.serialization.Model): """Job Resource Collection. :param value: List of job resources. - :type value: list[~azure.mgmt.databox.models.JobResource] + :type value: list[~azure.mgmt.databox.v2020_04_01.models.JobResource] :param next_link: Link for the next set of job resources. :type next_link: str """ @@ -2539,9 +2557,9 @@ class JobResourceUpdateParameter(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_04_01.models.ResourceIdentity :param details: Details of a job to be updated. - :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :type details: ~azure.mgmt.databox.v2020_04_01.models.UpdateJobDetails """ _attribute_map = { @@ -2574,17 +2592,17 @@ class JobStages(msrest.serialization.Model): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype stage_name: str or ~azure.mgmt.databox.models.StageName + :vartype stage_name: str or ~azure.mgmt.databox.v2020_04_01.models.StageName :ivar display_name: Display name of the job stage. :vartype display_name: str :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors", "WaitingForCustomerAction", "SucceededWithWarnings". - :vartype stage_status: str or ~azure.mgmt.databox.models.StageStatus + :vartype stage_status: str or ~azure.mgmt.databox.v2020_04_01.models.StageStatus :ivar stage_time: Time for the job stage in UTC ISO 8601 format. :vartype stage_time: ~datetime.datetime :ivar job_stage_details: Job Stage Details. - :vartype job_stage_details: object + :vartype job_stage_details: any """ _validation = { @@ -2621,8 +2639,8 @@ class KeyEncryptionKey(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param kek_type: Required. Type of encryption key used for key encryption. Possible values - include: "MicrosoftManaged", "CustomerManaged". - :type kek_type: str or ~azure.mgmt.databox.models.KekType + include: "MicrosoftManaged", "CustomerManaged". Default value: "MicrosoftManaged". + :type kek_type: str or ~azure.mgmt.databox.v2020_04_01.models.KekType :param kek_url: Key encryption key. It is required in case of Customer managed KekType. :type kek_url: str :param kek_vault_resource_id: Kek vault resource id. It is required in case of Customer managed @@ -2643,7 +2661,7 @@ class KeyEncryptionKey(msrest.serialization.Model): def __init__( self, *, - kek_type: Union[str, "KekType"], + kek_type: Union[str, "KekType"] = "MicrosoftManaged", kek_url: Optional[str] = None, kek_vault_resource_id: Optional[str] = None, **kwargs @@ -2661,7 +2679,7 @@ class ManagedDiskDetails(DataAccountDetails): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -2710,7 +2728,7 @@ class NotificationPreference(msrest.serialization.Model): :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". - :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName + :type stage_name: str or ~azure.mgmt.databox.v2020_04_01.models.NotificationStageName :param send_notification: Required. Notification is required or not. :type send_notification: bool """ @@ -2729,7 +2747,7 @@ def __init__( self, *, stage_name: Union[str, "NotificationStageName"], - send_notification: bool, + send_notification: bool = True, **kwargs ): super(NotificationPreference, self).__init__(**kwargs) @@ -2746,9 +2764,9 @@ class Operation(msrest.serialization.Model): {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. :vartype name: str :ivar display: Operation display values. - :vartype display: ~azure.mgmt.databox.models.OperationDisplay + :vartype display: ~azure.mgmt.databox.v2020_04_01.models.OperationDisplay :ivar properties: Operation properties. - :vartype properties: object + :vartype properties: any :ivar origin: Origin of the operation. Can be : user|system|user,system. :vartype origin: str :param is_data_action: Indicates whether the operation is a data action. @@ -2826,7 +2844,7 @@ class OperationList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of operations. - :vartype value: list[~azure.mgmt.databox.models.Operation] + :vartype value: list[~azure.mgmt.databox.v2020_04_01.models.Operation] :param next_link: Link for the next set of operations. :type next_link: str """ @@ -2892,7 +2910,7 @@ class Preferences(msrest.serialization.Model): :param preferred_data_center_region: Preferred data center region. :type preferred_data_center_region: list[str] :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2020_04_01.models.TransportPreferences """ _attribute_map = { @@ -2921,12 +2939,13 @@ class PreferencesValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :param preference: Preference of transport and data center. - :type preference: ~azure.mgmt.databox.models.Preferences + :type preference: ~azure.mgmt.databox.v2020_04_01.models.Preferences :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName """ _validation = { @@ -2964,12 +2983,13 @@ class PreferencesValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar status: Validation status of requested data center and transport. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.ValidationStatus """ _validation = { @@ -2998,10 +3018,12 @@ class RegionConfigurationRequest(msrest.serialization.Model): :param schedule_availability_request: Request body to get the availability for scheduling orders. - :type schedule_availability_request: ~azure.mgmt.databox.models.ScheduleAvailabilityRequest + :type schedule_availability_request: + ~azure.mgmt.databox.v2020_04_01.models.ScheduleAvailabilityRequest :param transport_availability_request: Request body to get the transport availability for given sku. - :type transport_availability_request: ~azure.mgmt.databox.models.TransportAvailabilityRequest + :type transport_availability_request: + ~azure.mgmt.databox.v2020_04_01.models.TransportAvailabilityRequest """ _attribute_map = { @@ -3028,10 +3050,10 @@ class RegionConfigurationResponse(msrest.serialization.Model): :ivar schedule_availability_response: Schedule availability for given sku in a region. :vartype schedule_availability_response: - ~azure.mgmt.databox.models.ScheduleAvailabilityResponse + ~azure.mgmt.databox.v2020_04_01.models.ScheduleAvailabilityResponse :ivar transport_availability_response: Transport options available for given sku in a region. :vartype transport_availability_response: - ~azure.mgmt.databox.models.TransportAvailabilityResponse + ~azure.mgmt.databox.v2020_04_01.models.TransportAvailabilityResponse """ _validation = { @@ -3123,13 +3145,14 @@ class ShareCredentialDetails(msrest.serialization.Model): :vartype share_name: str :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". - :vartype share_type: str or ~azure.mgmt.databox.models.ShareDestinationFormatType + :vartype share_type: str or ~azure.mgmt.databox.v2020_04_01.models.ShareDestinationFormatType :ivar user_name: User name for the share. :vartype user_name: str :ivar password: Password for the share. :vartype password: str :ivar supported_access_protocols: Access protocols supported on the device. - :vartype supported_access_protocols: list[str or ~azure.mgmt.databox.models.AccessProtocol] + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2020_04_01.models.AccessProtocol] """ _validation = { @@ -3256,8 +3279,8 @@ class ShippingAddress(msrest.serialization.Model): :param company_name: Name of the company. :type company_name: str :param address_type: Type of address. Possible values include: "None", "Residential", - "Commercial". - :type address_type: str or ~azure.mgmt.databox.models.AddressType + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2020_04_01.models.AddressType """ _validation = { @@ -3291,7 +3314,7 @@ def __init__( state_or_province: Optional[str] = None, zip_extended_code: Optional[str] = None, company_name: Optional[str] = None, - address_type: Optional[Union[str, "AddressType"]] = None, + address_type: Optional[Union[str, "AddressType"]] = "None", **kwargs ): super(ShippingAddress, self).__init__(**kwargs) @@ -3314,7 +3337,7 @@ class Sku(msrest.serialization.Model): :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type name: str or ~azure.mgmt.databox.models.SkuName + :type name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param display_name: The display name of the sku. :type display_name: str :param family: The sku family. @@ -3354,13 +3377,14 @@ class SkuAvailabilityValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransferType :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str @@ -3413,12 +3437,13 @@ class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.ValidationStatus """ _validation = { @@ -3515,21 +3540,21 @@ class SkuInformation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.databox.models.Sku + :vartype sku: ~azure.mgmt.databox.v2020_04_01.models.Sku :ivar enabled: The sku is enabled or not. :vartype enabled: bool :ivar data_location_to_service_location_map: The map of data location to service location. :vartype data_location_to_service_location_map: - list[~azure.mgmt.databox.models.DataLocationToServiceLocationMap] + list[~azure.mgmt.databox.v2020_04_01.models.DataLocationToServiceLocationMap] :ivar capacity: Capacity of the Sku. - :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :vartype capacity: ~azure.mgmt.databox.v2020_04_01.models.SkuCapacity :ivar costs: Cost of the Sku. - :vartype costs: list[~azure.mgmt.databox.models.SkuCost] + :vartype costs: list[~azure.mgmt.databox.v2020_04_01.models.SkuCost] :ivar api_versions: Api versions that support this Sku. :vartype api_versions: list[str] :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". - :vartype disabled_reason: str or ~azure.mgmt.databox.models.SkuDisabledReason + :vartype disabled_reason: str or ~azure.mgmt.databox.v2020_04_01.models.SkuDisabledReason :ivar disabled_reason_message: Message for why the Sku is disabled. :vartype disabled_reason_message: str :ivar required_feature: Required feature to access the sku. @@ -3583,7 +3608,7 @@ class StorageAccountDetails(DataAccountDetails): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -3627,7 +3652,8 @@ class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator """ _validation = { @@ -3657,12 +3683,13 @@ class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInp server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_04_01.models.CloudError :ivar status: Validation status of subscription permission to create job. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.ValidationStatus """ _validation = { @@ -3693,7 +3720,7 @@ class TransferAllDetails(msrest.serialization.Model): :param data_account_type: Required. Type of the account of data. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :param transfer_all_blobs: To indicate if all Azure blobs have to be transferred. :type transfer_all_blobs: bool :param transfer_all_files: To indicate if all Azure Files have to be transferred. @@ -3731,14 +3758,16 @@ class TransferConfiguration(msrest.serialization.Model): :param transfer_configuration_type: Required. Type of the configuration for transfer. Possible values include: "TransferAll", "TransferUsingFilter". - :type transfer_configuration_type: str or ~azure.mgmt.databox.models.TransferConfigurationType + :type transfer_configuration_type: str or + ~azure.mgmt.databox.v2020_04_01.models.TransferConfigurationType :param transfer_filter_details: Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. :type transfer_filter_details: - ~azure.mgmt.databox.models.TransferConfigurationTransferFilterDetails + ~azure.mgmt.databox.v2020_04_01.models.TransferConfigurationTransferFilterDetails :param transfer_all_details: Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. - :type transfer_all_details: ~azure.mgmt.databox.models.TransferConfigurationTransferAllDetails + :type transfer_all_details: + ~azure.mgmt.databox.v2020_04_01.models.TransferConfigurationTransferAllDetails """ _validation = { @@ -3769,7 +3798,7 @@ class TransferConfigurationTransferAllDetails(msrest.serialization.Model): """Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. :param include: Details to transfer all data. - :type include: ~azure.mgmt.databox.models.TransferAllDetails + :type include: ~azure.mgmt.databox.v2020_04_01.models.TransferAllDetails """ _attribute_map = { @@ -3790,7 +3819,7 @@ class TransferConfigurationTransferFilterDetails(msrest.serialization.Model): """Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. :param include: Details of the filtering the transfer of data. - :type include: ~azure.mgmt.databox.models.TransferFilterDetails + :type include: ~azure.mgmt.databox.v2020_04_01.models.TransferFilterDetails """ _attribute_map = { @@ -3814,13 +3843,13 @@ class TransferFilterDetails(msrest.serialization.Model): :param data_account_type: Required. Type of the account of data. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_04_01.models.DataAccountType :param blob_filter_details: Filter details to transfer blobs. - :type blob_filter_details: ~azure.mgmt.databox.models.BlobFilterDetails + :type blob_filter_details: ~azure.mgmt.databox.v2020_04_01.models.BlobFilterDetails :param azure_file_filter_details: Filter details to transfer Azure files. - :type azure_file_filter_details: ~azure.mgmt.databox.models.AzureFileFilterDetails + :type azure_file_filter_details: ~azure.mgmt.databox.v2020_04_01.models.AzureFileFilterDetails :param filter_file_details: Details of the filter files to be used for data transfer. - :type filter_file_details: list[~azure.mgmt.databox.models.FilterFileDetails] + :type filter_file_details: list[~azure.mgmt.databox.v2020_04_01.models.FilterFileDetails] """ _validation = { @@ -3857,7 +3886,7 @@ class TransportAvailabilityDetails(msrest.serialization.Model): :ivar shipment_type: Transport Shipment Type supported for given region. Possible values include: "CustomerManaged", "MicrosoftManaged". - :vartype shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :vartype shipment_type: str or ~azure.mgmt.databox.v2020_04_01.models.TransportShipmentTypes """ _validation = { @@ -3881,7 +3910,7 @@ class TransportAvailabilityRequest(msrest.serialization.Model): :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName """ _attribute_map = { @@ -3905,7 +3934,7 @@ class TransportAvailabilityResponse(msrest.serialization.Model): :ivar transport_availability_details: List of transport availability details for given region. :vartype transport_availability_details: - list[~azure.mgmt.databox.models.TransportAvailabilityDetails] + list[~azure.mgmt.databox.v2020_04_01.models.TransportAvailabilityDetails] """ _validation = { @@ -3931,7 +3960,8 @@ class TransportPreferences(msrest.serialization.Model): :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". - :type preferred_shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2020_04_01.models.TransportShipmentTypes """ _validation = { @@ -3960,7 +3990,7 @@ class UnencryptedCredentials(msrest.serialization.Model): :ivar job_name: Name of the job. :vartype job_name: str :ivar job_secrets: Secrets related to this job. - :vartype job_secrets: ~azure.mgmt.databox.models.JobSecrets + :vartype job_secrets: ~azure.mgmt.databox.v2020_04_01.models.JobSecrets """ _validation = { @@ -3986,7 +4016,7 @@ class UnencryptedCredentialsList(msrest.serialization.Model): """List of unencrypted credentials for accessing device. :param value: List of unencrypted credentials. - :type value: list[~azure.mgmt.databox.models.UnencryptedCredentials] + :type value: list[~azure.mgmt.databox.v2020_04_01.models.UnencryptedCredentials] :param next_link: Link for the next set of unencrypted credentials. :type next_link: str """ @@ -4012,11 +4042,11 @@ class UpdateJobDetails(msrest.serialization.Model): """Job details for update. :param contact_details: Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_04_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :param key_encryption_key: Key encryption key for the job. - :type key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey + :type key_encryption_key: ~azure.mgmt.databox.v2020_04_01.models.KeyEncryptionKey """ _attribute_map = { @@ -4048,14 +4078,15 @@ class ValidateAddress(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_04_01.models.ValidationInputDiscriminator :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_04_01.models.ShippingAddress :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_04_01.models.SkuName :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2020_04_01.models.TransportPreferences """ _validation = { @@ -4093,10 +4124,11 @@ class ValidationResponse(msrest.serialization.Model): :ivar status: Overall validation status. Possible values include: "AllValidToProceed", "InputsRevisitRequired", "CertainInputValidationsSkipped". - :vartype status: str or ~azure.mgmt.databox.models.OverallValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_04_01.models.OverallValidationStatus :ivar individual_response_details: List of response details contain validationType and its response as key and value respectively. - :vartype individual_response_details: list[~azure.mgmt.databox.models.ValidationInputResponse] + :vartype individual_response_details: + list[~azure.mgmt.databox.v2020_04_01.models.ValidationInputResponse] """ _validation = { diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_jobs_operations.py index f6529e974c09a..d8fca3ccf2c6d 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_jobs_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_jobs_operations.py @@ -32,7 +32,7 @@ class JobsOperations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2020_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2020_04_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -110,7 +110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -137,7 +137,7 @@ def list_by_resource_group( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2020_04_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -188,7 +188,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -219,7 +219,7 @@ def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.JobResource + :rtype: ~azure.mgmt.databox.v2020_04_01.models.JobResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] @@ -255,7 +255,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobResource', pipeline_response) @@ -310,7 +310,7 @@ def _create_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -340,15 +340,15 @@ def begin_create( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource: Job details from request body. - :type job_resource: ~azure.mgmt.databox.models.JobResource + :type job_resource: ~azure.mgmt.databox.v2020_04_01.models.JobResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2020_04_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -435,7 +435,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -459,8 +459,8 @@ def begin_delete( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -556,7 +556,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -586,18 +586,18 @@ def begin_update( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource_update_parameter: Job update parameters from request body. - :type job_resource_update_parameter: ~azure.mgmt.databox.models.JobResourceUpdateParameter + :type job_resource_update_parameter: ~azure.mgmt.databox.v2020_04_01.models.JobResourceUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2020_04_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -663,10 +663,10 @@ def book_shipment_pick_up( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param shipment_pick_up_request: Details of shipment pick up request. - :type shipment_pick_up_request: ~azure.mgmt.databox.models.ShipmentPickUpRequest + :type shipment_pick_up_request: ~azure.mgmt.databox.v2020_04_01.models.ShipmentPickUpRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ShipmentPickUpResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse + :rtype: ~azure.mgmt.databox.v2020_04_01.models.ShipmentPickUpResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] @@ -705,7 +705,7 @@ def book_shipment_pick_up( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) @@ -732,7 +732,7 @@ def cancel( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param cancellation_reason: Reason for cancellation. - :type cancellation_reason: ~azure.mgmt.databox.models.CancellationReason + :type cancellation_reason: ~azure.mgmt.databox.v2020_04_01.models.CancellationReason :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 @@ -774,7 +774,7 @@ def cancel( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -798,7 +798,7 @@ def list_credentials( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.UnencryptedCredentialsList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2020_04_01.models.UnencryptedCredentialsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] @@ -848,7 +848,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_operations.py index 85d48f01c1172..945489f974bfa 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_operations.py @@ -30,7 +30,7 @@ class Operations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2020_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.OperationList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2020_04_01.models.OperationList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_service_operations.py index 409bd7a9a99d8..1493b55ceabbb 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_service_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_service_operations.py @@ -30,7 +30,7 @@ class ServiceOperations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2020_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -61,10 +61,10 @@ def list_available_skus_by_resource_group( :param location: The location of the resource. :type location: str :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :type available_sku_request: ~azure.mgmt.databox.v2020_04_01.models.AvailableSkuRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2020_04_01.models.AvailableSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] @@ -122,7 +122,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -146,10 +146,10 @@ def validate_address( :param location: The location of the resource. :type location: str :param validate_address: Shipping address of the customer. - :type validate_address: ~azure.mgmt.databox.models.ValidateAddress + :type validate_address: ~azure.mgmt.databox.v2020_04_01.models.ValidateAddress :keyword callable cls: A custom type or function that will be passed the direct response :return: AddressValidationOutput, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.AddressValidationOutput + :rtype: ~azure.mgmt.databox.v2020_04_01.models.AddressValidationOutput :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] @@ -187,7 +187,7 @@ def validate_address( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressValidationOutput', pipeline_response) @@ -213,10 +213,10 @@ def validate_inputs_by_resource_group( :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2020_04_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2020_04_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -255,7 +255,7 @@ def validate_inputs_by_resource_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidationResponse', pipeline_response) @@ -278,10 +278,10 @@ def validate_inputs( :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2020_04_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2020_04_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -319,7 +319,7 @@ def validate_inputs( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidationResponse', pipeline_response) @@ -343,10 +343,10 @@ def region_configuration( :param location: The location of the resource. :type location: str :param region_configuration_request: Request body to get the configuration for the region. - :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :type region_configuration_request: ~azure.mgmt.databox.v2020_04_01.models.RegionConfigurationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: RegionConfigurationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :rtype: ~azure.mgmt.databox.v2020_04_01.models.RegionConfigurationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] @@ -384,7 +384,7 @@ def region_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) @@ -412,10 +412,10 @@ def region_configuration_by_resource_group( :type location: str :param region_configuration_request: Request body to get the configuration for the region at resource group level. - :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :type region_configuration_request: ~azure.mgmt.databox.v2020_04_01.models.RegionConfigurationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: RegionConfigurationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :rtype: ~azure.mgmt.databox.v2020_04_01.models.RegionConfigurationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] @@ -454,7 +454,7 @@ def region_configuration_by_resource_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_data_box_management_client.py index e696cb06a7805..55a8ecd53d017 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_data_box_management_client.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_data_box_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import DataBoxManagementClientConfiguration from .operations import Operations @@ -28,11 +29,11 @@ class DataBoxManagementClient(object): """The DataBox Client. :ivar operations: Operations operations - :vartype operations: azure.mgmt.databox.operations.Operations + :vartype operations: azure.mgmt.databox.v2020_11_01.operations.Operations :ivar jobs: JobsOperations operations - :vartype jobs: azure.mgmt.databox.operations.JobsOperations + :vartype jobs: azure.mgmt.databox.v2020_11_01.operations.JobsOperations :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.databox.operations.ServiceOperations + :vartype service: azure.mgmt.databox.v2020_11_01.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The Subscription Id. @@ -66,6 +67,24 @@ def __init__( self.service = ServiceOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_metadata.json b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_metadata.json index add87dd6b2877..6ff042428959f 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_metadata.json +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The Subscription Id.", "docstring_type": "str", "required": true @@ -42,22 +44,62 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "operations": "Operations", "jobs": "JobsOperations", "service": "ServiceOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_version.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_version.py index eae7c95b6fbdb..e5754a47ce68f 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_version.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/_data_box_management_client.py index b192ff7cd7714..04e63345370b2 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/_data_box_management_client.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/_data_box_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -26,11 +27,11 @@ class DataBoxManagementClient(object): """The DataBox Client. :ivar operations: Operations operations - :vartype operations: azure.mgmt.databox.aio.operations.Operations + :vartype operations: azure.mgmt.databox.v2020_11_01.aio.operations.Operations :ivar jobs: JobsOperations operations - :vartype jobs: azure.mgmt.databox.aio.operations.JobsOperations + :vartype jobs: azure.mgmt.databox.v2020_11_01.aio.operations.JobsOperations :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.databox.aio.operations.ServiceOperations + :vartype service: azure.mgmt.databox.v2020_11_01.aio.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The Subscription Id. @@ -63,6 +64,23 @@ def __init__( self.service = ServiceOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_jobs_operations.py index 37298e86749da..1c0c70be6f4d0 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_jobs_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_jobs_operations.py @@ -28,7 +28,7 @@ class JobsOperations: 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.databox.models + :type models: ~azure.mgmt.databox.v2020_11_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobResourceList"]: """Lists all the jobs available under the subscription. @@ -55,7 +55,7 @@ def list( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2020_11_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -105,7 +105,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -120,7 +120,7 @@ def list_by_resource_group( self, resource_group_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.JobResourceList"]: """Lists all the jobs available under the given resource group. @@ -131,7 +131,7 @@ def list_by_resource_group( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2020_11_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -182,7 +182,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -198,7 +198,7 @@ async def get( resource_group_name: str, job_name: str, expand: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.JobResource": """Gets information about the specified job. @@ -212,7 +212,7 @@ async def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.JobResource + :rtype: ~azure.mgmt.databox.v2020_11_01.models.JobResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] @@ -248,7 +248,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobResource', pipeline_response) @@ -264,7 +264,7 @@ async def _create_initial( resource_group_name: str, job_name: str, job_resource: "_models.JobResource", - **kwargs + **kwargs: Any ) -> Optional["_models.JobResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] error_map = { @@ -302,7 +302,7 @@ async def _create_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -320,7 +320,7 @@ async def begin_create( resource_group_name: str, job_name: str, job_resource: "_models.JobResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.JobResource"]: """Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API. @@ -331,15 +331,15 @@ async def begin_create( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource: Job details from request body. - :type job_resource: ~azure.mgmt.databox.models.JobResource + :type job_resource: ~azure.mgmt.databox.v2020_11_01.models.JobResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2020_11_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -392,7 +392,7 @@ async def _delete_initial( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -425,7 +425,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -437,7 +437,7 @@ async def begin_delete( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a job. @@ -448,8 +448,8 @@ async def begin_delete( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -504,7 +504,7 @@ async def _update_initial( job_name: str, job_resource_update_parameter: "_models.JobResourceUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.JobResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] error_map = { @@ -544,7 +544,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -563,7 +563,7 @@ async def begin_update( job_name: str, job_resource_update_parameter: "_models.JobResourceUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.JobResource"]: """Updates the properties of an existing job. @@ -573,18 +573,18 @@ async def begin_update( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource_update_parameter: Job update parameters from request body. - :type job_resource_update_parameter: ~azure.mgmt.databox.models.JobResourceUpdateParameter + :type job_resource_update_parameter: ~azure.mgmt.databox.v2020_11_01.models.JobResourceUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2020_11_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -639,7 +639,7 @@ async def book_shipment_pick_up( resource_group_name: str, job_name: str, shipment_pick_up_request: "_models.ShipmentPickUpRequest", - **kwargs + **kwargs: Any ) -> "_models.ShipmentPickUpResponse": """Book shipment pick up. @@ -649,10 +649,10 @@ async def book_shipment_pick_up( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param shipment_pick_up_request: Details of shipment pick up request. - :type shipment_pick_up_request: ~azure.mgmt.databox.models.ShipmentPickUpRequest + :type shipment_pick_up_request: ~azure.mgmt.databox.v2020_11_01.models.ShipmentPickUpRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ShipmentPickUpResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse + :rtype: ~azure.mgmt.databox.v2020_11_01.models.ShipmentPickUpResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] @@ -691,7 +691,7 @@ async def book_shipment_pick_up( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) @@ -707,7 +707,7 @@ async def cancel( resource_group_name: str, job_name: str, cancellation_reason: "_models.CancellationReason", - **kwargs + **kwargs: Any ) -> None: """CancelJob. @@ -717,7 +717,7 @@ async def cancel( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param cancellation_reason: Reason for cancellation. - :type cancellation_reason: ~azure.mgmt.databox.models.CancellationReason + :type cancellation_reason: ~azure.mgmt.databox.v2020_11_01.models.CancellationReason :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 @@ -759,7 +759,7 @@ async def cancel( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -771,7 +771,7 @@ def list_credentials( self, resource_group_name: str, job_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UnencryptedCredentialsList"]: """This method gets the unencrypted secrets related to the job. @@ -782,7 +782,7 @@ def list_credentials( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.UnencryptedCredentialsList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2020_11_01.models.UnencryptedCredentialsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] @@ -832,7 +832,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_operations.py index e59616bb0771a..52b821f0cad3b 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_operations.py @@ -26,7 +26,7 @@ class Operations: 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.databox.models + :type models: ~azure.mgmt.databox.v2020_11_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,13 +43,13 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """This method gets all the operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.OperationList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2020_11_01.models.OperationList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_service_operations.py index f15eb76d17f1c..d3035baabd130 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_service_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/aio/operations/_service_operations.py @@ -26,7 +26,7 @@ class ServiceOperations: 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.databox.models + :type models: ~azure.mgmt.databox.v2020_11_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def list_available_skus_by_resource_group( resource_group_name: str, location: str, available_sku_request: "_models.AvailableSkuRequest", - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AvailableSkusResult"]: """This method provides the list of available skus for the given subscription, resource group and location. @@ -56,10 +56,10 @@ def list_available_skus_by_resource_group( :param location: The location of the resource. :type location: str :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :type available_sku_request: ~azure.mgmt.databox.v2020_11_01.models.AvailableSkuRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2020_11_01.models.AvailableSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] @@ -117,7 +117,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -132,7 +132,7 @@ async def validate_address( self, location: str, validate_address: "_models.ValidateAddress", - **kwargs + **kwargs: Any ) -> "_models.AddressValidationOutput": """[DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and provide alternate addresses if any. @@ -140,10 +140,10 @@ async def validate_address( :param location: The location of the resource. :type location: str :param validate_address: Shipping address of the customer. - :type validate_address: ~azure.mgmt.databox.models.ValidateAddress + :type validate_address: ~azure.mgmt.databox.v2020_11_01.models.ValidateAddress :keyword callable cls: A custom type or function that will be passed the direct response :return: AddressValidationOutput, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.AddressValidationOutput + :rtype: ~azure.mgmt.databox.v2020_11_01.models.AddressValidationOutput :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] @@ -181,7 +181,7 @@ async def validate_address( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressValidationOutput', pipeline_response) @@ -197,7 +197,7 @@ async def validate_inputs_by_resource_group( resource_group_name: str, location: str, validation_request: "_models.ValidationRequest", - **kwargs + **kwargs: Any ) -> "_models.ValidationResponse": """This method does all necessary pre-job creation validation under resource group. @@ -206,10 +206,10 @@ async def validate_inputs_by_resource_group( :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2020_11_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2020_11_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -248,7 +248,7 @@ async def validate_inputs_by_resource_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidationResponse', pipeline_response) @@ -263,17 +263,17 @@ async def validate_inputs( self, location: str, validation_request: "_models.ValidationRequest", - **kwargs + **kwargs: Any ) -> "_models.ValidationResponse": """This method does all necessary pre-job creation validation under subscription. :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2020_11_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2020_11_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -311,7 +311,7 @@ async def validate_inputs( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidationResponse', pipeline_response) @@ -326,7 +326,7 @@ async def region_configuration( self, location: str, region_configuration_request: "_models.RegionConfigurationRequest", - **kwargs + **kwargs: Any ) -> "_models.RegionConfigurationResponse": """This API provides configuration details specific to given region/location at Subscription level. @@ -334,10 +334,10 @@ async def region_configuration( :param location: The location of the resource. :type location: str :param region_configuration_request: Request body to get the configuration for the region. - :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :type region_configuration_request: ~azure.mgmt.databox.v2020_11_01.models.RegionConfigurationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: RegionConfigurationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :rtype: ~azure.mgmt.databox.v2020_11_01.models.RegionConfigurationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] @@ -375,7 +375,7 @@ async def region_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) @@ -391,7 +391,7 @@ async def region_configuration_by_resource_group( resource_group_name: str, location: str, region_configuration_request: "_models.RegionConfigurationRequest", - **kwargs + **kwargs: Any ) -> "_models.RegionConfigurationResponse": """This API provides configuration details specific to given region/location at Resource group level. @@ -402,10 +402,10 @@ async def region_configuration_by_resource_group( :type location: str :param region_configuration_request: Request body to get the configuration for the region at resource group level. - :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :type region_configuration_request: ~azure.mgmt.databox.v2020_11_01.models.RegionConfigurationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: RegionConfigurationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :rtype: ~azure.mgmt.databox.v2020_11_01.models.RegionConfigurationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] @@ -444,7 +444,7 @@ async def region_configuration_by_resource_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/__init__.py index 14f8f8c755cbf..39be23e44a00b 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/__init__.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/__init__.py @@ -90,6 +90,7 @@ from ._models_py3 import StorageAccountDetails from ._models_py3 import SubscriptionIsAllowedToCreateJobValidationRequest from ._models_py3 import SubscriptionIsAllowedToCreateJobValidationResponseProperties + from ._models_py3 import SystemData from ._models_py3 import TransferAllDetails from ._models_py3 import TransferConfiguration from ._models_py3 import TransferConfigurationTransferAllDetails @@ -193,6 +194,7 @@ from ._models import StorageAccountDetails # type: ignore from ._models import SubscriptionIsAllowedToCreateJobValidationRequest # type: ignore from ._models import SubscriptionIsAllowedToCreateJobValidationResponseProperties # type: ignore + from ._models import SystemData # type: ignore from ._models import TransferAllDetails # type: ignore from ._models import TransferConfiguration # type: ignore from ._models import TransferConfigurationTransferAllDetails # type: ignore @@ -323,6 +325,7 @@ 'StorageAccountDetails', 'SubscriptionIsAllowedToCreateJobValidationRequest', 'SubscriptionIsAllowedToCreateJobValidationResponseProperties', + 'SystemData', 'TransferAllDetails', 'TransferConfiguration', 'TransferConfigurationTransferAllDetails', diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_data_box_management_client_enums.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_data_box_management_client_enums.py index 7d1d81567b858..88c5932fbf499 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_data_box_management_client_enums.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_data_box_management_client_enums.py @@ -28,210 +28,308 @@ def __getattr__(cls, name): class AccessProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - SMB = "SMB" #: Server Message Block protocol(SMB). - NFS = "NFS" #: Network File System protocol(NFS). + #: Server Message Block protocol(SMB). + SMB = "SMB" + #: Network File System protocol(NFS). + NFS = "NFS" class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of address. """ - NONE = "None" #: Address type not known. - RESIDENTIAL = "Residential" #: Residential Address. - COMMERCIAL = "Commercial" #: Commercial Address. + #: Address type not known. + NONE = "None" + #: Residential Address. + RESIDENTIAL = "Residential" + #: Commercial Address. + COMMERCIAL = "Commercial" class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The address validation status. """ - VALID = "Valid" #: Address provided is valid. - INVALID = "Invalid" #: Address provided is invalid or not supported. - AMBIGUOUS = "Ambiguous" #: Address provided is ambiguous, please choose one of the alternate addresses returned. + #: Address provided is valid. + VALID = "Valid" + #: Address provided is invalid or not supported. + INVALID = "Invalid" + #: Address provided is ambiguous, please choose one of the alternate addresses returned. + AMBIGUOUS = "Ambiguous" class ClassDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates the type of job details. """ - DATA_BOX = "DataBox" #: Data Box orders. - DATA_BOX_DISK = "DataBoxDisk" #: Data Box Disk orders. - DATA_BOX_HEAVY = "DataBoxHeavy" #: Data Box Heavy orders. + #: Data Box orders. + DATA_BOX = "DataBox" + #: Data Box Disk orders. + DATA_BOX_DISK = "DataBoxDisk" + #: Data Box Heavy orders. + DATA_BOX_HEAVY = "DataBoxHeavy" class CopyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The Status of the copy """ - NOT_STARTED = "NotStarted" #: Data copy hasn't started yet. - IN_PROGRESS = "InProgress" #: Data copy is in progress. - COMPLETED = "Completed" #: Data copy completed. - COMPLETED_WITH_ERRORS = "CompletedWithErrors" #: Data copy completed with errors. - FAILED = "Failed" #: Data copy failed. No data was copied. - NOT_RETURNED = "NotReturned" #: No copy triggered as device was not returned. - HARDWARE_ERROR = "HardwareError" #: The Device has hit hardware issues. - DEVICE_FORMATTED = "DeviceFormatted" #: Data copy failed. The Device was formatted by user. - DEVICE_METADATA_MODIFIED = "DeviceMetadataModified" #: Data copy failed. Device metadata was modified by user. - STORAGE_ACCOUNT_NOT_ACCESSIBLE = "StorageAccountNotAccessible" #: Data copy failed. Storage Account was not accessible during copy. - UNSUPPORTED_DATA = "UnsupportedData" #: Data copy failed. The Device data content is not supported. + #: Data copy hasn't started yet. + NOT_STARTED = "NotStarted" + #: Data copy is in progress. + IN_PROGRESS = "InProgress" + #: Data copy completed. + COMPLETED = "Completed" + #: Data copy completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Data copy failed. No data was copied. + FAILED = "Failed" + #: No copy triggered as device was not returned. + NOT_RETURNED = "NotReturned" + #: The Device has hit hardware issues. + HARDWARE_ERROR = "HardwareError" + #: Data copy failed. The Device was formatted by user. + DEVICE_FORMATTED = "DeviceFormatted" + #: Data copy failed. Device metadata was modified by user. + DEVICE_METADATA_MODIFIED = "DeviceMetadataModified" + #: Data copy failed. Storage Account was not accessible during copy. + STORAGE_ACCOUNT_NOT_ACCESSIBLE = "StorageAccountNotAccessible" + #: Data copy failed. The Device data content is not supported. + UNSUPPORTED_DATA = "UnsupportedData" class DataAccountType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the account. """ - STORAGE_ACCOUNT = "StorageAccount" #: Storage Accounts . - MANAGED_DISK = "ManagedDisk" #: Azure Managed disk storage. + #: Storage Accounts . + STORAGE_ACCOUNT = "StorageAccount" + #: Azure Managed disk storage. + MANAGED_DISK = "ManagedDisk" class DoubleEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines secondary layer of software-based encryption enablement. """ - ENABLED = "Enabled" #: Software-based encryption is enabled. - DISABLED = "Disabled" #: Software-based encryption is disabled. + #: Software-based encryption is enabled. + ENABLED = "Enabled" + #: Software-based encryption is disabled. + DISABLED = "Disabled" class FilterFileType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the filter file. """ - AZURE_BLOB = "AzureBlob" #: Filter file is of the type AzureBlob. - AZURE_FILE = "AzureFile" #: Filter file is of the type AzureFiles. + #: Filter file is of the type AzureBlob. + AZURE_BLOB = "AzureBlob" + #: Filter file is of the type AzureFiles. + AZURE_FILE = "AzureFile" class JobDeliveryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Delivery type of Job. """ - NON_SCHEDULED = "NonScheduled" #: Non Scheduled job. - SCHEDULED = "Scheduled" #: Scheduled job. + #: Non Scheduled job. + NON_SCHEDULED = "NonScheduled" + #: Scheduled job. + SCHEDULED = "Scheduled" class KekType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of encryption key used for key encryption. """ - MICROSOFT_MANAGED = "MicrosoftManaged" #: Key encryption key is managed by Microsoft. - CUSTOMER_MANAGED = "CustomerManaged" #: Key encryption key is managed by the Customer. + #: Key encryption key is managed by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" + #: Key encryption key is managed by the Customer. + CUSTOMER_MANAGED = "CustomerManaged" class LogCollectionLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Level of the logs to be collected. """ - ERROR = "Error" #: Only Errors will be collected in the logs. - VERBOSE = "Verbose" #: Verbose logging (includes Errors, CRC, size information and others). + #: Only Errors will be collected in the logs. + ERROR = "Error" + #: Verbose logging (includes Errors, CRC, size information and others). + VERBOSE = "Verbose" class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Name of the stage. """ - DEVICE_PREPARED = "DevicePrepared" #: Notification at device prepared stage. - DISPATCHED = "Dispatched" #: Notification at device dispatched stage. - DELIVERED = "Delivered" #: Notification at device delivered stage. - PICKED_UP = "PickedUp" #: Notification at device picked up from user stage. - AT_AZURE_DC = "AtAzureDC" #: Notification at device received at Azure datacenter stage. - DATA_COPY = "DataCopy" #: Notification at data copy started stage. + #: Notification at device prepared stage. + DEVICE_PREPARED = "DevicePrepared" + #: Notification at device dispatched stage. + DISPATCHED = "Dispatched" + #: Notification at device delivered stage. + DELIVERED = "Delivered" + #: Notification at device picked up from user stage. + PICKED_UP = "PickedUp" + #: Notification at device received at Azure datacenter stage. + AT_AZURE_DC = "AtAzureDC" + #: Notification at data copy started stage. + DATA_COPY = "DataCopy" class OverallValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Overall validation status. """ - ALL_VALID_TO_PROCEED = "AllValidToProceed" #: Every input request is valid. - INPUTS_REVISIT_REQUIRED = "InputsRevisitRequired" #: Some input requests are not valid. - CERTAIN_INPUT_VALIDATIONS_SKIPPED = "CertainInputValidationsSkipped" #: Certain input validations skipped. + #: Every input request is valid. + ALL_VALID_TO_PROCEED = "AllValidToProceed" + #: Some input requests are not valid. + INPUTS_REVISIT_REQUIRED = "InputsRevisitRequired" + #: Certain input validations skipped. + CERTAIN_INPUT_VALIDATIONS_SKIPPED = "CertainInputValidationsSkipped" class ShareDestinationFormatType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the share. """ - UNKNOWN_TYPE = "UnknownType" #: Unknown format. - HCS = "HCS" #: Storsimple data format. - BLOCK_BLOB = "BlockBlob" #: Azure storage block blob format. - PAGE_BLOB = "PageBlob" #: Azure storage page blob format. - AZURE_FILE = "AzureFile" #: Azure storage file format. - MANAGED_DISK = "ManagedDisk" #: Azure Compute Disk. - AZURE_PREMIUM_FILES = "AzurePremiumFiles" #: Azure storage Premium Files format. + #: Unknown format. + UNKNOWN_TYPE = "UnknownType" + #: Storsimple data format. + HCS = "HCS" + #: Azure storage block blob format. + BLOCK_BLOB = "BlockBlob" + #: Azure storage page blob format. + PAGE_BLOB = "PageBlob" + #: Azure storage file format. + AZURE_FILE = "AzureFile" + #: Azure Compute Disk. + MANAGED_DISK = "ManagedDisk" class SkuDisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Reason why the Sku is disabled. """ - NONE = "None" #: SKU is not disabled. - COUNTRY = "Country" #: SKU is not available in the requested country. - REGION = "Region" #: SKU is not available to push data to the requested Azure region. - FEATURE = "Feature" #: Required features are not enabled for the SKU. - OFFER_TYPE = "OfferType" #: Subscription does not have required offer types for the SKU. - NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription notification. + #: SKU is not disabled. + NONE = "None" + #: SKU is not available in the requested country. + COUNTRY = "Country" + #: SKU is not available to push data to the requested Azure region. + REGION = "Region" + #: Required features are not enabled for the SKU. + FEATURE = "Feature" + #: Subscription does not have required offer types for the SKU. + OFFER_TYPE = "OfferType" + #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription + #: notification. + NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - DATA_BOX = "DataBox" #: Data Box. - DATA_BOX_DISK = "DataBoxDisk" #: Data Box Disk. - DATA_BOX_HEAVY = "DataBoxHeavy" #: Data Box Heavy. + #: Data Box. + DATA_BOX = "DataBox" + #: Data Box Disk. + DATA_BOX_DISK = "DataBoxDisk" + #: Data Box Heavy. + DATA_BOX_HEAVY = "DataBoxHeavy" class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Name of the stage which is in progress. """ - DEVICE_ORDERED = "DeviceOrdered" #: An order has been created. - DEVICE_PREPARED = "DevicePrepared" #: A device has been prepared for the order. - DISPATCHED = "Dispatched" #: Device has been dispatched to the user of the order. - DELIVERED = "Delivered" #: Device has been delivered to the user of the order. - PICKED_UP = "PickedUp" #: Device has been picked up from user and in transit to Azure datacenter. - AT_AZURE_DC = "AtAzureDC" #: Device has been received at Azure datacenter from the user. - DATA_COPY = "DataCopy" #: Data copy from the device at Azure datacenter. - COMPLETED = "Completed" #: Order has completed. - COMPLETED_WITH_ERRORS = "CompletedWithErrors" #: Order has completed with errors. - CANCELLED = "Cancelled" #: Order has been cancelled. - FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" #: Order has failed due to issue reported by user. - FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" #: Order has failed due to issue detected at Azure datacenter. - ABORTED = "Aborted" #: Order has been aborted. - COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" #: Order has completed with warnings. - READY_TO_DISPATCH_FROM_AZURE_DC = "ReadyToDispatchFromAzureDC" #: Device is ready to be handed to customer from Azure DC. - READY_TO_RECEIVE_AT_AZURE_DC = "ReadyToReceiveAtAzureDC" #: Device can be dropped off at Azure DC. + #: An order has been created. + DEVICE_ORDERED = "DeviceOrdered" + #: A device has been prepared for the order. + DEVICE_PREPARED = "DevicePrepared" + #: Device has been dispatched to the user of the order. + DISPATCHED = "Dispatched" + #: Device has been delivered to the user of the order. + DELIVERED = "Delivered" + #: Device has been picked up from user and in transit to Azure datacenter. + PICKED_UP = "PickedUp" + #: Device has been received at Azure datacenter from the user. + AT_AZURE_DC = "AtAzureDC" + #: Data copy from the device at Azure datacenter. + DATA_COPY = "DataCopy" + #: Order has completed. + COMPLETED = "Completed" + #: Order has completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Order has been cancelled. + CANCELLED = "Cancelled" + #: Order has failed due to issue reported by user. + FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" + #: Order has failed due to issue detected at Azure datacenter. + FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" + #: Order has been aborted. + ABORTED = "Aborted" + #: Order has completed with warnings. + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" + #: Device is ready to be handed to customer from Azure DC. + READY_TO_DISPATCH_FROM_AZURE_DC = "ReadyToDispatchFromAzureDC" + #: Device can be dropped off at Azure DC. + READY_TO_RECEIVE_AT_AZURE_DC = "ReadyToReceiveAtAzureDC" class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of the job stage. """ - NONE = "None" #: No status available yet. - IN_PROGRESS = "InProgress" #: Stage is in progress. - SUCCEEDED = "Succeeded" #: Stage has succeeded. - FAILED = "Failed" #: Stage has failed. - CANCELLED = "Cancelled" #: Stage has been cancelled. - CANCELLING = "Cancelling" #: Stage is cancelling. - SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" #: Stage has succeeded with errors. - WAITING_FOR_CUSTOMER_ACTION = "WaitingForCustomerAction" #: Stage is stuck until customer takes some action. - SUCCEEDED_WITH_WARNINGS = "SucceededWithWarnings" #: Stage has succeeded with warnings. + #: No status available yet. + NONE = "None" + #: Stage is in progress. + IN_PROGRESS = "InProgress" + #: Stage has succeeded. + SUCCEEDED = "Succeeded" + #: Stage has failed. + FAILED = "Failed" + #: Stage has been cancelled. + CANCELLED = "Cancelled" + #: Stage is cancelling. + CANCELLING = "Cancelling" + #: Stage has succeeded with errors. + SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" + #: Stage is stuck until customer takes some action. + WAITING_FOR_CUSTOMER_ACTION = "WaitingForCustomerAction" + #: Stage has succeeded with warnings. + SUCCEEDED_WITH_WARNINGS = "SucceededWithWarnings" class TransferConfigurationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the configuration for transfer. """ - TRANSFER_ALL = "TransferAll" #: Transfer all the data. - TRANSFER_USING_FILTER = "TransferUsingFilter" #: Transfer using filter. + #: Transfer all the data. + TRANSFER_ALL = "TransferAll" + #: Transfer using filter. + TRANSFER_USING_FILTER = "TransferUsingFilter" class TransferType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the transfer. """ - IMPORT_TO_AZURE = "ImportToAzure" #: Import data to azure. - EXPORT_FROM_AZURE = "ExportFromAzure" #: Export data from azure. + #: Import data to azure. + IMPORT_TO_AZURE = "ImportToAzure" + #: Export data from azure. + EXPORT_FROM_AZURE = "ExportFromAzure" class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Transport Shipment Type supported for given region. """ - CUSTOMER_MANAGED = "CustomerManaged" #: Shipment Logistics is handled by the customer. - MICROSOFT_MANAGED = "MicrosoftManaged" #: Shipment Logistics is handled by Microsoft. + #: Shipment Logistics is handled by the customer. + CUSTOMER_MANAGED = "CustomerManaged" + #: Shipment Logistics is handled by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" class ValidationInputDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Identifies the type of validation request. """ - VALIDATE_ADDRESS = "ValidateAddress" #: Identify request and response of address validation. - VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB = "ValidateSubscriptionIsAllowedToCreateJob" #: Identify request and response for validation of subscription permission to create job. - VALIDATE_PREFERENCES = "ValidatePreferences" #: Identify request and response of preference validation. - VALIDATE_CREATE_ORDER_LIMIT = "ValidateCreateOrderLimit" #: Identify request and response of create order limit for subscription validation. - VALIDATE_SKU_AVAILABILITY = "ValidateSkuAvailability" #: Identify request and response of active job limit for sku availability. - VALIDATE_DATA_TRANSFER_DETAILS = "ValidateDataTransferDetails" #: Identify request and response of data transfer details validation. + #: Identify request and response of address validation. + VALIDATE_ADDRESS = "ValidateAddress" + #: Identify request and response for validation of subscription permission to create job. + VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB = "ValidateSubscriptionIsAllowedToCreateJob" + #: Identify request and response of preference validation. + VALIDATE_PREFERENCES = "ValidatePreferences" + #: Identify request and response of create order limit for subscription validation. + VALIDATE_CREATE_ORDER_LIMIT = "ValidateCreateOrderLimit" + #: Identify request and response of active job limit for sku availability. + VALIDATE_SKU_AVAILABILITY = "ValidateSkuAvailability" + #: Identify request and response of data transfer details validation. + VALIDATE_DATA_TRANSFER_DETAILS = "ValidateDataTransferDetails" class ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Create order limit validation status. """ - VALID = "Valid" #: Validation is successful. - INVALID = "Invalid" #: Validation is not successful. - SKIPPED = "Skipped" #: Validation is skipped. + #: Validation is successful. + VALID = "Valid" + #: Validation is not successful. + INVALID = "Invalid" + #: Validation is skipped. + SKIPPED = "Skipped" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models.py index 4da1571b91cc4..a3973d7ddeae9 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models.py @@ -19,12 +19,13 @@ class AccountCredentialDetails(msrest.serialization.Model): :vartype account_name: str :ivar data_account_type: Type of the account. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :vartype data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :ivar account_connection_string: Connection string of the account endpoint to use the account as a storage endpoint on the device. :vartype account_connection_string: str :ivar share_credential_details: Per share level unencrypted access credentials. - :vartype share_credential_details: list[~azure.mgmt.databox.models.ShareCredentialDetails] + :vartype share_credential_details: + list[~azure.mgmt.databox.v2020_11_01.models.ShareCredentialDetails] """ _validation = { @@ -58,7 +59,7 @@ class AdditionalErrorInfo(msrest.serialization.Model): :param type: Additional error type. :type type: str :param info: Additional error info. - :type info: object + :type info: any """ _attribute_map = { @@ -84,14 +85,16 @@ class AddressValidationOutput(msrest.serialization.Model): Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2020_11_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2020_11_01.models.ShippingAddress] """ _validation = { @@ -132,9 +135,10 @@ class ValidationInputResponse(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError """ _validation = { @@ -171,14 +175,16 @@ class AddressValidationProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2020_11_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2020_11_01.models.ShippingAddress] """ _validation = { @@ -211,7 +217,7 @@ class ApiError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param error: Required. - :type error: ~azure.mgmt.databox.models.ErrorDetail + :type error: ~azure.mgmt.databox.v2020_11_01.models.ErrorDetail """ _validation = { @@ -302,7 +308,7 @@ class AvailableSkuRequest(msrest.serialization.Model): :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransferType :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str @@ -310,7 +316,7 @@ class AvailableSkuRequest(msrest.serialization.Model): https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str :param sku_names: Sku Names to filter for available skus. - :type sku_names: list[str or ~azure.mgmt.databox.models.SkuName] + :type sku_names: list[str or ~azure.mgmt.databox.v2020_11_01.models.SkuName] """ _validation = { @@ -343,7 +349,7 @@ class AvailableSkusResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of available skus. - :vartype value: list[~azure.mgmt.databox.models.SkuInformation] + :vartype value: list[~azure.mgmt.databox.v2020_11_01.models.SkuInformation] :param next_link: Link for the next set of skus. :type next_link: str """ @@ -457,9 +463,9 @@ class CloudError(msrest.serialization.Model): :param target: Cloud error target. :type target: str :ivar details: Cloud error details. - :vartype details: list[~azure.mgmt.databox.models.CloudError] + :vartype details: list[~azure.mgmt.databox.v2020_11_01.models.CloudError] :ivar additional_info: Cloud error additional info. - :vartype additional_info: list[~azure.mgmt.databox.models.AdditionalErrorInfo] + :vartype additional_info: list[~azure.mgmt.databox.v2020_11_01.models.AdditionalErrorInfo] """ _validation = { @@ -503,7 +509,8 @@ class ContactDetails(msrest.serialization.Model): :param email_list: Required. List of Email-ids to be notified about job progress. :type email_list: list[str] :param notification_preference: Notification preference for a job stage. - :type notification_preference: list[~azure.mgmt.databox.models.NotificationPreference] + :type notification_preference: + list[~azure.mgmt.databox.v2020_11_01.models.NotificationPreference] """ _validation = { @@ -544,7 +551,7 @@ class CopyLogDetails(msrest.serialization.Model): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator """ _validation = { @@ -577,10 +584,10 @@ class CopyProgress(msrest.serialization.Model): :vartype storage_account_name: str :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", "ExportFromAzure". - :vartype transfer_type: str or ~azure.mgmt.databox.models.TransferType + :vartype transfer_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransferType :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :vartype data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :ivar account_id: Id of the account where the data needs to be uploaded. :vartype account_id: str :ivar bytes_processed: To indicate bytes transferred. @@ -682,7 +689,8 @@ class ValidationRequest(msrest.serialization.Model): :type validation_category: str :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2020_11_01.models.ValidationInputRequest] """ _validation = { @@ -718,7 +726,8 @@ class CreateJobValidations(ValidationRequest): :type validation_category: str :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2020_11_01.models.ValidationInputRequest] """ _validation = { @@ -751,7 +760,8 @@ class ValidationInputRequest(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator """ _validation = { @@ -783,10 +793,11 @@ class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName """ _validation = { @@ -819,12 +830,13 @@ class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInpu server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar status: Create order limit validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.ValidationStatus """ _validation = { @@ -858,7 +870,7 @@ class DataAccountDetails(msrest.serialization.Model): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -899,7 +911,7 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar account_name: Account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -943,7 +955,7 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar disk_serial_number: Disk Serial Number. :vartype disk_serial_number: str :ivar error_log_link: Link for copy error logs. @@ -991,7 +1003,7 @@ class DataBoxDiskCopyProgress(msrest.serialization.Model): :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". - :vartype status: str or ~azure.mgmt.databox.models.CopyStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.CopyStatus """ _validation = { @@ -1030,35 +1042,35 @@ class JobDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_11_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_11_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_11_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_11_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_11_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_11_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2020_11_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int """ _validation = { @@ -1070,7 +1082,6 @@ class JobDetails(msrest.serialization.Model): 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'key_encryption_key': {'readonly': True}, } _attribute_map = { @@ -1087,7 +1098,7 @@ class JobDetails(msrest.serialization.Model): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } _subtype_map = { @@ -1111,8 +1122,8 @@ def __init__( self.copy_log_details = None self.reverse_shipment_label_sas_key = None self.chain_of_custody_sas_key = None - self.key_encryption_key = None - self.expected_data_size_in_terabytes = kwargs.get('expected_data_size_in_terabytes', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.expected_data_size_in_tera_bytes = kwargs.get('expected_data_size_in_tera_bytes', None) class DataBoxDiskJobDetails(JobDetails): @@ -1123,41 +1134,41 @@ class DataBoxDiskJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_11_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_11_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_11_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_11_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_11_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_11_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2020_11_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :param preferred_disks: User preference on what size disks are needed for the job. The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int. :type preferred_disks: dict[str, int] :ivar copy_progress: Copy progress per disk. - :vartype copy_progress: list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_11_01.models.DataBoxDiskCopyProgress] :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. :vartype disks_and_size_details: dict[str, int] @@ -1174,7 +1185,6 @@ class DataBoxDiskJobDetails(JobDetails): 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'key_encryption_key': {'readonly': True}, 'copy_progress': {'readonly': True}, 'disks_and_size_details': {'readonly': True}, } @@ -1193,7 +1203,7 @@ class DataBoxDiskJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, @@ -1224,11 +1234,11 @@ class JobSecrets(msrest.serialization.Model): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_11_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError """ _validation = { @@ -1266,13 +1276,13 @@ class DataBoxDiskJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_11_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar disk_secrets: Contains the list of secrets object for that device. - :vartype disk_secrets: list[~azure.mgmt.databox.models.DiskSecret] + :vartype disk_secrets: list[~azure.mgmt.databox.v2020_11_01.models.DiskSecret] :ivar pass_key: PassKey for the disk Job. :vartype pass_key: str :ivar is_passkey_user_defined: Whether passkey was provided by user. @@ -1317,7 +1327,7 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar account_name: Account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -1360,37 +1370,37 @@ class DataBoxHeavyJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_11_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_11_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_11_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_11_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_11_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_11_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2020_11_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar copy_progress: Copy progress per account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_11_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox Heavy. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -1409,7 +1419,6 @@ class DataBoxHeavyJobDetails(JobDetails): 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'key_encryption_key': {'readonly': True}, 'copy_progress': {'readonly': True}, } @@ -1427,7 +1436,7 @@ class DataBoxHeavyJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } @@ -1451,13 +1460,13 @@ class DataBoxHeavyJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_11_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. - :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.models.DataBoxHeavySecret] + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2020_11_01.models.DataBoxHeavySecret] """ _validation = { @@ -1493,12 +1502,14 @@ class DataBoxHeavySecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2020_11_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2020_11_01.models.AccountCredentialDetails] """ _validation = { @@ -1537,37 +1548,37 @@ class DataBoxJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_11_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_11_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_11_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_11_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_11_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_11_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2020_11_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar copy_progress: Copy progress per storage account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_11_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be @@ -1586,7 +1597,6 @@ class DataBoxJobDetails(JobDetails): 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'key_encryption_key': {'readonly': True}, 'copy_progress': {'readonly': True}, } @@ -1604,7 +1614,7 @@ class DataBoxJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } @@ -1628,13 +1638,13 @@ class DataboxJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_11_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :param pod_secrets: Contains the list of secret objects for a job. - :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + :type pod_secrets: list[~azure.mgmt.databox.v2020_11_01.models.DataBoxSecret] """ _validation = { @@ -1672,7 +1682,7 @@ class ScheduleAvailabilityRequest(msrest.serialization.Model): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -1712,7 +1722,7 @@ class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -1746,12 +1756,14 @@ class DataBoxSecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2020_11_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2020_11_01.models.AccountCredentialDetails] """ _validation = { @@ -1788,12 +1800,12 @@ class DataExportDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param transfer_configuration: Required. Configuration for the data transfer. - :type transfer_configuration: ~azure.mgmt.databox.models.TransferConfiguration + :type transfer_configuration: ~azure.mgmt.databox.v2020_11_01.models.TransferConfiguration :param log_collection_level: Level of the logs to be collected. Possible values include: - "Error", "Verbose". - :type log_collection_level: str or ~azure.mgmt.databox.models.LogCollectionLevel + "Error", "Verbose". Default value: "Error". + :type log_collection_level: str or ~azure.mgmt.databox.v2020_11_01.models.LogCollectionLevel :param account_details: Required. Account details of the data to be transferred. - :type account_details: ~azure.mgmt.databox.models.DataAccountDetails + :type account_details: ~azure.mgmt.databox.v2020_11_01.models.DataAccountDetails """ _validation = { @@ -1813,7 +1825,7 @@ def __init__( ): super(DataExportDetails, self).__init__(**kwargs) self.transfer_configuration = kwargs['transfer_configuration'] - self.log_collection_level = kwargs.get('log_collection_level', None) + self.log_collection_level = kwargs.get('log_collection_level', "Error") self.account_details = kwargs['account_details'] @@ -1823,7 +1835,7 @@ class DataImportDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param account_details: Required. Account details of the data to be transferred. - :type account_details: ~azure.mgmt.databox.models.DataAccountDetails + :type account_details: ~azure.mgmt.databox.v2020_11_01.models.DataAccountDetails """ _validation = { @@ -1881,17 +1893,18 @@ class DataTransferDetailsValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :param data_export_details: List of DataTransfer details to be used to export data from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_11_01.models.DataExportDetails] :param data_import_details: List of DataTransfer details to be used to import data to azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_11_01.models.DataImportDetails] :param device_type: Required. Device type. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransferType """ _validation = { @@ -1931,12 +1944,13 @@ class DataTransferDetailsValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar status: Data transfer details validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.ValidationStatus """ _validation = { @@ -1970,8 +1984,8 @@ class DcAccessSecurityCode(msrest.serialization.Model): """ _attribute_map = { - 'reverse_dc_access_code': {'key': 'reverseDcAccessCode', 'type': 'str'}, - 'forward_dc_access_code': {'key': 'forwardDcAccessCode', 'type': 'str'}, + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, } def __init__( @@ -2023,25 +2037,25 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str - :param expected_data_size_in_terabytes: Required. The expected size of the data, which needs to - be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int """ _validation = { 'storage_location': {'required': True}, 'sku_name': {'required': True}, - 'expected_data_size_in_terabytes': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, } _attribute_map = { 'storage_location': {'key': 'storageLocation', 'type': 'str'}, 'sku_name': {'key': 'skuName', 'type': 'str'}, 'country': {'key': 'country', 'type': 'str'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } def __init__( @@ -2050,7 +2064,7 @@ def __init__( ): super(DiskScheduleAvailabilityRequest, self).__init__(**kwargs) self.sku_name = 'DataBoxDisk' # type: str - self.expected_data_size_in_terabytes = kwargs['expected_data_size_in_terabytes'] + self.expected_data_size_in_tera_bytes = kwargs['expected_data_size_in_tera_bytes'] class DiskSecret(msrest.serialization.Model): @@ -2088,8 +2102,8 @@ class EncryptionPreferences(msrest.serialization.Model): """Preferences related to the Encryption. :param double_encryption: Defines secondary layer of software-based encryption enablement. - Possible values include: "Enabled", "Disabled". - :type double_encryption: str or ~azure.mgmt.databox.models.DoubleEncryption + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type double_encryption: str or ~azure.mgmt.databox.v2020_11_01.models.DoubleEncryption """ _attribute_map = { @@ -2101,7 +2115,7 @@ def __init__( **kwargs ): super(EncryptionPreferences, self).__init__(**kwargs) - self.double_encryption = kwargs.get('double_encryption', None) + self.double_encryption = kwargs.get('double_encryption', "Disabled") class ErrorDetail(msrest.serialization.Model): @@ -2114,7 +2128,7 @@ class ErrorDetail(msrest.serialization.Model): :param message: Required. :type message: str :param details: - :type details: list[~azure.mgmt.databox.models.Details] + :type details: list[~azure.mgmt.databox.v2020_11_01.models.Details] :param target: :type target: str """ @@ -2149,7 +2163,7 @@ class FilterFileDetails(msrest.serialization.Model): :param filter_file_type: Required. Type of the filter file. Possible values include: "AzureBlob", "AzureFile". - :type filter_file_type: str or ~azure.mgmt.databox.models.FilterFileType + :type filter_file_type: str or ~azure.mgmt.databox.v2020_11_01.models.FilterFileType :param filter_file_path: Required. Path of the file that contains the details of all items to transfer. :type filter_file_path: str @@ -2184,7 +2198,7 @@ class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -2214,7 +2228,7 @@ class IdentityProperties(msrest.serialization.Model): :param type: Managed service identity type. :type type: str :param user_assigned: User assigned identity properties. - :type user_assigned: ~azure.mgmt.databox.models.UserAssignedProperties + :type user_assigned: ~azure.mgmt.databox.v2020_11_01.models.UserAssignedProperties """ _attribute_map = { @@ -2264,9 +2278,9 @@ class Resource(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2020_11_01.models.Sku :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_11_01.models.ResourceIdentity """ _validation = { @@ -2308,18 +2322,20 @@ class JobResource(Resource): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2020_11_01.models.Sku :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_11_01.models.ResourceIdentity :ivar name: Name of the object. :vartype name: str :ivar id: Id of the object. :vartype id: str :ivar type: Type of the object. :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.databox.v2020_11_01.models.SystemData :param transfer_type: Required. Type of the data transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransferType :ivar is_cancellable: Describes whether the job is cancellable or not. :vartype is_cancellable: bool :ivar is_deletable: Describes whether the job is deletable or not. @@ -2333,20 +2349,20 @@ class JobResource(Resource): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype status: str or ~azure.mgmt.databox.models.StageName + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.StageName :ivar start_time: Time at which the job was started in UTC ISO 8601 format. :vartype start_time: ~datetime.datetime :ivar error: Top level error for the job. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :param details: Details of a job run. This field will only be sent for expand details filter. - :type details: ~azure.mgmt.databox.models.JobDetails + :type details: ~azure.mgmt.databox.v2020_11_01.models.JobDetails :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", - "Scheduled". - :type delivery_type: str or ~azure.mgmt.databox.models.JobDeliveryType + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2020_11_01.models.JobDeliveryType :param delivery_info: Delivery Info of Job. - :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo + :type delivery_info: ~azure.mgmt.databox.v2020_11_01.models.JobDeliveryInfo :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. :vartype is_cancellable_without_fee: bool """ @@ -2357,6 +2373,7 @@ class JobResource(Resource): 'name': {'readonly': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'transfer_type': {'required': True}, 'is_cancellable': {'readonly': True}, 'is_deletable': {'readonly': True}, @@ -2377,6 +2394,7 @@ class JobResource(Resource): 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'transfer_type': {'key': 'properties.transferType', 'type': 'str'}, 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, @@ -2400,6 +2418,7 @@ def __init__( self.name = None self.id = None self.type = None + self.system_data = None self.transfer_type = kwargs['transfer_type'] self.is_cancellable = None self.is_deletable = None @@ -2410,7 +2429,7 @@ def __init__( self.error = None self.details = kwargs.get('details', None) self.cancellation_reason = None - self.delivery_type = kwargs.get('delivery_type', None) + self.delivery_type = kwargs.get('delivery_type', "NonScheduled") self.delivery_info = kwargs.get('delivery_info', None) self.is_cancellable_without_fee = None @@ -2419,7 +2438,7 @@ class JobResourceList(msrest.serialization.Model): """Job Resource Collection. :param value: List of job resources. - :type value: list[~azure.mgmt.databox.models.JobResource] + :type value: list[~azure.mgmt.databox.v2020_11_01.models.JobResource] :param next_link: Link for the next set of job resources. :type next_link: str """ @@ -2445,9 +2464,9 @@ class JobResourceUpdateParameter(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_11_01.models.ResourceIdentity :param details: Details of a job to be updated. - :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :type details: ~azure.mgmt.databox.v2020_11_01.models.UpdateJobDetails """ _attribute_map = { @@ -2476,17 +2495,17 @@ class JobStages(msrest.serialization.Model): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype stage_name: str or ~azure.mgmt.databox.models.StageName + :vartype stage_name: str or ~azure.mgmt.databox.v2020_11_01.models.StageName :ivar display_name: Display name of the job stage. :vartype display_name: str :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors", "WaitingForCustomerAction", "SucceededWithWarnings". - :vartype stage_status: str or ~azure.mgmt.databox.models.StageStatus + :vartype stage_status: str or ~azure.mgmt.databox.v2020_11_01.models.StageStatus :ivar stage_time: Time for the job stage in UTC ISO 8601 format. :vartype stage_time: ~datetime.datetime :ivar job_stage_details: Job Stage Details. - :vartype job_stage_details: object + :vartype job_stage_details: any """ _validation = { @@ -2523,10 +2542,10 @@ class KeyEncryptionKey(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param kek_type: Required. Type of encryption key used for key encryption. Possible values - include: "MicrosoftManaged", "CustomerManaged". - :type kek_type: str or ~azure.mgmt.databox.models.KekType + include: "MicrosoftManaged", "CustomerManaged". Default value: "MicrosoftManaged". + :type kek_type: str or ~azure.mgmt.databox.v2020_11_01.models.KekType :param identity_properties: Managed identity properties used for key encryption. - :type identity_properties: ~azure.mgmt.databox.models.IdentityProperties + :type identity_properties: ~azure.mgmt.databox.v2020_11_01.models.IdentityProperties :param kek_url: Key encryption key. It is required in case of Customer managed KekType. :type kek_url: str :param kek_vault_resource_id: Kek vault resource id. It is required in case of Customer managed @@ -2550,7 +2569,7 @@ def __init__( **kwargs ): super(KeyEncryptionKey, self).__init__(**kwargs) - self.kek_type = kwargs['kek_type'] + self.kek_type = kwargs.get('kek_type', "MicrosoftManaged") self.identity_properties = kwargs.get('identity_properties', None) self.kek_url = kwargs.get('kek_url', None) self.kek_vault_resource_id = kwargs.get('kek_vault_resource_id', None) @@ -2563,7 +2582,7 @@ class ManagedDiskDetails(DataAccountDetails): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -2608,7 +2627,7 @@ class NotificationPreference(msrest.serialization.Model): :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". - :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName + :type stage_name: str or ~azure.mgmt.databox.v2020_11_01.models.NotificationStageName :param send_notification: Required. Notification is required or not. :type send_notification: bool """ @@ -2629,7 +2648,7 @@ def __init__( ): super(NotificationPreference, self).__init__(**kwargs) self.stage_name = kwargs['stage_name'] - self.send_notification = kwargs['send_notification'] + self.send_notification = kwargs.get('send_notification', True) class Operation(msrest.serialization.Model): @@ -2641,9 +2660,9 @@ class Operation(msrest.serialization.Model): {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. :vartype name: str :ivar display: Operation display values. - :vartype display: ~azure.mgmt.databox.models.OperationDisplay + :vartype display: ~azure.mgmt.databox.v2020_11_01.models.OperationDisplay :ivar properties: Operation properties. - :vartype properties: object + :vartype properties: any :ivar origin: Origin of the operation. Can be : user|system|user,system. :vartype origin: str :param is_data_action: Indicates whether the operation is a data action. @@ -2714,7 +2733,7 @@ class OperationList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of operations. - :vartype value: list[~azure.mgmt.databox.models.Operation] + :vartype value: list[~azure.mgmt.databox.v2020_11_01.models.Operation] :param next_link: Link for the next set of operations. :type next_link: str """ @@ -2778,9 +2797,9 @@ class Preferences(msrest.serialization.Model): :param preferred_data_center_region: Preferred data center region. :type preferred_data_center_region: list[str] :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2020_11_01.models.TransportPreferences :param encryption_preferences: Preferences related to the Encryption. - :type encryption_preferences: ~azure.mgmt.databox.models.EncryptionPreferences + :type encryption_preferences: ~azure.mgmt.databox.v2020_11_01.models.EncryptionPreferences """ _attribute_map = { @@ -2808,12 +2827,13 @@ class PreferencesValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :param preference: Preference of transport and data center. - :type preference: ~azure.mgmt.databox.models.Preferences + :type preference: ~azure.mgmt.databox.v2020_11_01.models.Preferences :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName """ _validation = { @@ -2848,12 +2868,13 @@ class PreferencesValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar status: Validation status of requested data center and transport. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.ValidationStatus """ _validation = { @@ -2882,10 +2903,12 @@ class RegionConfigurationRequest(msrest.serialization.Model): :param schedule_availability_request: Request body to get the availability for scheduling orders. - :type schedule_availability_request: ~azure.mgmt.databox.models.ScheduleAvailabilityRequest + :type schedule_availability_request: + ~azure.mgmt.databox.v2020_11_01.models.ScheduleAvailabilityRequest :param transport_availability_request: Request body to get the transport availability for given sku. - :type transport_availability_request: ~azure.mgmt.databox.models.TransportAvailabilityRequest + :type transport_availability_request: + ~azure.mgmt.databox.v2020_11_01.models.TransportAvailabilityRequest """ _attribute_map = { @@ -2909,10 +2932,10 @@ class RegionConfigurationResponse(msrest.serialization.Model): :ivar schedule_availability_response: Schedule availability for given sku in a region. :vartype schedule_availability_response: - ~azure.mgmt.databox.models.ScheduleAvailabilityResponse + ~azure.mgmt.databox.v2020_11_01.models.ScheduleAvailabilityResponse :ivar transport_availability_response: Transport options available for given sku in a region. :vartype transport_availability_response: - ~azure.mgmt.databox.models.TransportAvailabilityResponse + ~azure.mgmt.databox.v2020_11_01.models.TransportAvailabilityResponse """ _validation = { @@ -2946,7 +2969,8 @@ class ResourceIdentity(msrest.serialization.Model): :ivar tenant_id: Home Tenant Id. :vartype tenant_id: str :param user_assigned_identities: User Assigned Identities. - :type user_assigned_identities: dict[str, ~azure.mgmt.databox.models.UserAssignedIdentity] + :type user_assigned_identities: dict[str, + ~azure.mgmt.databox.v2020_11_01.models.UserAssignedIdentity] """ _validation = { @@ -2966,7 +2990,7 @@ def __init__( **kwargs ): super(ResourceIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) + self.type = kwargs.get('type', "None") self.principal_id = None self.tenant_id = None self.user_assigned_identities = kwargs.get('user_assigned_identities', None) @@ -3005,14 +3029,15 @@ class ShareCredentialDetails(msrest.serialization.Model): :ivar share_name: Name of the share. :vartype share_name: str :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", - "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk", "AzurePremiumFiles". - :vartype share_type: str or ~azure.mgmt.databox.models.ShareDestinationFormatType + "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". + :vartype share_type: str or ~azure.mgmt.databox.v2020_11_01.models.ShareDestinationFormatType :ivar user_name: User name for the share. :vartype user_name: str :ivar password: Password for the share. :vartype password: str :ivar supported_access_protocols: Access protocols supported on the device. - :vartype supported_access_protocols: list[str or ~azure.mgmt.databox.models.AccessProtocol] + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2020_11_01.models.AccessProtocol] """ _validation = { @@ -3135,8 +3160,8 @@ class ShippingAddress(msrest.serialization.Model): :param company_name: Name of the company. :type company_name: str :param address_type: Type of address. Possible values include: "None", "Residential", - "Commercial". - :type address_type: str or ~azure.mgmt.databox.models.AddressType + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2020_11_01.models.AddressType """ _validation = { @@ -3171,7 +3196,7 @@ def __init__( self.postal_code = kwargs.get('postal_code', None) self.zip_extended_code = kwargs.get('zip_extended_code', None) self.company_name = kwargs.get('company_name', None) - self.address_type = kwargs.get('address_type', None) + self.address_type = kwargs.get('address_type', "None") class Sku(msrest.serialization.Model): @@ -3181,7 +3206,7 @@ class Sku(msrest.serialization.Model): :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type name: str or ~azure.mgmt.databox.models.SkuName + :type name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param display_name: The display name of the sku. :type display_name: str :param family: The sku family. @@ -3217,13 +3242,14 @@ class SkuAvailabilityValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransferType :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str @@ -3271,12 +3297,13 @@ class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.ValidationStatus """ _validation = { @@ -3373,21 +3400,21 @@ class SkuInformation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.databox.models.Sku + :vartype sku: ~azure.mgmt.databox.v2020_11_01.models.Sku :ivar enabled: The sku is enabled or not. :vartype enabled: bool :ivar data_location_to_service_location_map: The map of data location to service location. :vartype data_location_to_service_location_map: - list[~azure.mgmt.databox.models.DataLocationToServiceLocationMap] + list[~azure.mgmt.databox.v2020_11_01.models.DataLocationToServiceLocationMap] :ivar capacity: Capacity of the Sku. - :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :vartype capacity: ~azure.mgmt.databox.v2020_11_01.models.SkuCapacity :ivar costs: Cost of the Sku. - :vartype costs: list[~azure.mgmt.databox.models.SkuCost] + :vartype costs: list[~azure.mgmt.databox.v2020_11_01.models.SkuCost] :ivar api_versions: Api versions that support this Sku. :vartype api_versions: list[str] :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". - :vartype disabled_reason: str or ~azure.mgmt.databox.models.SkuDisabledReason + :vartype disabled_reason: str or ~azure.mgmt.databox.v2020_11_01.models.SkuDisabledReason :ivar disabled_reason_message: Message for why the Sku is disabled. :vartype disabled_reason_message: str :ivar required_feature: Required feature to access the sku. @@ -3441,7 +3468,7 @@ class StorageAccountDetails(DataAccountDetails): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -3482,7 +3509,8 @@ class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator """ _validation = { @@ -3512,12 +3540,13 @@ class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInp server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar status: Validation status of subscription permission to create job. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.ValidationStatus """ _validation = { @@ -3541,6 +3570,58 @@ def __init__( self.status = None +class SystemData(msrest.serialization.Model): + """Provides details about resource creation and update time. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_by: A string identifier for the identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource: user, application, + managedIdentity. + :vartype created_by_type: str + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: A string identifier for the identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource: user, + application, managedIdentity. + :vartype last_modified_by_type: str + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _validation = { + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + } + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = None + self.created_by_type = None + self.created_at = None + self.last_modified_by = None + self.last_modified_by_type = None + self.last_modified_at = None + + class TransferAllDetails(msrest.serialization.Model): """Details to transfer all data. @@ -3548,7 +3629,7 @@ class TransferAllDetails(msrest.serialization.Model): :param data_account_type: Required. Type of the account of data. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :param transfer_all_blobs: To indicate if all Azure blobs have to be transferred. :type transfer_all_blobs: bool :param transfer_all_files: To indicate if all Azure Files have to be transferred. @@ -3582,14 +3663,16 @@ class TransferConfiguration(msrest.serialization.Model): :param transfer_configuration_type: Required. Type of the configuration for transfer. Possible values include: "TransferAll", "TransferUsingFilter". - :type transfer_configuration_type: str or ~azure.mgmt.databox.models.TransferConfigurationType + :type transfer_configuration_type: str or + ~azure.mgmt.databox.v2020_11_01.models.TransferConfigurationType :param transfer_filter_details: Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. :type transfer_filter_details: - ~azure.mgmt.databox.models.TransferConfigurationTransferFilterDetails + ~azure.mgmt.databox.v2020_11_01.models.TransferConfigurationTransferFilterDetails :param transfer_all_details: Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. - :type transfer_all_details: ~azure.mgmt.databox.models.TransferConfigurationTransferAllDetails + :type transfer_all_details: + ~azure.mgmt.databox.v2020_11_01.models.TransferConfigurationTransferAllDetails """ _validation = { @@ -3616,7 +3699,7 @@ class TransferConfigurationTransferAllDetails(msrest.serialization.Model): """Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. :param include: Details to transfer all data. - :type include: ~azure.mgmt.databox.models.TransferAllDetails + :type include: ~azure.mgmt.databox.v2020_11_01.models.TransferAllDetails """ _attribute_map = { @@ -3635,7 +3718,7 @@ class TransferConfigurationTransferFilterDetails(msrest.serialization.Model): """Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. :param include: Details of the filtering the transfer of data. - :type include: ~azure.mgmt.databox.models.TransferFilterDetails + :type include: ~azure.mgmt.databox.v2020_11_01.models.TransferFilterDetails """ _attribute_map = { @@ -3657,13 +3740,13 @@ class TransferFilterDetails(msrest.serialization.Model): :param data_account_type: Required. Type of the account of data. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :param blob_filter_details: Filter details to transfer blobs. - :type blob_filter_details: ~azure.mgmt.databox.models.BlobFilterDetails + :type blob_filter_details: ~azure.mgmt.databox.v2020_11_01.models.BlobFilterDetails :param azure_file_filter_details: Filter details to transfer Azure files. - :type azure_file_filter_details: ~azure.mgmt.databox.models.AzureFileFilterDetails + :type azure_file_filter_details: ~azure.mgmt.databox.v2020_11_01.models.AzureFileFilterDetails :param filter_file_details: Details of the filter files to be used for data transfer. - :type filter_file_details: list[~azure.mgmt.databox.models.FilterFileDetails] + :type filter_file_details: list[~azure.mgmt.databox.v2020_11_01.models.FilterFileDetails] """ _validation = { @@ -3695,7 +3778,7 @@ class TransportAvailabilityDetails(msrest.serialization.Model): :ivar shipment_type: Transport Shipment Type supported for given region. Possible values include: "CustomerManaged", "MicrosoftManaged". - :vartype shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :vartype shipment_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransportShipmentTypes """ _validation = { @@ -3719,7 +3802,7 @@ class TransportAvailabilityRequest(msrest.serialization.Model): :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName """ _attribute_map = { @@ -3741,7 +3824,7 @@ class TransportAvailabilityResponse(msrest.serialization.Model): :ivar transport_availability_details: List of transport availability details for given region. :vartype transport_availability_details: - list[~azure.mgmt.databox.models.TransportAvailabilityDetails] + list[~azure.mgmt.databox.v2020_11_01.models.TransportAvailabilityDetails] """ _validation = { @@ -3767,7 +3850,8 @@ class TransportPreferences(msrest.serialization.Model): :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". - :type preferred_shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2020_11_01.models.TransportShipmentTypes """ _validation = { @@ -3794,7 +3878,7 @@ class UnencryptedCredentials(msrest.serialization.Model): :ivar job_name: Name of the job. :vartype job_name: str :ivar job_secrets: Secrets related to this job. - :vartype job_secrets: ~azure.mgmt.databox.models.JobSecrets + :vartype job_secrets: ~azure.mgmt.databox.v2020_11_01.models.JobSecrets """ _validation = { @@ -3820,7 +3904,7 @@ class UnencryptedCredentialsList(msrest.serialization.Model): """List of unencrypted credentials for accessing device. :param value: List of unencrypted credentials. - :type value: list[~azure.mgmt.databox.models.UnencryptedCredentials] + :type value: list[~azure.mgmt.databox.v2020_11_01.models.UnencryptedCredentials] :param next_link: Link for the next set of unencrypted credentials. :type next_link: str """ @@ -3843,11 +3927,11 @@ class UpdateJobDetails(msrest.serialization.Model): """Job details for update. :param contact_details: Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_11_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :param key_encryption_key: Key encryption key for the job. - :type key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey + :type key_encryption_key: ~azure.mgmt.databox.v2020_11_01.models.KeyEncryptionKey """ _attribute_map = { @@ -3924,14 +4008,15 @@ class ValidateAddress(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2020_11_01.models.TransportPreferences """ _validation = { @@ -3965,10 +4050,11 @@ class ValidationResponse(msrest.serialization.Model): :ivar status: Overall validation status. Possible values include: "AllValidToProceed", "InputsRevisitRequired", "CertainInputValidationsSkipped". - :vartype status: str or ~azure.mgmt.databox.models.OverallValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.OverallValidationStatus :ivar individual_response_details: List of response details contain validationType and its response as key and value respectively. - :vartype individual_response_details: list[~azure.mgmt.databox.models.ValidationInputResponse] + :vartype individual_response_details: + list[~azure.mgmt.databox.v2020_11_01.models.ValidationInputResponse] """ _validation = { diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models_py3.py index 133ebb9c5cd3e..623a4227ce1ca 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models_py3.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -24,12 +24,13 @@ class AccountCredentialDetails(msrest.serialization.Model): :vartype account_name: str :ivar data_account_type: Type of the account. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :vartype data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :ivar account_connection_string: Connection string of the account endpoint to use the account as a storage endpoint on the device. :vartype account_connection_string: str :ivar share_credential_details: Per share level unencrypted access credentials. - :vartype share_credential_details: list[~azure.mgmt.databox.models.ShareCredentialDetails] + :vartype share_credential_details: + list[~azure.mgmt.databox.v2020_11_01.models.ShareCredentialDetails] """ _validation = { @@ -63,7 +64,7 @@ class AdditionalErrorInfo(msrest.serialization.Model): :param type: Additional error type. :type type: str :param info: Additional error info. - :type info: object + :type info: any """ _attribute_map = { @@ -75,7 +76,7 @@ def __init__( self, *, type: Optional[str] = None, - info: Optional[object] = None, + info: Optional[Any] = None, **kwargs ): super(AdditionalErrorInfo, self).__init__(**kwargs) @@ -92,14 +93,16 @@ class AddressValidationOutput(msrest.serialization.Model): Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2020_11_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2020_11_01.models.ShippingAddress] """ _validation = { @@ -140,9 +143,10 @@ class ValidationInputResponse(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError """ _validation = { @@ -179,14 +183,16 @@ class AddressValidationProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar validation_status: The address validation status. Possible values include: "Valid", "Invalid", "Ambiguous". - :vartype validation_status: str or ~azure.mgmt.databox.models.AddressValidationStatus + :vartype validation_status: str or + ~azure.mgmt.databox.v2020_11_01.models.AddressValidationStatus :ivar alternate_addresses: List of alternate addresses. - :vartype alternate_addresses: list[~azure.mgmt.databox.models.ShippingAddress] + :vartype alternate_addresses: list[~azure.mgmt.databox.v2020_11_01.models.ShippingAddress] """ _validation = { @@ -219,7 +225,7 @@ class ApiError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param error: Required. - :type error: ~azure.mgmt.databox.models.ErrorDetail + :type error: ~azure.mgmt.databox.v2020_11_01.models.ErrorDetail """ _validation = { @@ -312,7 +318,7 @@ class AvailableSkuRequest(msrest.serialization.Model): :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransferType :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str @@ -320,7 +326,7 @@ class AvailableSkuRequest(msrest.serialization.Model): https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. :type location: str :param sku_names: Sku Names to filter for available skus. - :type sku_names: list[str or ~azure.mgmt.databox.models.SkuName] + :type sku_names: list[str or ~azure.mgmt.databox.v2020_11_01.models.SkuName] """ _validation = { @@ -358,7 +364,7 @@ class AvailableSkusResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of available skus. - :vartype value: list[~azure.mgmt.databox.models.SkuInformation] + :vartype value: list[~azure.mgmt.databox.v2020_11_01.models.SkuInformation] :param next_link: Link for the next set of skus. :type next_link: str """ @@ -484,9 +490,9 @@ class CloudError(msrest.serialization.Model): :param target: Cloud error target. :type target: str :ivar details: Cloud error details. - :vartype details: list[~azure.mgmt.databox.models.CloudError] + :vartype details: list[~azure.mgmt.databox.v2020_11_01.models.CloudError] :ivar additional_info: Cloud error additional info. - :vartype additional_info: list[~azure.mgmt.databox.models.AdditionalErrorInfo] + :vartype additional_info: list[~azure.mgmt.databox.v2020_11_01.models.AdditionalErrorInfo] """ _validation = { @@ -534,7 +540,8 @@ class ContactDetails(msrest.serialization.Model): :param email_list: Required. List of Email-ids to be notified about job progress. :type email_list: list[str] :param notification_preference: Notification preference for a job stage. - :type notification_preference: list[~azure.mgmt.databox.models.NotificationPreference] + :type notification_preference: + list[~azure.mgmt.databox.v2020_11_01.models.NotificationPreference] """ _validation = { @@ -582,7 +589,7 @@ class CopyLogDetails(msrest.serialization.Model): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator """ _validation = { @@ -615,10 +622,10 @@ class CopyProgress(msrest.serialization.Model): :vartype storage_account_name: str :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", "ExportFromAzure". - :vartype transfer_type: str or ~azure.mgmt.databox.models.TransferType + :vartype transfer_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransferType :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", "ManagedDisk". - :vartype data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :vartype data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :ivar account_id: Id of the account where the data needs to be uploaded. :vartype account_id: str :ivar bytes_processed: To indicate bytes transferred. @@ -720,7 +727,8 @@ class ValidationRequest(msrest.serialization.Model): :type validation_category: str :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2020_11_01.models.ValidationInputRequest] """ _validation = { @@ -758,7 +766,8 @@ class CreateJobValidations(ValidationRequest): :type validation_category: str :param individual_request_details: Required. List of request details contain validationType and its request as key and value respectively. - :type individual_request_details: list[~azure.mgmt.databox.models.ValidationInputRequest] + :type individual_request_details: + list[~azure.mgmt.databox.v2020_11_01.models.ValidationInputRequest] """ _validation = { @@ -793,7 +802,8 @@ class ValidationInputRequest(msrest.serialization.Model): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator """ _validation = { @@ -825,10 +835,11 @@ class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName """ _validation = { @@ -863,12 +874,13 @@ class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInpu server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar status: Create order limit validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.ValidationStatus """ _validation = { @@ -902,7 +914,7 @@ class DataAccountDetails(msrest.serialization.Model): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -945,7 +957,7 @@ class DataBoxAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar account_name: Account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -989,7 +1001,7 @@ class DataBoxDiskCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar disk_serial_number: Disk Serial Number. :vartype disk_serial_number: str :ivar error_log_link: Link for copy error logs. @@ -1037,7 +1049,7 @@ class DataBoxDiskCopyProgress(msrest.serialization.Model): :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". - :vartype status: str or ~azure.mgmt.databox.models.CopyStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.CopyStatus """ _validation = { @@ -1076,35 +1088,35 @@ class JobDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_11_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_11_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_11_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_11_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_11_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_11_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2020_11_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int """ _validation = { @@ -1116,7 +1128,6 @@ class JobDetails(msrest.serialization.Model): 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'key_encryption_key': {'readonly': True}, } _attribute_map = { @@ -1133,7 +1144,7 @@ class JobDetails(msrest.serialization.Model): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } _subtype_map = { @@ -1148,7 +1159,8 @@ def __init__( data_import_details: Optional[List["DataImportDetails"]] = None, data_export_details: Optional[List["DataExportDetails"]] = None, preferences: Optional["Preferences"] = None, - expected_data_size_in_terabytes: Optional[int] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, **kwargs ): super(JobDetails, self).__init__(**kwargs) @@ -1164,8 +1176,8 @@ def __init__( self.copy_log_details = None self.reverse_shipment_label_sas_key = None self.chain_of_custody_sas_key = None - self.key_encryption_key = None - self.expected_data_size_in_terabytes = expected_data_size_in_terabytes + self.key_encryption_key = key_encryption_key + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes class DataBoxDiskJobDetails(JobDetails): @@ -1176,41 +1188,41 @@ class DataBoxDiskJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_11_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_11_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_11_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_11_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_11_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_11_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2020_11_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :param preferred_disks: User preference on what size disks are needed for the job. The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int. :type preferred_disks: dict[str, int] :ivar copy_progress: Copy progress per disk. - :vartype copy_progress: list[~azure.mgmt.databox.models.DataBoxDiskCopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_11_01.models.DataBoxDiskCopyProgress] :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. :vartype disks_and_size_details: dict[str, int] @@ -1227,7 +1239,6 @@ class DataBoxDiskJobDetails(JobDetails): 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'key_encryption_key': {'readonly': True}, 'copy_progress': {'readonly': True}, 'disks_and_size_details': {'readonly': True}, } @@ -1246,7 +1257,7 @@ class DataBoxDiskJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, @@ -1261,12 +1272,13 @@ def __init__( data_import_details: Optional[List["DataImportDetails"]] = None, data_export_details: Optional[List["DataExportDetails"]] = None, preferences: Optional["Preferences"] = None, - expected_data_size_in_terabytes: Optional[int] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, preferred_disks: Optional[Dict[str, int]] = None, passkey: Optional[str] = None, **kwargs ): - super(DataBoxDiskJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, expected_data_size_in_terabytes=expected_data_size_in_terabytes, **kwargs) + super(DataBoxDiskJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) self.job_details_type = 'DataBoxDisk' # type: str self.preferred_disks = preferred_disks self.copy_progress = None @@ -1286,11 +1298,11 @@ class JobSecrets(msrest.serialization.Model): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_11_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError """ _validation = { @@ -1328,13 +1340,13 @@ class DataBoxDiskJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_11_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar disk_secrets: Contains the list of secrets object for that device. - :vartype disk_secrets: list[~azure.mgmt.databox.models.DiskSecret] + :vartype disk_secrets: list[~azure.mgmt.databox.v2020_11_01.models.DiskSecret] :ivar pass_key: PassKey for the disk Job. :vartype pass_key: str :ivar is_passkey_user_defined: Whether passkey was provided by user. @@ -1379,7 +1391,7 @@ class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type copy_log_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type copy_log_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar account_name: Account name. :vartype account_name: str :ivar copy_log_link: Link for copy logs. @@ -1422,37 +1434,37 @@ class DataBoxHeavyJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_11_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_11_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_11_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_11_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_11_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_11_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2020_11_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar copy_progress: Copy progress per account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_11_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox Heavy. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -1471,7 +1483,6 @@ class DataBoxHeavyJobDetails(JobDetails): 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'key_encryption_key': {'readonly': True}, 'copy_progress': {'readonly': True}, } @@ -1489,7 +1500,7 @@ class DataBoxHeavyJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } @@ -1502,11 +1513,12 @@ def __init__( data_import_details: Optional[List["DataImportDetails"]] = None, data_export_details: Optional[List["DataExportDetails"]] = None, preferences: Optional["Preferences"] = None, - expected_data_size_in_terabytes: Optional[int] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, device_password: Optional[str] = None, **kwargs ): - super(DataBoxHeavyJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, expected_data_size_in_terabytes=expected_data_size_in_terabytes, **kwargs) + super(DataBoxHeavyJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) self.job_details_type = 'DataBoxHeavy' # type: str self.copy_progress = None self.device_password = device_password @@ -1521,13 +1533,13 @@ class DataBoxHeavyJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_11_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. - :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.models.DataBoxHeavySecret] + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2020_11_01.models.DataBoxHeavySecret] """ _validation = { @@ -1563,12 +1575,14 @@ class DataBoxHeavySecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2020_11_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2020_11_01.models.AccountCredentialDetails] """ _validation = { @@ -1607,37 +1621,37 @@ class DataBoxJobDetails(JobDetails): All required parameters must be populated in order to send to Azure. :ivar job_stages: List of stages that run in the job. - :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :vartype job_stages: list[~azure.mgmt.databox.v2020_11_01.models.JobStages] :param contact_details: Required. Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_11_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :ivar delivery_package: Delivery package shipping details. - :vartype delivery_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype delivery_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :ivar return_package: Return package shipping details. - :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :vartype return_package: ~azure.mgmt.databox.v2020_11_01.models.PackageShippingDetails :param data_import_details: Details of the data to be imported into azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_11_01.models.DataImportDetails] :param data_export_details: Details of the data to be exported from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_11_01.models.DataExportDetails] :param job_details_type: Required. Indicates the type of job details.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_details_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_details_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :param preferences: Preferences for the order. - :type preferences: ~azure.mgmt.databox.models.Preferences + :type preferences: ~azure.mgmt.databox.v2020_11_01.models.Preferences :ivar copy_log_details: List of copy log details. - :vartype copy_log_details: list[~azure.mgmt.databox.models.CopyLogDetails] + :vartype copy_log_details: list[~azure.mgmt.databox.v2020_11_01.models.CopyLogDetails] :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. :vartype reverse_shipment_label_sas_key: str :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. :vartype chain_of_custody_sas_key: str - :ivar key_encryption_key: Details about which key encryption type is being used. - :vartype key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey - :param expected_data_size_in_terabytes: The expected size of the data, which needs to be + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2020_11_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :type expected_data_size_in_tera_bytes: int :ivar copy_progress: Copy progress per storage account. - :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + :vartype copy_progress: list[~azure.mgmt.databox.v2020_11_01.models.CopyProgress] :param device_password: Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be @@ -1656,7 +1670,6 @@ class DataBoxJobDetails(JobDetails): 'copy_log_details': {'readonly': True}, 'reverse_shipment_label_sas_key': {'readonly': True}, 'chain_of_custody_sas_key': {'readonly': True}, - 'key_encryption_key': {'readonly': True}, 'copy_progress': {'readonly': True}, } @@ -1674,7 +1687,7 @@ class DataBoxJobDetails(JobDetails): 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, 'device_password': {'key': 'devicePassword', 'type': 'str'}, } @@ -1687,11 +1700,12 @@ def __init__( data_import_details: Optional[List["DataImportDetails"]] = None, data_export_details: Optional[List["DataExportDetails"]] = None, preferences: Optional["Preferences"] = None, - expected_data_size_in_terabytes: Optional[int] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, device_password: Optional[str] = None, **kwargs ): - super(DataBoxJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, expected_data_size_in_terabytes=expected_data_size_in_terabytes, **kwargs) + super(DataBoxJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) self.job_details_type = 'DataBox' # type: str self.copy_progress = None self.device_password = device_password @@ -1706,13 +1720,13 @@ class DataboxJobSecrets(JobSecrets): :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type job_secrets_type: str or ~azure.mgmt.databox.models.ClassDiscriminator + :type job_secrets_type: str or ~azure.mgmt.databox.v2020_11_01.models.ClassDiscriminator :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. - :vartype dc_access_security_code: ~azure.mgmt.databox.models.DcAccessSecurityCode + :vartype dc_access_security_code: ~azure.mgmt.databox.v2020_11_01.models.DcAccessSecurityCode :ivar error: Error while fetching the secrets. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :param pod_secrets: Contains the list of secret objects for a job. - :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + :type pod_secrets: list[~azure.mgmt.databox.v2020_11_01.models.DataBoxSecret] """ _validation = { @@ -1752,7 +1766,7 @@ class ScheduleAvailabilityRequest(msrest.serialization.Model): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -1795,7 +1809,7 @@ class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -1832,12 +1846,14 @@ class DataBoxSecret(msrest.serialization.Model): :ivar device_password: Password for out of the box experience on device. :vartype device_password: str :ivar network_configurations: Network configuration of the appliance. - :vartype network_configurations: list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :vartype network_configurations: + list[~azure.mgmt.databox.v2020_11_01.models.ApplianceNetworkConfiguration] :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the device. :vartype encoded_validation_cert_pub_key: str :ivar account_credential_details: Per account level access credentials. - :vartype account_credential_details: list[~azure.mgmt.databox.models.AccountCredentialDetails] + :vartype account_credential_details: + list[~azure.mgmt.databox.v2020_11_01.models.AccountCredentialDetails] """ _validation = { @@ -1874,12 +1890,12 @@ class DataExportDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param transfer_configuration: Required. Configuration for the data transfer. - :type transfer_configuration: ~azure.mgmt.databox.models.TransferConfiguration + :type transfer_configuration: ~azure.mgmt.databox.v2020_11_01.models.TransferConfiguration :param log_collection_level: Level of the logs to be collected. Possible values include: - "Error", "Verbose". - :type log_collection_level: str or ~azure.mgmt.databox.models.LogCollectionLevel + "Error", "Verbose". Default value: "Error". + :type log_collection_level: str or ~azure.mgmt.databox.v2020_11_01.models.LogCollectionLevel :param account_details: Required. Account details of the data to be transferred. - :type account_details: ~azure.mgmt.databox.models.DataAccountDetails + :type account_details: ~azure.mgmt.databox.v2020_11_01.models.DataAccountDetails """ _validation = { @@ -1898,7 +1914,7 @@ def __init__( *, transfer_configuration: "TransferConfiguration", account_details: "DataAccountDetails", - log_collection_level: Optional[Union[str, "LogCollectionLevel"]] = None, + log_collection_level: Optional[Union[str, "LogCollectionLevel"]] = "Error", **kwargs ): super(DataExportDetails, self).__init__(**kwargs) @@ -1913,7 +1929,7 @@ class DataImportDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param account_details: Required. Account details of the data to be transferred. - :type account_details: ~azure.mgmt.databox.models.DataAccountDetails + :type account_details: ~azure.mgmt.databox.v2020_11_01.models.DataAccountDetails """ _validation = { @@ -1973,17 +1989,18 @@ class DataTransferDetailsValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :param data_export_details: List of DataTransfer details to be used to export data from azure. - :type data_export_details: list[~azure.mgmt.databox.models.DataExportDetails] + :type data_export_details: list[~azure.mgmt.databox.v2020_11_01.models.DataExportDetails] :param data_import_details: List of DataTransfer details to be used to import data to azure. - :type data_import_details: list[~azure.mgmt.databox.models.DataImportDetails] + :type data_import_details: list[~azure.mgmt.databox.v2020_11_01.models.DataImportDetails] :param device_type: Required. Device type. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransferType """ _validation = { @@ -2028,12 +2045,13 @@ class DataTransferDetailsValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar status: Data transfer details validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.ValidationStatus """ _validation = { @@ -2067,8 +2085,8 @@ class DcAccessSecurityCode(msrest.serialization.Model): """ _attribute_map = { - 'reverse_dc_access_code': {'key': 'reverseDcAccessCode', 'type': 'str'}, - 'forward_dc_access_code': {'key': 'forwardDcAccessCode', 'type': 'str'}, + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, } def __init__( @@ -2126,38 +2144,38 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str - :param expected_data_size_in_terabytes: Required. The expected size of the data, which needs to - be transferred in this job, in terabytes. - :type expected_data_size_in_terabytes: int + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int """ _validation = { 'storage_location': {'required': True}, 'sku_name': {'required': True}, - 'expected_data_size_in_terabytes': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, } _attribute_map = { 'storage_location': {'key': 'storageLocation', 'type': 'str'}, 'sku_name': {'key': 'skuName', 'type': 'str'}, 'country': {'key': 'country', 'type': 'str'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } def __init__( self, *, storage_location: str, - expected_data_size_in_terabytes: int, + expected_data_size_in_tera_bytes: int, country: Optional[str] = None, **kwargs ): super(DiskScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) self.sku_name = 'DataBoxDisk' # type: str - self.expected_data_size_in_terabytes = expected_data_size_in_terabytes + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes class DiskSecret(msrest.serialization.Model): @@ -2195,8 +2213,8 @@ class EncryptionPreferences(msrest.serialization.Model): """Preferences related to the Encryption. :param double_encryption: Defines secondary layer of software-based encryption enablement. - Possible values include: "Enabled", "Disabled". - :type double_encryption: str or ~azure.mgmt.databox.models.DoubleEncryption + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type double_encryption: str or ~azure.mgmt.databox.v2020_11_01.models.DoubleEncryption """ _attribute_map = { @@ -2206,7 +2224,7 @@ class EncryptionPreferences(msrest.serialization.Model): def __init__( self, *, - double_encryption: Optional[Union[str, "DoubleEncryption"]] = None, + double_encryption: Optional[Union[str, "DoubleEncryption"]] = "Disabled", **kwargs ): super(EncryptionPreferences, self).__init__(**kwargs) @@ -2223,7 +2241,7 @@ class ErrorDetail(msrest.serialization.Model): :param message: Required. :type message: str :param details: - :type details: list[~azure.mgmt.databox.models.Details] + :type details: list[~azure.mgmt.databox.v2020_11_01.models.Details] :param target: :type target: str """ @@ -2263,7 +2281,7 @@ class FilterFileDetails(msrest.serialization.Model): :param filter_file_type: Required. Type of the filter file. Possible values include: "AzureBlob", "AzureFile". - :type filter_file_type: str or ~azure.mgmt.databox.models.FilterFileType + :type filter_file_type: str or ~azure.mgmt.databox.v2020_11_01.models.FilterFileType :param filter_file_path: Required. Path of the file that contains the details of all items to transfer. :type filter_file_path: str @@ -2301,7 +2319,7 @@ class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param country: Country in which storage location should be supported. :type country: str """ @@ -2334,7 +2352,7 @@ class IdentityProperties(msrest.serialization.Model): :param type: Managed service identity type. :type type: str :param user_assigned: User assigned identity properties. - :type user_assigned: ~azure.mgmt.databox.models.UserAssignedProperties + :type user_assigned: ~azure.mgmt.databox.v2020_11_01.models.UserAssignedProperties """ _attribute_map = { @@ -2389,9 +2407,9 @@ class Resource(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2020_11_01.models.Sku :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_11_01.models.ResourceIdentity """ _validation = { @@ -2438,18 +2456,20 @@ class JobResource(Resource): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param sku: Required. The sku type. - :type sku: ~azure.mgmt.databox.models.Sku + :type sku: ~azure.mgmt.databox.v2020_11_01.models.Sku :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_11_01.models.ResourceIdentity :ivar name: Name of the object. :vartype name: str :ivar id: Id of the object. :vartype id: str :ivar type: Type of the object. :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.databox.v2020_11_01.models.SystemData :param transfer_type: Required. Type of the data transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransferType :ivar is_cancellable: Describes whether the job is cancellable or not. :vartype is_cancellable: bool :ivar is_deletable: Describes whether the job is deletable or not. @@ -2463,20 +2483,20 @@ class JobResource(Resource): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype status: str or ~azure.mgmt.databox.models.StageName + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.StageName :ivar start_time: Time at which the job was started in UTC ISO 8601 format. :vartype start_time: ~datetime.datetime :ivar error: Top level error for the job. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :param details: Details of a job run. This field will only be sent for expand details filter. - :type details: ~azure.mgmt.databox.models.JobDetails + :type details: ~azure.mgmt.databox.v2020_11_01.models.JobDetails :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", - "Scheduled". - :type delivery_type: str or ~azure.mgmt.databox.models.JobDeliveryType + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2020_11_01.models.JobDeliveryType :param delivery_info: Delivery Info of Job. - :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo + :type delivery_info: ~azure.mgmt.databox.v2020_11_01.models.JobDeliveryInfo :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. :vartype is_cancellable_without_fee: bool """ @@ -2487,6 +2507,7 @@ class JobResource(Resource): 'name': {'readonly': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'transfer_type': {'required': True}, 'is_cancellable': {'readonly': True}, 'is_deletable': {'readonly': True}, @@ -2507,6 +2528,7 @@ class JobResource(Resource): 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'transfer_type': {'key': 'properties.transferType', 'type': 'str'}, 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, @@ -2531,7 +2553,7 @@ def __init__( tags: Optional[Dict[str, str]] = None, identity: Optional["ResourceIdentity"] = None, details: Optional["JobDetails"] = None, - delivery_type: Optional[Union[str, "JobDeliveryType"]] = None, + delivery_type: Optional[Union[str, "JobDeliveryType"]] = "NonScheduled", delivery_info: Optional["JobDeliveryInfo"] = None, **kwargs ): @@ -2539,6 +2561,7 @@ def __init__( self.name = None self.id = None self.type = None + self.system_data = None self.transfer_type = transfer_type self.is_cancellable = None self.is_deletable = None @@ -2558,7 +2581,7 @@ class JobResourceList(msrest.serialization.Model): """Job Resource Collection. :param value: List of job resources. - :type value: list[~azure.mgmt.databox.models.JobResource] + :type value: list[~azure.mgmt.databox.v2020_11_01.models.JobResource] :param next_link: Link for the next set of job resources. :type next_link: str """ @@ -2587,9 +2610,9 @@ class JobResourceUpdateParameter(msrest.serialization.Model): can be used in viewing and grouping this resource (across resource groups). :type tags: dict[str, str] :param identity: Msi identity of the resource. - :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :type identity: ~azure.mgmt.databox.v2020_11_01.models.ResourceIdentity :param details: Details of a job to be updated. - :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :type details: ~azure.mgmt.databox.v2020_11_01.models.UpdateJobDetails """ _attribute_map = { @@ -2622,17 +2645,17 @@ class JobStages(msrest.serialization.Model): "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". - :vartype stage_name: str or ~azure.mgmt.databox.models.StageName + :vartype stage_name: str or ~azure.mgmt.databox.v2020_11_01.models.StageName :ivar display_name: Display name of the job stage. :vartype display_name: str :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors", "WaitingForCustomerAction", "SucceededWithWarnings". - :vartype stage_status: str or ~azure.mgmt.databox.models.StageStatus + :vartype stage_status: str or ~azure.mgmt.databox.v2020_11_01.models.StageStatus :ivar stage_time: Time for the job stage in UTC ISO 8601 format. :vartype stage_time: ~datetime.datetime :ivar job_stage_details: Job Stage Details. - :vartype job_stage_details: object + :vartype job_stage_details: any """ _validation = { @@ -2669,10 +2692,10 @@ class KeyEncryptionKey(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param kek_type: Required. Type of encryption key used for key encryption. Possible values - include: "MicrosoftManaged", "CustomerManaged". - :type kek_type: str or ~azure.mgmt.databox.models.KekType + include: "MicrosoftManaged", "CustomerManaged". Default value: "MicrosoftManaged". + :type kek_type: str or ~azure.mgmt.databox.v2020_11_01.models.KekType :param identity_properties: Managed identity properties used for key encryption. - :type identity_properties: ~azure.mgmt.databox.models.IdentityProperties + :type identity_properties: ~azure.mgmt.databox.v2020_11_01.models.IdentityProperties :param kek_url: Key encryption key. It is required in case of Customer managed KekType. :type kek_url: str :param kek_vault_resource_id: Kek vault resource id. It is required in case of Customer managed @@ -2694,7 +2717,7 @@ class KeyEncryptionKey(msrest.serialization.Model): def __init__( self, *, - kek_type: Union[str, "KekType"], + kek_type: Union[str, "KekType"] = "MicrosoftManaged", identity_properties: Optional["IdentityProperties"] = None, kek_url: Optional[str] = None, kek_vault_resource_id: Optional[str] = None, @@ -2714,7 +2737,7 @@ class ManagedDiskDetails(DataAccountDetails): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -2763,7 +2786,7 @@ class NotificationPreference(msrest.serialization.Model): :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". - :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName + :type stage_name: str or ~azure.mgmt.databox.v2020_11_01.models.NotificationStageName :param send_notification: Required. Notification is required or not. :type send_notification: bool """ @@ -2782,7 +2805,7 @@ def __init__( self, *, stage_name: Union[str, "NotificationStageName"], - send_notification: bool, + send_notification: bool = True, **kwargs ): super(NotificationPreference, self).__init__(**kwargs) @@ -2799,9 +2822,9 @@ class Operation(msrest.serialization.Model): {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. :vartype name: str :ivar display: Operation display values. - :vartype display: ~azure.mgmt.databox.models.OperationDisplay + :vartype display: ~azure.mgmt.databox.v2020_11_01.models.OperationDisplay :ivar properties: Operation properties. - :vartype properties: object + :vartype properties: any :ivar origin: Origin of the operation. Can be : user|system|user,system. :vartype origin: str :param is_data_action: Indicates whether the operation is a data action. @@ -2879,7 +2902,7 @@ class OperationList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of operations. - :vartype value: list[~azure.mgmt.databox.models.Operation] + :vartype value: list[~azure.mgmt.databox.v2020_11_01.models.Operation] :param next_link: Link for the next set of operations. :type next_link: str """ @@ -2945,9 +2968,9 @@ class Preferences(msrest.serialization.Model): :param preferred_data_center_region: Preferred data center region. :type preferred_data_center_region: list[str] :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2020_11_01.models.TransportPreferences :param encryption_preferences: Preferences related to the Encryption. - :type encryption_preferences: ~azure.mgmt.databox.models.EncryptionPreferences + :type encryption_preferences: ~azure.mgmt.databox.v2020_11_01.models.EncryptionPreferences """ _attribute_map = { @@ -2979,12 +3002,13 @@ class PreferencesValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :param preference: Preference of transport and data center. - :type preference: ~azure.mgmt.databox.models.Preferences + :type preference: ~azure.mgmt.databox.v2020_11_01.models.Preferences :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName """ _validation = { @@ -3022,12 +3046,13 @@ class PreferencesValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar status: Validation status of requested data center and transport. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.ValidationStatus """ _validation = { @@ -3056,10 +3081,12 @@ class RegionConfigurationRequest(msrest.serialization.Model): :param schedule_availability_request: Request body to get the availability for scheduling orders. - :type schedule_availability_request: ~azure.mgmt.databox.models.ScheduleAvailabilityRequest + :type schedule_availability_request: + ~azure.mgmt.databox.v2020_11_01.models.ScheduleAvailabilityRequest :param transport_availability_request: Request body to get the transport availability for given sku. - :type transport_availability_request: ~azure.mgmt.databox.models.TransportAvailabilityRequest + :type transport_availability_request: + ~azure.mgmt.databox.v2020_11_01.models.TransportAvailabilityRequest """ _attribute_map = { @@ -3086,10 +3113,10 @@ class RegionConfigurationResponse(msrest.serialization.Model): :ivar schedule_availability_response: Schedule availability for given sku in a region. :vartype schedule_availability_response: - ~azure.mgmt.databox.models.ScheduleAvailabilityResponse + ~azure.mgmt.databox.v2020_11_01.models.ScheduleAvailabilityResponse :ivar transport_availability_response: Transport options available for given sku in a region. :vartype transport_availability_response: - ~azure.mgmt.databox.models.TransportAvailabilityResponse + ~azure.mgmt.databox.v2020_11_01.models.TransportAvailabilityResponse """ _validation = { @@ -3123,7 +3150,8 @@ class ResourceIdentity(msrest.serialization.Model): :ivar tenant_id: Home Tenant Id. :vartype tenant_id: str :param user_assigned_identities: User Assigned Identities. - :type user_assigned_identities: dict[str, ~azure.mgmt.databox.models.UserAssignedIdentity] + :type user_assigned_identities: dict[str, + ~azure.mgmt.databox.v2020_11_01.models.UserAssignedIdentity] """ _validation = { @@ -3141,7 +3169,7 @@ class ResourceIdentity(msrest.serialization.Model): def __init__( self, *, - type: Optional[str] = None, + type: Optional[str] = "None", user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None, **kwargs ): @@ -3185,14 +3213,15 @@ class ShareCredentialDetails(msrest.serialization.Model): :ivar share_name: Name of the share. :vartype share_name: str :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", - "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk", "AzurePremiumFiles". - :vartype share_type: str or ~azure.mgmt.databox.models.ShareDestinationFormatType + "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". + :vartype share_type: str or ~azure.mgmt.databox.v2020_11_01.models.ShareDestinationFormatType :ivar user_name: User name for the share. :vartype user_name: str :ivar password: Password for the share. :vartype password: str :ivar supported_access_protocols: Access protocols supported on the device. - :vartype supported_access_protocols: list[str or ~azure.mgmt.databox.models.AccessProtocol] + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2020_11_01.models.AccessProtocol] """ _validation = { @@ -3319,8 +3348,8 @@ class ShippingAddress(msrest.serialization.Model): :param company_name: Name of the company. :type company_name: str :param address_type: Type of address. Possible values include: "None", "Residential", - "Commercial". - :type address_type: str or ~azure.mgmt.databox.models.AddressType + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2020_11_01.models.AddressType """ _validation = { @@ -3353,7 +3382,7 @@ def __init__( postal_code: Optional[str] = None, zip_extended_code: Optional[str] = None, company_name: Optional[str] = None, - address_type: Optional[Union[str, "AddressType"]] = None, + address_type: Optional[Union[str, "AddressType"]] = "None", **kwargs ): super(ShippingAddress, self).__init__(**kwargs) @@ -3376,7 +3405,7 @@ class Sku(msrest.serialization.Model): :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type name: str or ~azure.mgmt.databox.models.SkuName + :type name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param display_name: The display name of the sku. :type display_name: str :param family: The sku family. @@ -3416,13 +3445,14 @@ class SkuAvailabilityValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", "ExportFromAzure". - :type transfer_type: str or ~azure.mgmt.databox.models.TransferType + :type transfer_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransferType :param country: Required. ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. :type country: str @@ -3475,12 +3505,13 @@ class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.ValidationStatus """ _validation = { @@ -3577,21 +3608,21 @@ class SkuInformation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar sku: The Sku. - :vartype sku: ~azure.mgmt.databox.models.Sku + :vartype sku: ~azure.mgmt.databox.v2020_11_01.models.Sku :ivar enabled: The sku is enabled or not. :vartype enabled: bool :ivar data_location_to_service_location_map: The map of data location to service location. :vartype data_location_to_service_location_map: - list[~azure.mgmt.databox.models.DataLocationToServiceLocationMap] + list[~azure.mgmt.databox.v2020_11_01.models.DataLocationToServiceLocationMap] :ivar capacity: Capacity of the Sku. - :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :vartype capacity: ~azure.mgmt.databox.v2020_11_01.models.SkuCapacity :ivar costs: Cost of the Sku. - :vartype costs: list[~azure.mgmt.databox.models.SkuCost] + :vartype costs: list[~azure.mgmt.databox.v2020_11_01.models.SkuCost] :ivar api_versions: Api versions that support this Sku. :vartype api_versions: list[str] :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". - :vartype disabled_reason: str or ~azure.mgmt.databox.models.SkuDisabledReason + :vartype disabled_reason: str or ~azure.mgmt.databox.v2020_11_01.models.SkuDisabledReason :ivar disabled_reason_message: Message for why the Sku is disabled. :vartype disabled_reason_message: str :ivar required_feature: Required feature to access the sku. @@ -3645,7 +3676,7 @@ class StorageAccountDetails(DataAccountDetails): :param data_account_type: Required. Account Type of the data to be transferred.Constant filled by server. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :param share_password: Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must @@ -3689,7 +3720,8 @@ class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator """ _validation = { @@ -3719,12 +3751,13 @@ class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInp server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :ivar error: Error code and message of validation response. - :vartype error: ~azure.mgmt.databox.models.CloudError + :vartype error: ~azure.mgmt.databox.v2020_11_01.models.CloudError :ivar status: Validation status of subscription permission to create job. Possible values include: "Valid", "Invalid", "Skipped". - :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.ValidationStatus """ _validation = { @@ -3748,6 +3781,58 @@ def __init__( self.status = None +class SystemData(msrest.serialization.Model): + """Provides details about resource creation and update time. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_by: A string identifier for the identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource: user, application, + managedIdentity. + :vartype created_by_type: str + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: A string identifier for the identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource: user, + application, managedIdentity. + :vartype last_modified_by_type: str + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _validation = { + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + } + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = None + self.created_by_type = None + self.created_at = None + self.last_modified_by = None + self.last_modified_by_type = None + self.last_modified_at = None + + class TransferAllDetails(msrest.serialization.Model): """Details to transfer all data. @@ -3755,7 +3840,7 @@ class TransferAllDetails(msrest.serialization.Model): :param data_account_type: Required. Type of the account of data. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :param transfer_all_blobs: To indicate if all Azure blobs have to be transferred. :type transfer_all_blobs: bool :param transfer_all_files: To indicate if all Azure Files have to be transferred. @@ -3793,14 +3878,16 @@ class TransferConfiguration(msrest.serialization.Model): :param transfer_configuration_type: Required. Type of the configuration for transfer. Possible values include: "TransferAll", "TransferUsingFilter". - :type transfer_configuration_type: str or ~azure.mgmt.databox.models.TransferConfigurationType + :type transfer_configuration_type: str or + ~azure.mgmt.databox.v2020_11_01.models.TransferConfigurationType :param transfer_filter_details: Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. :type transfer_filter_details: - ~azure.mgmt.databox.models.TransferConfigurationTransferFilterDetails + ~azure.mgmt.databox.v2020_11_01.models.TransferConfigurationTransferFilterDetails :param transfer_all_details: Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. - :type transfer_all_details: ~azure.mgmt.databox.models.TransferConfigurationTransferAllDetails + :type transfer_all_details: + ~azure.mgmt.databox.v2020_11_01.models.TransferConfigurationTransferAllDetails """ _validation = { @@ -3831,7 +3918,7 @@ class TransferConfigurationTransferAllDetails(msrest.serialization.Model): """Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. :param include: Details to transfer all data. - :type include: ~azure.mgmt.databox.models.TransferAllDetails + :type include: ~azure.mgmt.databox.v2020_11_01.models.TransferAllDetails """ _attribute_map = { @@ -3852,7 +3939,7 @@ class TransferConfigurationTransferFilterDetails(msrest.serialization.Model): """Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. :param include: Details of the filtering the transfer of data. - :type include: ~azure.mgmt.databox.models.TransferFilterDetails + :type include: ~azure.mgmt.databox.v2020_11_01.models.TransferFilterDetails """ _attribute_map = { @@ -3876,13 +3963,13 @@ class TransferFilterDetails(msrest.serialization.Model): :param data_account_type: Required. Type of the account of data. Possible values include: "StorageAccount", "ManagedDisk". - :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :type data_account_type: str or ~azure.mgmt.databox.v2020_11_01.models.DataAccountType :param blob_filter_details: Filter details to transfer blobs. - :type blob_filter_details: ~azure.mgmt.databox.models.BlobFilterDetails + :type blob_filter_details: ~azure.mgmt.databox.v2020_11_01.models.BlobFilterDetails :param azure_file_filter_details: Filter details to transfer Azure files. - :type azure_file_filter_details: ~azure.mgmt.databox.models.AzureFileFilterDetails + :type azure_file_filter_details: ~azure.mgmt.databox.v2020_11_01.models.AzureFileFilterDetails :param filter_file_details: Details of the filter files to be used for data transfer. - :type filter_file_details: list[~azure.mgmt.databox.models.FilterFileDetails] + :type filter_file_details: list[~azure.mgmt.databox.v2020_11_01.models.FilterFileDetails] """ _validation = { @@ -3919,7 +4006,7 @@ class TransportAvailabilityDetails(msrest.serialization.Model): :ivar shipment_type: Transport Shipment Type supported for given region. Possible values include: "CustomerManaged", "MicrosoftManaged". - :vartype shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :vartype shipment_type: str or ~azure.mgmt.databox.v2020_11_01.models.TransportShipmentTypes """ _validation = { @@ -3943,7 +4030,7 @@ class TransportAvailabilityRequest(msrest.serialization.Model): :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type sku_name: str or ~azure.mgmt.databox.models.SkuName + :type sku_name: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName """ _attribute_map = { @@ -3967,7 +4054,7 @@ class TransportAvailabilityResponse(msrest.serialization.Model): :ivar transport_availability_details: List of transport availability details for given region. :vartype transport_availability_details: - list[~azure.mgmt.databox.models.TransportAvailabilityDetails] + list[~azure.mgmt.databox.v2020_11_01.models.TransportAvailabilityDetails] """ _validation = { @@ -3993,7 +4080,8 @@ class TransportPreferences(msrest.serialization.Model): :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". - :type preferred_shipment_type: str or ~azure.mgmt.databox.models.TransportShipmentTypes + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2020_11_01.models.TransportShipmentTypes """ _validation = { @@ -4022,7 +4110,7 @@ class UnencryptedCredentials(msrest.serialization.Model): :ivar job_name: Name of the job. :vartype job_name: str :ivar job_secrets: Secrets related to this job. - :vartype job_secrets: ~azure.mgmt.databox.models.JobSecrets + :vartype job_secrets: ~azure.mgmt.databox.v2020_11_01.models.JobSecrets """ _validation = { @@ -4048,7 +4136,7 @@ class UnencryptedCredentialsList(msrest.serialization.Model): """List of unencrypted credentials for accessing device. :param value: List of unencrypted credentials. - :type value: list[~azure.mgmt.databox.models.UnencryptedCredentials] + :type value: list[~azure.mgmt.databox.v2020_11_01.models.UnencryptedCredentials] :param next_link: Link for the next set of unencrypted credentials. :type next_link: str """ @@ -4074,11 +4162,11 @@ class UpdateJobDetails(msrest.serialization.Model): """Job details for update. :param contact_details: Contact details for notification and shipping. - :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :type contact_details: ~azure.mgmt.databox.v2020_11_01.models.ContactDetails :param shipping_address: Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :param key_encryption_key: Key encryption key for the job. - :type key_encryption_key: ~azure.mgmt.databox.models.KeyEncryptionKey + :type key_encryption_key: ~azure.mgmt.databox.v2020_11_01.models.KeyEncryptionKey """ _attribute_map = { @@ -4161,14 +4249,15 @@ class ValidateAddress(ValidationInputRequest): server. Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", "ValidateDataTransferDetails". - :type validation_type: str or ~azure.mgmt.databox.models.ValidationInputDiscriminator + :type validation_type: str or + ~azure.mgmt.databox.v2020_11_01.models.ValidationInputDiscriminator :param shipping_address: Required. Shipping address of the customer. - :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :type shipping_address: ~azure.mgmt.databox.v2020_11_01.models.ShippingAddress :param device_type: Required. Device type to be used for the job. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". - :type device_type: str or ~azure.mgmt.databox.models.SkuName + :type device_type: str or ~azure.mgmt.databox.v2020_11_01.models.SkuName :param transport_preferences: Preferences related to the shipment logistics of the sku. - :type transport_preferences: ~azure.mgmt.databox.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.databox.v2020_11_01.models.TransportPreferences """ _validation = { @@ -4206,10 +4295,11 @@ class ValidationResponse(msrest.serialization.Model): :ivar status: Overall validation status. Possible values include: "AllValidToProceed", "InputsRevisitRequired", "CertainInputValidationsSkipped". - :vartype status: str or ~azure.mgmt.databox.models.OverallValidationStatus + :vartype status: str or ~azure.mgmt.databox.v2020_11_01.models.OverallValidationStatus :ivar individual_response_details: List of response details contain validationType and its response as key and value respectively. - :vartype individual_response_details: list[~azure.mgmt.databox.models.ValidationInputResponse] + :vartype individual_response_details: + list[~azure.mgmt.databox.v2020_11_01.models.ValidationInputResponse] """ _validation = { diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_jobs_operations.py index 5f8d902f7a403..c0595724e8b3a 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_jobs_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_jobs_operations.py @@ -32,7 +32,7 @@ class JobsOperations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2020_11_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2020_11_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -110,7 +110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -137,7 +137,7 @@ def list_by_resource_group( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.JobResourceList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2020_11_01.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] @@ -188,7 +188,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -219,7 +219,7 @@ def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.JobResource + :rtype: ~azure.mgmt.databox.v2020_11_01.models.JobResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] @@ -255,7 +255,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobResource', pipeline_response) @@ -310,7 +310,7 @@ def _create_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -340,15 +340,15 @@ def begin_create( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource: Job details from request body. - :type job_resource: ~azure.mgmt.databox.models.JobResource + :type job_resource: ~azure.mgmt.databox.v2020_11_01.models.JobResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2020_11_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -435,7 +435,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -459,8 +459,8 @@ def begin_delete( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -556,7 +556,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -586,18 +586,18 @@ def begin_update( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param job_resource_update_parameter: Job update parameters from request body. - :type job_resource_update_parameter: ~azure.mgmt.databox.models.JobResourceUpdateParameter + :type job_resource_update_parameter: ~azure.mgmt.databox.v2020_11_01.models.JobResourceUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either JobResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.models.JobResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2020_11_01.models.JobResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -663,10 +663,10 @@ def book_shipment_pick_up( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param shipment_pick_up_request: Details of shipment pick up request. - :type shipment_pick_up_request: ~azure.mgmt.databox.models.ShipmentPickUpRequest + :type shipment_pick_up_request: ~azure.mgmt.databox.v2020_11_01.models.ShipmentPickUpRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ShipmentPickUpResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse + :rtype: ~azure.mgmt.databox.v2020_11_01.models.ShipmentPickUpResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] @@ -705,7 +705,7 @@ def book_shipment_pick_up( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) @@ -732,7 +732,7 @@ def cancel( must be between 3 and 24 characters in length and use any alphanumeric and underscore only. :type job_name: str :param cancellation_reason: Reason for cancellation. - :type cancellation_reason: ~azure.mgmt.databox.models.CancellationReason + :type cancellation_reason: ~azure.mgmt.databox.v2020_11_01.models.CancellationReason :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 @@ -774,7 +774,7 @@ def cancel( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -798,7 +798,7 @@ def list_credentials( :type job_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.UnencryptedCredentialsList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2020_11_01.models.UnencryptedCredentialsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] @@ -848,7 +848,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_operations.py index 42d935a9c74eb..e8ca3577fddbe 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_operations.py @@ -30,7 +30,7 @@ class Operations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2020_11_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.OperationList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2020_11_01.models.OperationList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_service_operations.py index 0d52bed1577f0..c7c140aafbf9d 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_service_operations.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_service_operations.py @@ -30,7 +30,7 @@ class ServiceOperations(object): 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.databox.models + :type models: ~azure.mgmt.databox.v2020_11_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -61,10 +61,10 @@ def list_available_skus_by_resource_group( :param location: The location of the resource. :type location: str :param available_sku_request: Filters for showing the available skus. - :type available_sku_request: ~azure.mgmt.databox.models.AvailableSkuRequest + :type available_sku_request: ~azure.mgmt.databox.v2020_11_01.models.AvailableSkuRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.models.AvailableSkusResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2020_11_01.models.AvailableSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] @@ -122,7 +122,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -146,10 +146,10 @@ def validate_address( :param location: The location of the resource. :type location: str :param validate_address: Shipping address of the customer. - :type validate_address: ~azure.mgmt.databox.models.ValidateAddress + :type validate_address: ~azure.mgmt.databox.v2020_11_01.models.ValidateAddress :keyword callable cls: A custom type or function that will be passed the direct response :return: AddressValidationOutput, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.AddressValidationOutput + :rtype: ~azure.mgmt.databox.v2020_11_01.models.AddressValidationOutput :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] @@ -187,7 +187,7 @@ def validate_address( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressValidationOutput', pipeline_response) @@ -213,10 +213,10 @@ def validate_inputs_by_resource_group( :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2020_11_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2020_11_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -255,7 +255,7 @@ def validate_inputs_by_resource_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidationResponse', pipeline_response) @@ -278,10 +278,10 @@ def validate_inputs( :param location: The location of the resource. :type location: str :param validation_request: Inputs of the customer. - :type validation_request: ~azure.mgmt.databox.models.ValidationRequest + :type validation_request: ~azure.mgmt.databox.v2020_11_01.models.ValidationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.ValidationResponse + :rtype: ~azure.mgmt.databox.v2020_11_01.models.ValidationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] @@ -319,7 +319,7 @@ def validate_inputs( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidationResponse', pipeline_response) @@ -343,10 +343,10 @@ def region_configuration( :param location: The location of the resource. :type location: str :param region_configuration_request: Request body to get the configuration for the region. - :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :type region_configuration_request: ~azure.mgmt.databox.v2020_11_01.models.RegionConfigurationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: RegionConfigurationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :rtype: ~azure.mgmt.databox.v2020_11_01.models.RegionConfigurationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] @@ -384,7 +384,7 @@ def region_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) @@ -412,10 +412,10 @@ def region_configuration_by_resource_group( :type location: str :param region_configuration_request: Request body to get the configuration for the region at resource group level. - :type region_configuration_request: ~azure.mgmt.databox.models.RegionConfigurationRequest + :type region_configuration_request: ~azure.mgmt.databox.v2020_11_01.models.RegionConfigurationRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: RegionConfigurationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse + :rtype: ~azure.mgmt.databox.v2020_11_01.models.RegionConfigurationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] @@ -454,7 +454,7 @@ def region_configuration_by_resource_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/__init__.py new file mode 100644 index 0000000000000..ae972ed54f84f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/__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 ._data_box_management_client import DataBoxManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['DataBoxManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_configuration.py new file mode 100644 index 0000000000000..049696b4be496 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_configuration.py @@ -0,0 +1,71 @@ +# 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 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 DataBoxManagementClientConfiguration(Configuration): + """Configuration for DataBoxManagementClient. + + 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 + :param subscription_id: The Subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataBoxManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-03-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-databox/{}'.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 = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_data_box_management_client.py new file mode 100644 index 0000000000000..979f75cf497ee --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_data_box_management_client.py @@ -0,0 +1,100 @@ +# 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.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import DataBoxManagementClientOperationsMixin +from .operations import ServiceOperations +from . import models + + +class DataBoxManagementClient(DataBoxManagementClientOperationsMixin): + """The DataBox Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.v2021_03_01.operations.Operations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.databox.v2021_03_01.operations.JobsOperations + :ivar service: ServiceOperations operations + :vartype service: azure.mgmt.databox.v2021_03_01.operations.ServiceOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataBoxManagementClientConfiguration(credential, subscription_id, **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._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> DataBoxManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_metadata.json b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_metadata.json new file mode 100644 index 0000000000000..47bb2193a75fd --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_metadata.json @@ -0,0 +1,123 @@ +{ + "chosen_version": "2021-03-01", + "total_api_version_list": ["2021-03-01"], + "client": { + "name": "DataBoxManagementClient", + "filename": "_data_box_management_client", + "description": "The DataBox Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"], \"._operations_mixin\": [\"DataBoxManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"], \"._operations_mixin\": [\"DataBoxManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The Subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The Subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "operations": "Operations", + "jobs": "JobsOperations", + "service": "ServiceOperations" + }, + "operation_mixins": { + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "operations": { + "mitigate" : { + "sync": { + "signature": "def mitigate(\n self,\n job_name, # type: str\n resource_group_name, # type: str\n mitigate_job_request, # type: \"_models.MitigateJobRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Request to mitigate for a given job.\n\n:param job_name: The name of the job Resource within the specified resource group. job names\n must be between 3 and 24 characters in length and use any alphanumeric and underscore only.\n:type job_name: str\n:param resource_group_name: The Resource Group Name.\n:type resource_group_name: str\n:param mitigate_job_request: Mitigation Request.\n:type mitigate_job_request: ~azure.mgmt.databox.v2021_03_01.models.MitigateJobRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def mitigate(\n self,\n job_name: str,\n resource_group_name: str,\n mitigate_job_request: \"_models.MitigateJobRequest\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Request to mitigate for a given job.\n\n:param job_name: The name of the job Resource within the specified resource group. job names\n must be between 3 and 24 characters in length and use any alphanumeric and underscore only.\n:type job_name: str\n:param resource_group_name: The Resource Group Name.\n:type resource_group_name: str\n:param mitigate_job_request: Mitigation Request.\n:type mitigate_job_request: ~azure.mgmt.databox.v2021_03_01.models.MitigateJobRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "job_name, resource_group_name, mitigate_job_request" + } + } + } +} \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_version.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_version.py new file mode 100644 index 0000000000000..e5754a47ce68f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/_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 = "1.0.0b1" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/__init__.py new file mode 100644 index 0000000000000..bb6b75a72db8d --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/__init__.py @@ -0,0 +1,10 @@ +# 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 ._data_box_management_client import DataBoxManagementClient +__all__ = ['DataBoxManagementClient'] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/_configuration.py new file mode 100644 index 0000000000000..b54eff7f1a307 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# 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 + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class DataBoxManagementClientConfiguration(Configuration): + """Configuration for DataBoxManagementClient. + + 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 + :param subscription_id: The Subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataBoxManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-03-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-databox/{}'.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 = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/_data_box_management_client.py new file mode 100644 index 0000000000000..1feaaea4d9949 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/_data_box_management_client.py @@ -0,0 +1,93 @@ +# 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, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import DataBoxManagementClientOperationsMixin +from .operations import ServiceOperations +from .. import models + + +class DataBoxManagementClient(DataBoxManagementClientOperationsMixin): + """The DataBox Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.v2021_03_01.aio.operations.Operations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.databox.v2021_03_01.aio.operations.JobsOperations + :ivar service: ServiceOperations operations + :vartype service: azure.mgmt.databox.v2021_03_01.aio.operations.ServiceOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataBoxManagementClientConfiguration(credential, subscription_id, **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._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DataBoxManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/__init__.py new file mode 100644 index 0000000000000..bd13cc67afb6e --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/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 ._operations import Operations +from ._jobs_operations import JobsOperations +from ._data_box_management_client_operations import DataBoxManagementClientOperationsMixin +from ._service_operations import ServiceOperations + +__all__ = [ + 'Operations', + 'JobsOperations', + 'DataBoxManagementClientOperationsMixin', + 'ServiceOperations', +] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_data_box_management_client_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_data_box_management_client_operations.py new file mode 100644 index 0000000000000..6386a82c49106 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_data_box_management_client_operations.py @@ -0,0 +1,86 @@ +# 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, 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, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataBoxManagementClientOperationsMixin: + + async def mitigate( + self, + job_name: str, + resource_group_name: str, + mitigate_job_request: "_models.MitigateJobRequest", + **kwargs: Any + ) -> None: + """Request to mitigate for a given job. + + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param mitigate_job_request: Mitigation Request. + :type mitigate_job_request: ~azure.mgmt.databox.v2021_03_01.models.MitigateJobRequest + :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', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.mitigate.metadata['url'] # type: ignore + path_format_arguments = { + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(mitigate_job_request, 'MitigateJobRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + mitigate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_jobs_operations.py new file mode 100644 index 0000000000000..a58c08683233c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_jobs_operations.py @@ -0,0 +1,844 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations: + """JobsOperations 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.databox.v2021_03_01.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 + + def list( + self, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.JobResourceList"]: + """Lists all the jobs available under the subscription. + + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_03_01.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.JobResourceList"]: + """Lists all the jobs available under the given resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_03_01.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} # type: ignore + + async def get( + self, + resource_group_name: str, + job_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.JobResource": + """Gets information about the specified job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param expand: $expand is supported on details parameter for job, which provides details on the + job stages. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobResource, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + job_name: str, + job_resource: "_models.JobResource", + **kwargs: Any + ) -> Optional["_models.JobResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource, 'JobResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + job_name: str, + job_resource: "_models.JobResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.JobResource"]: + """Creates a new job with the specified parameters. Existing job cannot be updated with this API + and should instead be updated with the Update job API. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource: Job details from request body. + :type job_resource: ~azure.mgmt.databox.v2021_03_01.models.JobResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2021_03_01.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + job_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + job_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + job_name: str, + job_resource_update_parameter: "_models.JobResourceUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.JobResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + job_name: str, + job_resource_update_parameter: "_models.JobResourceUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.JobResource"]: + """Updates the properties of an existing job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource_update_parameter: Job update parameters from request body. + :type job_resource_update_parameter: ~azure.mgmt.databox.v2021_03_01.models.JobResourceUpdateParameter + :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag + of the job on the server matches this value. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2021_03_01.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource_update_parameter=job_resource_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def book_shipment_pick_up( + self, + resource_group_name: str, + job_name: str, + shipment_pick_up_request: "_models.ShipmentPickUpRequest", + **kwargs: Any + ) -> "_models.ShipmentPickUpResponse": + """Book shipment pick up. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param shipment_pick_up_request: Details of shipment pick up request. + :type shipment_pick_up_request: ~azure.mgmt.databox.v2021_03_01.models.ShipmentPickUpRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShipmentPickUpResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.ShipmentPickUpResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} # type: ignore + + async def cancel( + self, + resource_group_name: str, + job_name: str, + cancellation_reason: "_models.CancellationReason", + **kwargs: Any + ) -> None: + """CancelJob. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.databox.v2021_03_01.models.CancellationReason + :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', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} # type: ignore + + def list_credentials( + self, + resource_group_name: str, + job_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.UnencryptedCredentialsList"]: + """This method gets the unencrypted secrets related to the job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_03_01.models.UnencryptedCredentialsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('UnencryptedCredentialsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_operations.py new file mode 100644 index 0000000000000..6c82656fb15d2 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_operations.py @@ -0,0 +1,105 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations 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.databox.v2021_03_01.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 + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationList"]: + """This method gets all the operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_03_01.models.OperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_service_operations.py new file mode 100644 index 0000000000000..73c9055dccdc1 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/aio/operations/_service_operations.py @@ -0,0 +1,456 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceOperations: + """ServiceOperations 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.databox.v2021_03_01.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 + + def list_available_skus_by_resource_group( + self, + resource_group_name: str, + location: str, + available_sku_request: "_models.AvailableSkuRequest", + **kwargs: Any + ) -> AsyncIterable["_models.AvailableSkusResult"]: + """This method provides the list of available skus for the given subscription, resource group and + location. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param available_sku_request: Filters for showing the available skus. + :type available_sku_request: ~azure.mgmt.databox.v2021_03_01.models.AvailableSkuRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_03_01.models.AvailableSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_available_skus_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} # type: ignore + + async def validate_address( + self, + location: str, + validate_address: "_models.ValidateAddress", + **kwargs: Any + ) -> "_models.AddressValidationOutput": + """[DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer + shipping address and provide alternate addresses if any. + + :param location: The location of the resource. + :type location: str + :param validate_address: Shipping address of the customer. + :type validate_address: ~azure.mgmt.databox.v2021_03_01.models.ValidateAddress + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressValidationOutput, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.AddressValidationOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_address.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_address, 'ValidateAddress') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressValidationOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_address.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} # type: ignore + + async def validate_inputs_by_resource_group( + self, + resource_group_name: str, + location: str, + validation_request: "_models.ValidationRequest", + **kwargs: Any + ) -> "_models.ValidationResponse": + """This method does all necessary pre-job creation validation under resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_03_01.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + async def validate_inputs( + self, + location: str, + validation_request: "_models.ValidationRequest", + **kwargs: Any + ) -> "_models.ValidationResponse": + """This method does all necessary pre-job creation validation under subscription. + + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_03_01.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + async def region_configuration( + self, + location: str, + region_configuration_request: "_models.RegionConfigurationRequest", + **kwargs: Any + ) -> "_models.RegionConfigurationResponse": + """This API provides configuration details specific to given region/location at Subscription + level. + + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region. + :type region_configuration_request: ~azure.mgmt.databox.v2021_03_01.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore + + async def region_configuration_by_resource_group( + self, + resource_group_name: str, + location: str, + region_configuration_request: "_models.RegionConfigurationRequest", + **kwargs: Any + ) -> "_models.RegionConfigurationResponse": + """This API provides configuration details specific to given region/location at Resource group + level. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region at + resource group level. + :type region_configuration_request: ~azure.mgmt.databox.v2021_03_01.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/__init__.py new file mode 100644 index 0000000000000..6fab328348ad6 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/__init__.py @@ -0,0 +1,379 @@ +# 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 AccountCredentialDetails + from ._models_py3 import AdditionalErrorInfo + from ._models_py3 import AddressValidationOutput + from ._models_py3 import AddressValidationProperties + from ._models_py3 import ApiError + from ._models_py3 import ApplianceNetworkConfiguration + from ._models_py3 import ArmBaseObject + from ._models_py3 import AvailableSkuRequest + from ._models_py3 import AvailableSkusResult + from ._models_py3 import AzureFileFilterDetails + from ._models_py3 import BlobFilterDetails + from ._models_py3 import CancellationReason + from ._models_py3 import CloudError + from ._models_py3 import ContactDetails + from ._models_py3 import CopyLogDetails + from ._models_py3 import CopyProgress + from ._models_py3 import CreateJobValidations + from ._models_py3 import CreateOrderLimitForSubscriptionValidationRequest + from ._models_py3 import CreateOrderLimitForSubscriptionValidationResponseProperties + from ._models_py3 import DataAccountDetails + from ._models_py3 import DataBoxAccountCopyLogDetails + from ._models_py3 import DataBoxDiskCopyLogDetails + from ._models_py3 import DataBoxDiskCopyProgress + from ._models_py3 import DataBoxDiskJobDetails + from ._models_py3 import DataBoxDiskJobSecrets + from ._models_py3 import DataBoxHeavyAccountCopyLogDetails + from ._models_py3 import DataBoxHeavyJobDetails + from ._models_py3 import DataBoxHeavyJobSecrets + from ._models_py3 import DataBoxHeavySecret + from ._models_py3 import DataBoxJobDetails + from ._models_py3 import DataBoxScheduleAvailabilityRequest + from ._models_py3 import DataBoxSecret + from ._models_py3 import DataExportDetails + from ._models_py3 import DataImportDetails + from ._models_py3 import DataLocationToServiceLocationMap + from ._models_py3 import DataTransferDetailsValidationRequest + from ._models_py3 import DataTransferDetailsValidationResponseProperties + from ._models_py3 import DataboxJobSecrets + from ._models_py3 import DcAccessSecurityCode + from ._models_py3 import Details + from ._models_py3 import DiskScheduleAvailabilityRequest + from ._models_py3 import DiskSecret + from ._models_py3 import EncryptionPreferences + from ._models_py3 import ErrorDetail + from ._models_py3 import FilterFileDetails + from ._models_py3 import HeavyScheduleAvailabilityRequest + from ._models_py3 import IdentityProperties + from ._models_py3 import JobDeliveryInfo + from ._models_py3 import JobDetails + from ._models_py3 import JobResource + from ._models_py3 import JobResourceList + from ._models_py3 import JobResourceUpdateParameter + from ._models_py3 import JobSecrets + from ._models_py3 import JobStages + from ._models_py3 import KeyEncryptionKey + from ._models_py3 import LastMitigationActionOnJob + from ._models_py3 import ManagedDiskDetails + from ._models_py3 import MitigateJobRequest + from ._models_py3 import NotificationPreference + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationList + from ._models_py3 import PackageShippingDetails + from ._models_py3 import Preferences + from ._models_py3 import PreferencesValidationRequest + from ._models_py3 import PreferencesValidationResponseProperties + from ._models_py3 import RegionConfigurationRequest + from ._models_py3 import RegionConfigurationResponse + from ._models_py3 import Resource + from ._models_py3 import ResourceIdentity + from ._models_py3 import ScheduleAvailabilityRequest + from ._models_py3 import ScheduleAvailabilityResponse + from ._models_py3 import ShareCredentialDetails + from ._models_py3 import ShipmentPickUpRequest + from ._models_py3 import ShipmentPickUpResponse + from ._models_py3 import ShippingAddress + from ._models_py3 import Sku + from ._models_py3 import SkuAvailabilityValidationRequest + from ._models_py3 import SkuAvailabilityValidationResponseProperties + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuCost + from ._models_py3 import SkuInformation + from ._models_py3 import StorageAccountDetails + from ._models_py3 import SubscriptionIsAllowedToCreateJobValidationRequest + from ._models_py3 import SubscriptionIsAllowedToCreateJobValidationResponseProperties + from ._models_py3 import SystemData + from ._models_py3 import TransferAllDetails + from ._models_py3 import TransferConfiguration + from ._models_py3 import TransferConfigurationTransferAllDetails + from ._models_py3 import TransferConfigurationTransferFilterDetails + from ._models_py3 import TransferFilterDetails + from ._models_py3 import TransportAvailabilityDetails + from ._models_py3 import TransportAvailabilityRequest + from ._models_py3 import TransportAvailabilityResponse + from ._models_py3 import TransportPreferences + from ._models_py3 import UnencryptedCredentials + from ._models_py3 import UnencryptedCredentialsList + from ._models_py3 import UpdateJobDetails + from ._models_py3 import UserAssignedIdentity + from ._models_py3 import UserAssignedProperties + from ._models_py3 import ValidateAddress + from ._models_py3 import ValidationInputRequest + from ._models_py3 import ValidationInputResponse + from ._models_py3 import ValidationRequest + from ._models_py3 import ValidationResponse +except (SyntaxError, ImportError): + from ._models import AccountCredentialDetails # type: ignore + from ._models import AdditionalErrorInfo # type: ignore + from ._models import AddressValidationOutput # type: ignore + from ._models import AddressValidationProperties # type: ignore + from ._models import ApiError # type: ignore + from ._models import ApplianceNetworkConfiguration # type: ignore + from ._models import ArmBaseObject # type: ignore + from ._models import AvailableSkuRequest # type: ignore + from ._models import AvailableSkusResult # type: ignore + from ._models import AzureFileFilterDetails # type: ignore + from ._models import BlobFilterDetails # type: ignore + from ._models import CancellationReason # type: ignore + from ._models import CloudError # type: ignore + from ._models import ContactDetails # type: ignore + from ._models import CopyLogDetails # type: ignore + from ._models import CopyProgress # type: ignore + from ._models import CreateJobValidations # type: ignore + from ._models import CreateOrderLimitForSubscriptionValidationRequest # type: ignore + from ._models import CreateOrderLimitForSubscriptionValidationResponseProperties # type: ignore + from ._models import DataAccountDetails # type: ignore + from ._models import DataBoxAccountCopyLogDetails # type: ignore + from ._models import DataBoxDiskCopyLogDetails # type: ignore + from ._models import DataBoxDiskCopyProgress # type: ignore + from ._models import DataBoxDiskJobDetails # type: ignore + from ._models import DataBoxDiskJobSecrets # type: ignore + from ._models import DataBoxHeavyAccountCopyLogDetails # type: ignore + from ._models import DataBoxHeavyJobDetails # type: ignore + from ._models import DataBoxHeavyJobSecrets # type: ignore + from ._models import DataBoxHeavySecret # type: ignore + from ._models import DataBoxJobDetails # type: ignore + from ._models import DataBoxScheduleAvailabilityRequest # type: ignore + from ._models import DataBoxSecret # type: ignore + from ._models import DataExportDetails # type: ignore + from ._models import DataImportDetails # type: ignore + from ._models import DataLocationToServiceLocationMap # type: ignore + from ._models import DataTransferDetailsValidationRequest # type: ignore + from ._models import DataTransferDetailsValidationResponseProperties # type: ignore + from ._models import DataboxJobSecrets # type: ignore + from ._models import DcAccessSecurityCode # type: ignore + from ._models import Details # type: ignore + from ._models import DiskScheduleAvailabilityRequest # type: ignore + from ._models import DiskSecret # type: ignore + from ._models import EncryptionPreferences # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import FilterFileDetails # type: ignore + from ._models import HeavyScheduleAvailabilityRequest # type: ignore + from ._models import IdentityProperties # type: ignore + from ._models import JobDeliveryInfo # type: ignore + from ._models import JobDetails # type: ignore + from ._models import JobResource # type: ignore + from ._models import JobResourceList # type: ignore + from ._models import JobResourceUpdateParameter # type: ignore + from ._models import JobSecrets # type: ignore + from ._models import JobStages # type: ignore + from ._models import KeyEncryptionKey # type: ignore + from ._models import LastMitigationActionOnJob # type: ignore + from ._models import ManagedDiskDetails # type: ignore + from ._models import MitigateJobRequest # type: ignore + from ._models import NotificationPreference # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationList # type: ignore + from ._models import PackageShippingDetails # type: ignore + from ._models import Preferences # type: ignore + from ._models import PreferencesValidationRequest # type: ignore + from ._models import PreferencesValidationResponseProperties # type: ignore + from ._models import RegionConfigurationRequest # type: ignore + from ._models import RegionConfigurationResponse # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceIdentity # type: ignore + from ._models import ScheduleAvailabilityRequest # type: ignore + from ._models import ScheduleAvailabilityResponse # type: ignore + from ._models import ShareCredentialDetails # type: ignore + from ._models import ShipmentPickUpRequest # type: ignore + from ._models import ShipmentPickUpResponse # type: ignore + from ._models import ShippingAddress # type: ignore + from ._models import Sku # type: ignore + from ._models import SkuAvailabilityValidationRequest # type: ignore + from ._models import SkuAvailabilityValidationResponseProperties # type: ignore + from ._models import SkuCapacity # type: ignore + from ._models import SkuCost # type: ignore + from ._models import SkuInformation # type: ignore + from ._models import StorageAccountDetails # type: ignore + from ._models import SubscriptionIsAllowedToCreateJobValidationRequest # type: ignore + from ._models import SubscriptionIsAllowedToCreateJobValidationResponseProperties # type: ignore + from ._models import SystemData # type: ignore + from ._models import TransferAllDetails # type: ignore + from ._models import TransferConfiguration # type: ignore + from ._models import TransferConfigurationTransferAllDetails # type: ignore + from ._models import TransferConfigurationTransferFilterDetails # type: ignore + from ._models import TransferFilterDetails # type: ignore + from ._models import TransportAvailabilityDetails # type: ignore + from ._models import TransportAvailabilityRequest # type: ignore + from ._models import TransportAvailabilityResponse # type: ignore + from ._models import TransportPreferences # type: ignore + from ._models import UnencryptedCredentials # type: ignore + from ._models import UnencryptedCredentialsList # type: ignore + from ._models import UpdateJobDetails # type: ignore + from ._models import UserAssignedIdentity # type: ignore + from ._models import UserAssignedProperties # type: ignore + from ._models import ValidateAddress # type: ignore + from ._models import ValidationInputRequest # type: ignore + from ._models import ValidationInputResponse # type: ignore + from ._models import ValidationRequest # type: ignore + from ._models import ValidationResponse # type: ignore + +from ._data_box_management_client_enums import ( + AccessProtocol, + AddressType, + AddressValidationStatus, + ClassDiscriminator, + CopyStatus, + CustomerResolutionCode, + DataAccountType, + DoubleEncryption, + FilterFileType, + JobDeliveryType, + KekType, + LogCollectionLevel, + NotificationStageName, + OverallValidationStatus, + ShareDestinationFormatType, + SkuDisabledReason, + SkuName, + StageName, + StageStatus, + TransferConfigurationType, + TransferType, + TransportShipmentTypes, + ValidationInputDiscriminator, + ValidationStatus, +) + +__all__ = [ + 'AccountCredentialDetails', + 'AdditionalErrorInfo', + 'AddressValidationOutput', + 'AddressValidationProperties', + 'ApiError', + 'ApplianceNetworkConfiguration', + 'ArmBaseObject', + 'AvailableSkuRequest', + 'AvailableSkusResult', + 'AzureFileFilterDetails', + 'BlobFilterDetails', + 'CancellationReason', + 'CloudError', + 'ContactDetails', + 'CopyLogDetails', + 'CopyProgress', + 'CreateJobValidations', + 'CreateOrderLimitForSubscriptionValidationRequest', + 'CreateOrderLimitForSubscriptionValidationResponseProperties', + 'DataAccountDetails', + 'DataBoxAccountCopyLogDetails', + 'DataBoxDiskCopyLogDetails', + 'DataBoxDiskCopyProgress', + 'DataBoxDiskJobDetails', + 'DataBoxDiskJobSecrets', + 'DataBoxHeavyAccountCopyLogDetails', + 'DataBoxHeavyJobDetails', + 'DataBoxHeavyJobSecrets', + 'DataBoxHeavySecret', + 'DataBoxJobDetails', + 'DataBoxScheduleAvailabilityRequest', + 'DataBoxSecret', + 'DataExportDetails', + 'DataImportDetails', + 'DataLocationToServiceLocationMap', + 'DataTransferDetailsValidationRequest', + 'DataTransferDetailsValidationResponseProperties', + 'DataboxJobSecrets', + 'DcAccessSecurityCode', + 'Details', + 'DiskScheduleAvailabilityRequest', + 'DiskSecret', + 'EncryptionPreferences', + 'ErrorDetail', + 'FilterFileDetails', + 'HeavyScheduleAvailabilityRequest', + 'IdentityProperties', + 'JobDeliveryInfo', + 'JobDetails', + 'JobResource', + 'JobResourceList', + 'JobResourceUpdateParameter', + 'JobSecrets', + 'JobStages', + 'KeyEncryptionKey', + 'LastMitigationActionOnJob', + 'ManagedDiskDetails', + 'MitigateJobRequest', + 'NotificationPreference', + 'Operation', + 'OperationDisplay', + 'OperationList', + 'PackageShippingDetails', + 'Preferences', + 'PreferencesValidationRequest', + 'PreferencesValidationResponseProperties', + 'RegionConfigurationRequest', + 'RegionConfigurationResponse', + 'Resource', + 'ResourceIdentity', + 'ScheduleAvailabilityRequest', + 'ScheduleAvailabilityResponse', + 'ShareCredentialDetails', + 'ShipmentPickUpRequest', + 'ShipmentPickUpResponse', + 'ShippingAddress', + 'Sku', + 'SkuAvailabilityValidationRequest', + 'SkuAvailabilityValidationResponseProperties', + 'SkuCapacity', + 'SkuCost', + 'SkuInformation', + 'StorageAccountDetails', + 'SubscriptionIsAllowedToCreateJobValidationRequest', + 'SubscriptionIsAllowedToCreateJobValidationResponseProperties', + 'SystemData', + 'TransferAllDetails', + 'TransferConfiguration', + 'TransferConfigurationTransferAllDetails', + 'TransferConfigurationTransferFilterDetails', + 'TransferFilterDetails', + 'TransportAvailabilityDetails', + 'TransportAvailabilityRequest', + 'TransportAvailabilityResponse', + 'TransportPreferences', + 'UnencryptedCredentials', + 'UnencryptedCredentialsList', + 'UpdateJobDetails', + 'UserAssignedIdentity', + 'UserAssignedProperties', + 'ValidateAddress', + 'ValidationInputRequest', + 'ValidationInputResponse', + 'ValidationRequest', + 'ValidationResponse', + 'AccessProtocol', + 'AddressType', + 'AddressValidationStatus', + 'ClassDiscriminator', + 'CopyStatus', + 'CustomerResolutionCode', + 'DataAccountType', + 'DoubleEncryption', + 'FilterFileType', + 'JobDeliveryType', + 'KekType', + 'LogCollectionLevel', + 'NotificationStageName', + 'OverallValidationStatus', + 'ShareDestinationFormatType', + 'SkuDisabledReason', + 'SkuName', + 'StageName', + 'StageStatus', + 'TransferConfigurationType', + 'TransferType', + 'TransportShipmentTypes', + 'ValidationInputDiscriminator', + 'ValidationStatus', +] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/_data_box_management_client_enums.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/_data_box_management_client_enums.py new file mode 100644 index 0000000000000..14d6e8dbaeb21 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/_data_box_management_client_enums.py @@ -0,0 +1,344 @@ +# 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, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + #: Server Message Block protocol(SMB). + SMB = "SMB" + #: Network File System protocol(NFS). + NFS = "NFS" + +class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of address. + """ + + #: Address type not known. + NONE = "None" + #: Residential Address. + RESIDENTIAL = "Residential" + #: Commercial Address. + COMMERCIAL = "Commercial" + +class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The address validation status. + """ + + #: Address provided is valid. + VALID = "Valid" + #: Address provided is invalid or not supported. + INVALID = "Invalid" + #: Address provided is ambiguous, please choose one of the alternate addresses returned. + AMBIGUOUS = "Ambiguous" + +class ClassDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates the type of job details. + """ + + #: Data Box orders. + DATA_BOX = "DataBox" + #: Data Box Disk orders. + DATA_BOX_DISK = "DataBoxDisk" + #: Data Box Heavy orders. + DATA_BOX_HEAVY = "DataBoxHeavy" + +class CopyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Status of the copy + """ + + #: Data copy hasn't started yet. + NOT_STARTED = "NotStarted" + #: Data copy is in progress. + IN_PROGRESS = "InProgress" + #: Data copy completed. + COMPLETED = "Completed" + #: Data copy completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Data copy failed. No data was copied. + FAILED = "Failed" + #: No copy triggered as device was not returned. + NOT_RETURNED = "NotReturned" + #: The Device has hit hardware issues. + HARDWARE_ERROR = "HardwareError" + #: Data copy failed. The Device was formatted by user. + DEVICE_FORMATTED = "DeviceFormatted" + #: Data copy failed. Device metadata was modified by user. + DEVICE_METADATA_MODIFIED = "DeviceMetadataModified" + #: Data copy failed. Storage Account was not accessible during copy. + STORAGE_ACCOUNT_NOT_ACCESSIBLE = "StorageAccountNotAccessible" + #: Data copy failed. The Device data content is not supported. + UNSUPPORTED_DATA = "UnsupportedData" + +class CustomerResolutionCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + #: No Resolution Yet. + NONE = "None" + #: Clean the device. + MOVE_TO_CLEAN_UP_DEVICE = "MoveToCleanUpDevice" + #: Resume the job to same stage. + RESUME = "Resume" + +class DataAccountType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the account. + """ + + #: Storage Accounts . + STORAGE_ACCOUNT = "StorageAccount" + #: Azure Managed disk storage. + MANAGED_DISK = "ManagedDisk" + +class DoubleEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Defines secondary layer of software-based encryption enablement. + """ + + #: Software-based encryption is enabled. + ENABLED = "Enabled" + #: Software-based encryption is disabled. + DISABLED = "Disabled" + +class FilterFileType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the filter file. + """ + + #: Filter file is of the type AzureBlob. + AZURE_BLOB = "AzureBlob" + #: Filter file is of the type AzureFiles. + AZURE_FILE = "AzureFile" + +class JobDeliveryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Delivery type of Job. + """ + + #: Non Scheduled job. + NON_SCHEDULED = "NonScheduled" + #: Scheduled job. + SCHEDULED = "Scheduled" + +class KekType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of encryption key used for key encryption. + """ + + #: Key encryption key is managed by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" + #: Key encryption key is managed by the Customer. + CUSTOMER_MANAGED = "CustomerManaged" + +class LogCollectionLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Level of the logs to be collected. + """ + + #: Only Errors will be collected in the logs. + ERROR = "Error" + #: Verbose logging (includes Errors, CRC, size information and others). + VERBOSE = "Verbose" + +class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the stage. + """ + + #: Notification at device prepared stage. + DEVICE_PREPARED = "DevicePrepared" + #: Notification at device dispatched stage. + DISPATCHED = "Dispatched" + #: Notification at device delivered stage. + DELIVERED = "Delivered" + #: Notification at device picked up from user stage. + PICKED_UP = "PickedUp" + #: Notification at device received at Azure datacenter stage. + AT_AZURE_DC = "AtAzureDC" + #: Notification at data copy started stage. + DATA_COPY = "DataCopy" + +class OverallValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Overall validation status. + """ + + #: Every input request is valid. + ALL_VALID_TO_PROCEED = "AllValidToProceed" + #: Some input requests are not valid. + INPUTS_REVISIT_REQUIRED = "InputsRevisitRequired" + #: Certain input validations skipped. + CERTAIN_INPUT_VALIDATIONS_SKIPPED = "CertainInputValidationsSkipped" + +class ShareDestinationFormatType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the share. + """ + + #: Unknown format. + UNKNOWN_TYPE = "UnknownType" + #: Storsimple data format. + HCS = "HCS" + #: Azure storage block blob format. + BLOCK_BLOB = "BlockBlob" + #: Azure storage page blob format. + PAGE_BLOB = "PageBlob" + #: Azure storage file format. + AZURE_FILE = "AzureFile" + #: Azure Compute Disk. + MANAGED_DISK = "ManagedDisk" + +class SkuDisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Reason why the Sku is disabled. + """ + + #: SKU is not disabled. + NONE = "None" + #: SKU is not available in the requested country. + COUNTRY = "Country" + #: SKU is not available to push data to the requested Azure region. + REGION = "Region" + #: Required features are not enabled for the SKU. + FEATURE = "Feature" + #: Subscription does not have required offer types for the SKU. + OFFER_TYPE = "OfferType" + #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription + #: notification. + NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + #: Data Box. + DATA_BOX = "DataBox" + #: Data Box Disk. + DATA_BOX_DISK = "DataBoxDisk" + #: Data Box Heavy. + DATA_BOX_HEAVY = "DataBoxHeavy" + +class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the stage which is in progress. + """ + + #: An order has been created. + DEVICE_ORDERED = "DeviceOrdered" + #: A device has been prepared for the order. + DEVICE_PREPARED = "DevicePrepared" + #: Device has been dispatched to the user of the order. + DISPATCHED = "Dispatched" + #: Device has been delivered to the user of the order. + DELIVERED = "Delivered" + #: Device has been picked up from user and in transit to Azure datacenter. + PICKED_UP = "PickedUp" + #: Device has been received at Azure datacenter from the user. + AT_AZURE_DC = "AtAzureDC" + #: Data copy from the device at Azure datacenter. + DATA_COPY = "DataCopy" + #: Order has completed. + COMPLETED = "Completed" + #: Order has completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Order has been cancelled. + CANCELLED = "Cancelled" + #: Order has failed due to issue reported by user. + FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" + #: Order has failed due to issue detected at Azure datacenter. + FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" + #: Order has been aborted. + ABORTED = "Aborted" + #: Order has completed with warnings. + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" + #: Device is ready to be handed to customer from Azure DC. + READY_TO_DISPATCH_FROM_AZURE_DC = "ReadyToDispatchFromAzureDC" + #: Device can be dropped off at Azure DC. + READY_TO_RECEIVE_AT_AZURE_DC = "ReadyToReceiveAtAzureDC" + +class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of the job stage. + """ + + #: No status available yet. + NONE = "None" + #: Stage is in progress. + IN_PROGRESS = "InProgress" + #: Stage has succeeded. + SUCCEEDED = "Succeeded" + #: Stage has failed. + FAILED = "Failed" + #: Stage has been cancelled. + CANCELLED = "Cancelled" + #: Stage is cancelling. + CANCELLING = "Cancelling" + #: Stage has succeeded with errors. + SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" + #: Stage is stuck until customer takes some action. + WAITING_FOR_CUSTOMER_ACTION = "WaitingForCustomerAction" + #: Stage has succeeded with warnings. + SUCCEEDED_WITH_WARNINGS = "SucceededWithWarnings" + +class TransferConfigurationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the configuration for transfer. + """ + + #: Transfer all the data. + TRANSFER_ALL = "TransferAll" + #: Transfer using filter. + TRANSFER_USING_FILTER = "TransferUsingFilter" + +class TransferType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the transfer. + """ + + #: Import data to azure. + IMPORT_TO_AZURE = "ImportToAzure" + #: Export data from azure. + EXPORT_FROM_AZURE = "ExportFromAzure" + +class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Transport Shipment Type supported for given region. + """ + + #: Shipment Logistics is handled by the customer. + CUSTOMER_MANAGED = "CustomerManaged" + #: Shipment Logistics is handled by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" + +class ValidationInputDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Identifies the type of validation request. + """ + + #: Identify request and response of address validation. + VALIDATE_ADDRESS = "ValidateAddress" + #: Identify request and response for validation of subscription permission to create job. + VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB = "ValidateSubscriptionIsAllowedToCreateJob" + #: Identify request and response of preference validation. + VALIDATE_PREFERENCES = "ValidatePreferences" + #: Identify request and response of create order limit for subscription validation. + VALIDATE_CREATE_ORDER_LIMIT = "ValidateCreateOrderLimit" + #: Identify request and response of active job limit for sku availability. + VALIDATE_SKU_AVAILABILITY = "ValidateSkuAvailability" + #: Identify request and response of data transfer details validation. + VALIDATE_DATA_TRANSFER_DETAILS = "ValidateDataTransferDetails" + +class ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Create order limit validation status. + """ + + #: Validation is successful. + VALID = "Valid" + #: Validation is not successful. + INVALID = "Invalid" + #: Validation is skipped. + SKIPPED = "Skipped" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/_models.py new file mode 100644 index 0000000000000..0c003d6172938 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/_models.py @@ -0,0 +1,4170 @@ +# 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.core.exceptions import HttpResponseError +import msrest.serialization + + +class AccountCredentialDetails(msrest.serialization.Model): + """Credential details of the account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar account_name: Name of the account. + :vartype account_name: str + :ivar data_account_type: Type of the account. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :ivar account_connection_string: Connection string of the account endpoint to use the account + as a storage endpoint on the device. + :vartype account_connection_string: str + :ivar share_credential_details: Per share level unencrypted access credentials. + :vartype share_credential_details: + list[~azure.mgmt.databox.v2021_03_01.models.ShareCredentialDetails] + """ + + _validation = { + 'account_name': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_connection_string': {'readonly': True}, + 'share_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, + 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountCredentialDetails, self).__init__(**kwargs) + self.account_name = None + self.data_account_type = None + self.account_connection_string = None + self.share_credential_details = None + + +class AdditionalErrorInfo(msrest.serialization.Model): + """Additional error info. + + :param type: Additional error type. + :type type: str + :param info: Additional error info. + :type info: any + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(AdditionalErrorInfo, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.info = kwargs.get('info', None) + + +class AddressValidationOutput(msrest.serialization.Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param validation_type: Identifies the type of validation response.Constant filled by server. + Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", + "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", + "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_03_01.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: list[~azure.mgmt.databox.v2021_03_01.models.ShippingAddress] + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'properties.validationType', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationOutput, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ValidationInputResponse(msrest.serialization.Model): + """Minimum properties that should be present in each individual validation response. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddressValidationProperties, CreateOrderLimitForSubscriptionValidationResponseProperties, DataTransferDetailsValidationResponseProperties, PreferencesValidationResponseProperties, SkuAvailabilityValidationResponseProperties, SubscriptionIsAllowedToCreateJobValidationResponseProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'AddressValidationProperties', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputResponse, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + + +class AddressValidationProperties(ValidationInputResponse): + """The address validation output. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_03_01.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: list[~azure.mgmt.databox.v2021_03_01.models.ShippingAddress] + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_status': {'key': 'validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.validation_status = None + self.alternate_addresses = None + + +class ApiError(msrest.serialization.Model): + """ApiError. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. + :type error: ~azure.mgmt.databox.v2021_03_01.models.ErrorDetail + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ApiError, self).__init__(**kwargs) + self.error = kwargs['error'] + + +class ApplianceNetworkConfiguration(msrest.serialization.Model): + """The Network Adapter configuration of a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the network. + :vartype name: str + :ivar mac_address: Mac Address. + :vartype mac_address: str + """ + + _validation = { + 'name': {'readonly': True}, + 'mac_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceNetworkConfiguration, self).__init__(**kwargs) + self.name = None + self.mac_address = None + + +class ArmBaseObject(msrest.serialization.Model): + """Base class for all objects under resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmBaseObject, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + + +class AvailableSkuRequest(msrest.serialization.Model): + """The filters for showing the available skus. + + All required parameters must be populated in order to send to Azure. + + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + :param sku_names: Sku Names to filter for available skus. + :type sku_names: list[str or ~azure.mgmt.databox.v2021_03_01.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku_names': {'key': 'skuNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableSkuRequest, self).__init__(**kwargs) + self.transfer_type = kwargs['transfer_type'] + self.country = kwargs['country'] + self.location = kwargs['location'] + self.sku_names = kwargs.get('sku_names', None) + + +class AvailableSkusResult(msrest.serialization.Model): + """The available skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of available skus. + :vartype value: list[~azure.mgmt.databox.v2021_03_01.models.SkuInformation] + :param next_link: Link for the next set of skus. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SkuInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableSkusResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class AzureFileFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure files. + + :param file_prefix_list: Prefix list of the Azure files to be transferred. + :type file_prefix_list: list[str] + :param file_path_list: List of full path of the files to be transferred. + :type file_path_list: list[str] + :param file_share_list: List of file shares to be transferred. + :type file_share_list: list[str] + """ + + _attribute_map = { + 'file_prefix_list': {'key': 'filePrefixList', 'type': '[str]'}, + 'file_path_list': {'key': 'filePathList', 'type': '[str]'}, + 'file_share_list': {'key': 'fileShareList', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFileFilterDetails, self).__init__(**kwargs) + self.file_prefix_list = kwargs.get('file_prefix_list', None) + self.file_path_list = kwargs.get('file_path_list', None) + self.file_share_list = kwargs.get('file_share_list', None) + + +class BlobFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure Blobs. + + :param blob_prefix_list: Prefix list of the Azure blobs to be transferred. + :type blob_prefix_list: list[str] + :param blob_path_list: List of full path of the blobs to be transferred. + :type blob_path_list: list[str] + :param container_list: List of blob containers to be transferred. + :type container_list: list[str] + """ + + _attribute_map = { + 'blob_prefix_list': {'key': 'blobPrefixList', 'type': '[str]'}, + 'blob_path_list': {'key': 'blobPathList', 'type': '[str]'}, + 'container_list': {'key': 'containerList', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobFilterDetails, self).__init__(**kwargs) + self.blob_prefix_list = kwargs.get('blob_prefix_list', None) + self.blob_path_list = kwargs.get('blob_path_list', None) + self.container_list = kwargs.get('container_list', None) + + +class CancellationReason(msrest.serialization.Model): + """Reason for cancellation. + + All required parameters must be populated in order to send to Azure. + + :param reason: Required. Reason for cancellation. + :type reason: str + """ + + _validation = { + 'reason': {'required': True}, + } + + _attribute_map = { + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CancellationReason, self).__init__(**kwargs) + self.reason = kwargs['reason'] + + +class CloudError(msrest.serialization.Model): + """Cloud error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param code: Cloud error code. + :type code: str + :param message: Cloud error message. + :type message: str + :param target: Cloud error target. + :type target: str + :ivar details: Cloud error details. + :vartype details: list[~azure.mgmt.databox.v2021_03_01.models.CloudError] + :ivar additional_info: Cloud error additional info. + :vartype additional_info: list[~azure.mgmt.databox.v2021_03_01.models.AdditionalErrorInfo] + """ + + _validation = { + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudError]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[AdditionalErrorInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = None + self.additional_info = None + + +class ContactDetails(msrest.serialization.Model): + """Contact Details. + + All required parameters must be populated in order to send to Azure. + + :param contact_name: Required. Contact name of the person. + :type contact_name: str + :param phone: Required. Phone number of the contact person. + :type phone: str + :param phone_extension: Phone extension number of the contact person. + :type phone_extension: str + :param mobile: Mobile number of the contact person. + :type mobile: str + :param email_list: Required. List of Email-ids to be notified about job progress. + :type email_list: list[str] + :param notification_preference: Notification preference for a job stage. + :type notification_preference: + list[~azure.mgmt.databox.v2021_03_01.models.NotificationPreference] + """ + + _validation = { + 'contact_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_name': {'key': 'contactName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'phone_extension': {'key': 'phoneExtension', 'type': 'str'}, + 'mobile': {'key': 'mobile', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + 'notification_preference': {'key': 'notificationPreference', 'type': '[NotificationPreference]'}, + } + + def __init__( + self, + **kwargs + ): + super(ContactDetails, self).__init__(**kwargs) + self.contact_name = kwargs['contact_name'] + self.phone = kwargs['phone'] + self.phone_extension = kwargs.get('phone_extension', None) + self.mobile = kwargs.get('mobile', None) + self.email_list = kwargs['email_list'] + self.notification_preference = kwargs.get('notification_preference', None) + + +class CopyLogDetails(msrest.serialization.Model): + """Details for log generated during copy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxHeavyAccountCopyLogDetails. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'copy_log_details_type': {'DataBox': 'DataBoxAccountCopyLogDetails', 'DataBoxDisk': 'DataBoxDiskCopyLogDetails', 'DataBoxHeavy': 'DataBoxHeavyAccountCopyLogDetails'} + } + + def __init__( + self, + **kwargs + ): + super(CopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = None # type: Optional[str] + + +class CopyProgress(msrest.serialization.Model): + """Copy progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar storage_account_name: Name of the storage account. This will be empty for data account + types other than storage account. + :vartype storage_account_name: str + :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", + "ExportFromAzure". + :vartype transfer_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransferType + :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :ivar account_id: Id of the account where the data needs to be uploaded. + :vartype account_id: str + :ivar bytes_processed: To indicate bytes transferred. + :vartype bytes_processed: long + :ivar total_bytes_to_process: Total amount of data to be processed by the job. + :vartype total_bytes_to_process: long + :ivar files_processed: Number of files processed. + :vartype files_processed: long + :ivar total_files_to_process: Total files to process. + :vartype total_files_to_process: long + :ivar invalid_files_processed: Number of files not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype invalid_files_processed: long + :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to azure naming + conventions which were processed by automatic renaming. + :vartype invalid_file_bytes_uploaded: long + :ivar renamed_container_count: Number of folders not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype renamed_container_count: long + :ivar files_errored_out: Number of files which could not be copied. + :vartype files_errored_out: long + :ivar directories_errored_out: To indicate directories errored out in the job. + :vartype directories_errored_out: long + :ivar invalid_directories_processed: To indicate directories renamed. + :vartype invalid_directories_processed: long + :ivar is_enumeration_in_progress: To indicate if enumeration of data is in progress. + Until this is true, the TotalBytesToProcess may not be valid. + :vartype is_enumeration_in_progress: bool + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'transfer_type': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_processed': {'readonly': True}, + 'total_bytes_to_process': {'readonly': True}, + 'files_processed': {'readonly': True}, + 'total_files_to_process': {'readonly': True}, + 'invalid_files_processed': {'readonly': True}, + 'invalid_file_bytes_uploaded': {'readonly': True}, + 'renamed_container_count': {'readonly': True}, + 'files_errored_out': {'readonly': True}, + 'directories_errored_out': {'readonly': True}, + 'invalid_directories_processed': {'readonly': True}, + 'is_enumeration_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'bytes_processed': {'key': 'bytesProcessed', 'type': 'long'}, + 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, + 'files_processed': {'key': 'filesProcessed', 'type': 'long'}, + 'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'}, + 'invalid_files_processed': {'key': 'invalidFilesProcessed', 'type': 'long'}, + 'invalid_file_bytes_uploaded': {'key': 'invalidFileBytesUploaded', 'type': 'long'}, + 'renamed_container_count': {'key': 'renamedContainerCount', 'type': 'long'}, + 'files_errored_out': {'key': 'filesErroredOut', 'type': 'long'}, + 'directories_errored_out': {'key': 'directoriesErroredOut', 'type': 'long'}, + 'invalid_directories_processed': {'key': 'invalidDirectoriesProcessed', 'type': 'long'}, + 'is_enumeration_in_progress': {'key': 'isEnumerationInProgress', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CopyProgress, self).__init__(**kwargs) + self.storage_account_name = None + self.transfer_type = None + self.data_account_type = None + self.account_id = None + self.bytes_processed = None + self.total_bytes_to_process = None + self.files_processed = None + self.total_files_to_process = None + self.invalid_files_processed = None + self.invalid_file_bytes_uploaded = None + self.renamed_container_count = None + self.files_errored_out = None + self.directories_errored_out = None + self.invalid_directories_processed = None + self.is_enumeration_in_progress = None + + +class ValidationRequest(msrest.serialization.Model): + """Minimum request requirement of any validation category. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CreateJobValidations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_03_01.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + _subtype_map = { + 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationRequest, self).__init__(**kwargs) + self.validation_category = None # type: Optional[str] + self.individual_request_details = kwargs['individual_request_details'] + + +class CreateJobValidations(ValidationRequest): + """It does all pre-job creation validations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_03_01.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateJobValidations, self).__init__(**kwargs) + self.validation_category = 'JobCreationValidation' # type: str + + +class ValidationInputRequest(msrest.serialization.Model): + """Minimum fields that must be present in any type of validation request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ValidateAddress, CreateOrderLimitForSubscriptionValidationRequest, DataTransferDetailsValidationRequest, PreferencesValidationRequest, SkuAvailabilityValidationRequest, SubscriptionIsAllowedToCreateJobValidationRequest. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'ValidateAddress', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputRequest, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + + +class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): + """Request to validate create order limit for current subscription. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.device_type = kwargs['device_type'] + + +class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInputResponse): + """Properties of create order limit for subscription validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar status: Create order limit validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.status = None + + +class DataAccountDetails(msrest.serialization.Model): + """Account details of the data to be transferred. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedDiskDetails, StorageAccountDetails. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + } + + _subtype_map = { + 'data_account_type': {'ManagedDisk': 'ManagedDiskDetails', 'StorageAccount': 'StorageAccountDetails'} + } + + def __init__( + self, + **kwargs + ): + super(DataAccountDetails, self).__init__(**kwargs) + self.data_account_type = None # type: Optional[str] + self.share_password = kwargs.get('share_password', None) + + +class DataBoxAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account of a DataBox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: str + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when + LogCollectionLevel is set to Verbose. + :vartype copy_verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': 'str'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBox' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxDiskCopyLogDetails(CopyLogDetails): + """Copy Log Details for a disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar disk_serial_number: Disk Serial Number. + :vartype disk_serial_number: str + :ivar error_log_link: Link for copy error logs. + :vartype error_log_link: str + :ivar verbose_log_link: Link for copy verbose logs. + :vartype verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'disk_serial_number': {'readonly': True}, + 'error_log_link': {'readonly': True}, + 'verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'error_log_link': {'key': 'errorLogLink', 'type': 'str'}, + 'verbose_log_link': {'key': 'verboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxDisk' # type: str + self.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + + +class DataBoxDiskCopyProgress(msrest.serialization.Model): + """DataBox Disk Copy Progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar serial_number: The serial number of the disk. + :vartype serial_number: str + :ivar bytes_copied: Bytes copied during the copy of disk. + :vartype bytes_copied: long + :ivar percent_complete: Indicates the percentage completed for the copy of the disk. + :vartype percent_complete: int + :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", + "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", + "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.CopyStatus + """ + + _validation = { + 'serial_number': {'readonly': True}, + 'bytes_copied': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.bytes_copied = None + self.percent_complete = None + self.status = None + + +class JobDetails(msrest.serialization.Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxJobDetails, DataBoxDiskJobDetails, DataBoxHeavyJobDetails. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_03_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_03_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_03_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_03_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_03_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_03_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_03_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_03_01.models.LastMitigationActionOnJob + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + } + + _subtype_map = { + 'job_details_type': {'DataBox': 'DataBoxJobDetails', 'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails'} + } + + def __init__( + self, + **kwargs + ): + super(JobDetails, self).__init__(**kwargs) + self.job_stages = None + self.contact_details = kwargs['contact_details'] + self.shipping_address = kwargs.get('shipping_address', None) + self.delivery_package = None + self.return_package = None + self.data_import_details = kwargs.get('data_import_details', None) + self.data_export_details = kwargs.get('data_export_details', None) + self.job_details_type = None # type: Optional[str] + self.preferences = kwargs.get('preferences', None) + self.copy_log_details = None + self.reverse_shipment_label_sas_key = None + self.chain_of_custody_sas_key = None + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.expected_data_size_in_tera_bytes = kwargs.get('expected_data_size_in_tera_bytes', None) + self.actions = None + self.last_mitigation_action_on_job = None + + +class DataBoxDiskJobDetails(JobDetails): + """DataBox Disk Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_03_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_03_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_03_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_03_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_03_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_03_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_03_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_03_01.models.LastMitigationActionOnJob + :param preferred_disks: User preference on what size disks are needed for the job. The map is + from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but + will be checked against an int. + :type preferred_disks: dict[str, int] + :ivar copy_progress: Copy progress per disk. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_03_01.models.DataBoxDiskCopyProgress] + :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being + used for the job. Is returned only after the disks are shipped to the customer. + :vartype disks_and_size_details: dict[str, int] + :param passkey: User entered passkey for DataBox Disk job. + :type passkey: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + 'disks_and_size_details': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, + 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, + 'passkey': {'key': 'passkey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBoxDisk' # type: str + self.preferred_disks = kwargs.get('preferred_disks', None) + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = kwargs.get('passkey', None) + + +class JobSecrets(msrest.serialization.Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataboxJobSecrets, DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_03_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBox': 'DataboxJobSecrets', 'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets'} + } + + def __init__( + self, + **kwargs + ): + super(JobSecrets, self).__init__(**kwargs) + self.job_secrets_type = None # type: Optional[str] + self.dc_access_security_code = None + self.error = None + + +class DataBoxDiskJobSecrets(JobSecrets): + """The secrets related to disk job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_03_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.v2021_03_01.models.DiskSecret] + :ivar pass_key: PassKey for the disk Job. + :vartype pass_key: str + :ivar is_passkey_user_defined: Whether passkey was provided by user. + :vartype is_passkey_user_defined: bool + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'pass_key': {'key': 'passKey', 'type': 'str'}, + 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxDisk' # type: str + self.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + + +class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account for Databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: list[str] + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when the + LogCollectionLevel is set to verbose. + :vartype copy_verbose_log_link: list[str] + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': '[str]'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxHeavy' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxHeavyJobDetails(JobDetails): + """Databox Heavy Device Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_03_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_03_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_03_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_03_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_03_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_03_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_03_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_03_01.models.LastMitigationActionOnJob + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_03_01.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox Heavy. Should not be passed + for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBoxHeavy' # type: str + self.copy_progress = None + self.device_password = kwargs.get('device_password', None) + + +class DataBoxHeavyJobSecrets(JobSecrets): + """The secrets related to a databox heavy job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_03_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2021_03_01.models.DataBoxHeavySecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxHeavy' # type: str + self.cabinet_pod_secrets = None + + +class DataBoxHeavySecret(msrest.serialization.Model): + """The secrets related to a databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_03_01.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_03_01.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavySecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DataBoxJobDetails(JobDetails): + """Databox Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_03_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_03_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_03_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_03_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_03_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_03_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_03_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_03_01.models.LastMitigationActionOnJob + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_03_01.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox. Should not be passed for + TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password + itself. This will not be returned in Get Call. Password Requirements : Password must be + minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, + one number and one special character. Password cannot have the following characters : IilLoO0 + Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBox' # type: str + self.copy_progress = None + self.device_password = kwargs.get('device_password', None) + + +class DataboxJobSecrets(JobSecrets): + """The secrets related to a databox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_03_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.v2021_03_01.models.DataBoxSecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataboxJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBox' # type: str + self.pod_secrets = kwargs.get('pod_secrets', None) + + +class ScheduleAvailabilityRequest(msrest.serialization.Model): + """Request body to get the availability for scheduling orders. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxScheduleAvailabilityRequest, DiskScheduleAvailabilityRequest, HeavyScheduleAvailabilityRequest. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + _subtype_map = { + 'sku_name': {'DataBox': 'DataBoxScheduleAvailabilityRequest', 'DataBoxDisk': 'DiskScheduleAvailabilityRequest', 'DataBoxHeavy': 'HeavyScheduleAvailabilityRequest'} + } + + def __init__( + self, + **kwargs + ): + super(ScheduleAvailabilityRequest, self).__init__(**kwargs) + self.storage_location = kwargs['storage_location'] + self.sku_name = None # type: Optional[str] + self.country = kwargs.get('country', None) + + +class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling data box orders orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBox' # type: str + + +class DataBoxSecret(msrest.serialization.Model): + """The secrets related to a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_03_01.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_03_01.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxSecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DataExportDetails(msrest.serialization.Model): + """Details of the data to be used for exporting data from azure. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration: Required. Configuration for the data transfer. + :type transfer_configuration: ~azure.mgmt.databox.v2021_03_01.models.TransferConfiguration + :param log_collection_level: Level of the logs to be collected. Possible values include: + "Error", "Verbose". Default value: "Error". + :type log_collection_level: str or ~azure.mgmt.databox.v2021_03_01.models.LogCollectionLevel + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_03_01.models.DataAccountDetails + """ + + _validation = { + 'transfer_configuration': {'required': True}, + 'account_details': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration': {'key': 'transferConfiguration', 'type': 'TransferConfiguration'}, + 'log_collection_level': {'key': 'logCollectionLevel', 'type': 'str'}, + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(DataExportDetails, self).__init__(**kwargs) + self.transfer_configuration = kwargs['transfer_configuration'] + self.log_collection_level = kwargs.get('log_collection_level', "Error") + self.account_details = kwargs['account_details'] + + +class DataImportDetails(msrest.serialization.Model): + """Details of the data to be used for importing data to azure. + + All required parameters must be populated in order to send to Azure. + + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_03_01.models.DataAccountDetails + """ + + _validation = { + 'account_details': {'required': True}, + } + + _attribute_map = { + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(DataImportDetails, self).__init__(**kwargs) + self.account_details = kwargs['account_details'] + + +class DataLocationToServiceLocationMap(msrest.serialization.Model): + """Map of data location to service location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar data_location: Location of the data. + :vartype data_location: str + :ivar service_location: Location of the service. + :vartype service_location: str + """ + + _validation = { + 'data_location': {'readonly': True}, + 'service_location': {'readonly': True}, + } + + _attribute_map = { + 'data_location': {'key': 'dataLocation', 'type': 'str'}, + 'service_location': {'key': 'serviceLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataLocationToServiceLocationMap, self).__init__(**kwargs) + self.data_location = None + self.service_location = None + + +class DataTransferDetailsValidationRequest(ValidationInputRequest): + """Request to validate export and import data details. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :param data_export_details: List of DataTransfer details to be used to export data from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_03_01.models.DataExportDetails] + :param data_import_details: List of DataTransfer details to be used to import data to azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_03_01.models.DataImportDetails] + :param device_type: Required. Device type. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransferType + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTransferDetailsValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.data_export_details = kwargs.get('data_export_details', None) + self.data_import_details = kwargs.get('data_import_details', None) + self.device_type = kwargs['device_type'] + self.transfer_type = kwargs['transfer_type'] + + +class DataTransferDetailsValidationResponseProperties(ValidationInputResponse): + """Properties of data transfer details validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar status: Data transfer details validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTransferDetailsValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.status = None + + +class DcAccessSecurityCode(msrest.serialization.Model): + """Dc access security code. + + :param reverse_dc_access_code: Reverse Dc access security code. + :type reverse_dc_access_code: str + :param forward_dc_access_code: Forward Dc access security code. + :type forward_dc_access_code: str + """ + + _attribute_map = { + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DcAccessSecurityCode, self).__init__(**kwargs) + self.reverse_dc_access_code = kwargs.get('reverse_dc_access_code', None) + self.forward_dc_access_code = kwargs.get('forward_dc_access_code', None) + + +class Details(msrest.serialization.Model): + """Details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Details, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + + +class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling disk orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBoxDisk' # type: str + self.expected_data_size_in_tera_bytes = kwargs['expected_data_size_in_tera_bytes'] + + +class DiskSecret(msrest.serialization.Model): + """Contains all the secrets of a Disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar disk_serial_number: Serial number of the assigned disk. + :vartype disk_serial_number: str + :ivar bit_locker_key: Bit Locker key of the disk which can be used to unlock the disk to copy + data. + :vartype bit_locker_key: str + """ + + _validation = { + 'disk_serial_number': {'readonly': True}, + 'bit_locker_key': {'readonly': True}, + } + + _attribute_map = { + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskSecret, self).__init__(**kwargs) + self.disk_serial_number = None + self.bit_locker_key = None + + +class EncryptionPreferences(msrest.serialization.Model): + """Preferences related to the Encryption. + + :param double_encryption: Defines secondary layer of software-based encryption enablement. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type double_encryption: str or ~azure.mgmt.databox.v2021_03_01.models.DoubleEncryption + """ + + _attribute_map = { + 'double_encryption': {'key': 'doubleEncryption', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EncryptionPreferences, self).__init__(**kwargs) + self.double_encryption = kwargs.get('double_encryption', "Disabled") + + +class ErrorDetail(msrest.serialization.Model): + """ErrorDetail. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + :param details: + :type details: list[~azure.mgmt.databox.v2021_03_01.models.Details] + :param target: + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Details]'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.details = kwargs.get('details', None) + self.target = kwargs.get('target', None) + + +class FilterFileDetails(msrest.serialization.Model): + """Details of the filter files to be used for data transfer. + + All required parameters must be populated in order to send to Azure. + + :param filter_file_type: Required. Type of the filter file. Possible values include: + "AzureBlob", "AzureFile". + :type filter_file_type: str or ~azure.mgmt.databox.v2021_03_01.models.FilterFileType + :param filter_file_path: Required. Path of the file that contains the details of all items to + transfer. + :type filter_file_path: str + """ + + _validation = { + 'filter_file_type': {'required': True}, + 'filter_file_path': {'required': True}, + } + + _attribute_map = { + 'filter_file_type': {'key': 'filterFileType', 'type': 'str'}, + 'filter_file_path': {'key': 'filterFilePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FilterFileDetails, self).__init__(**kwargs) + self.filter_file_type = kwargs['filter_file_type'] + self.filter_file_path = kwargs['filter_file_path'] + + +class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling heavy orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HeavyScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBoxHeavy' # type: str + + +class IdentityProperties(msrest.serialization.Model): + """Managed identity properties. + + :param type: Managed service identity type. + :type type: str + :param user_assigned: User assigned identity properties. + :type user_assigned: ~azure.mgmt.databox.v2021_03_01.models.UserAssignedProperties + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned': {'key': 'userAssigned', 'type': 'UserAssignedProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(IdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.user_assigned = kwargs.get('user_assigned', None) + + +class JobDeliveryInfo(msrest.serialization.Model): + """Additional delivery info. + + :param scheduled_date_time: Scheduled date time. + :type scheduled_date_time: ~datetime.datetime + """ + + _attribute_map = { + 'scheduled_date_time': {'key': 'scheduledDateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(JobDeliveryInfo, self).__init__(**kwargs) + self.scheduled_date_time = kwargs.get('scheduled_date_time', None) + + +class Resource(msrest.serialization.Model): + """Model of the Resource. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_03_01.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_03_01.models.ResourceIdentity + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + self.sku = kwargs['sku'] + self.identity = kwargs.get('identity', None) + + +class JobResource(Resource): + """Job Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_03_01.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_03_01.models.ResourceIdentity + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.databox.v2021_03_01.models.SystemData + :param transfer_type: Required. Type of the data transfer. Possible values include: + "ImportToAzure", "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransferType + :ivar is_cancellable: Describes whether the job is cancellable or not. + :vartype is_cancellable: bool + :ivar is_deletable: Describes whether the job is deletable or not. + :vartype is_deletable: bool + :ivar is_shipping_address_editable: Describes whether the shipping address is editable or not. + :vartype is_shipping_address_editable: bool + :ivar is_prepare_to_ship_enabled: Is Prepare To Ship Enabled on this job. + :vartype is_prepare_to_ship_enabled: bool + :ivar status: Name of the stage which is in progress. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :param details: Details of a job run. This field will only be sent for expand details filter. + :type details: ~azure.mgmt.databox.v2021_03_01.models.JobDetails + :ivar cancellation_reason: Reason for cancellation. + :vartype cancellation_reason: str + :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2021_03_01.models.JobDeliveryType + :param delivery_info: Delivery Info of Job. + :type delivery_info: ~azure.mgmt.databox.v2021_03_01.models.JobDeliveryInfo + :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. + :vartype is_cancellable_without_fee: bool + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'transfer_type': {'required': True}, + 'is_cancellable': {'readonly': True}, + 'is_deletable': {'readonly': True}, + 'is_shipping_address_editable': {'readonly': True}, + 'is_prepare_to_ship_enabled': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'error': {'readonly': True}, + 'cancellation_reason': {'readonly': True}, + 'is_cancellable_without_fee': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'transfer_type': {'key': 'properties.transferType', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, + 'is_shipping_address_editable': {'key': 'properties.isShippingAddressEditable', 'type': 'bool'}, + 'is_prepare_to_ship_enabled': {'key': 'properties.isPrepareToShipEnabled', 'type': 'bool'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'details': {'key': 'properties.details', 'type': 'JobDetails'}, + 'cancellation_reason': {'key': 'properties.cancellationReason', 'type': 'str'}, + 'delivery_type': {'key': 'properties.deliveryType', 'type': 'str'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, + 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(JobResource, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + self.system_data = None + self.transfer_type = kwargs['transfer_type'] + self.is_cancellable = None + self.is_deletable = None + self.is_shipping_address_editable = None + self.is_prepare_to_ship_enabled = None + self.status = None + self.start_time = None + self.error = None + self.details = kwargs.get('details', None) + self.cancellation_reason = None + self.delivery_type = kwargs.get('delivery_type', "NonScheduled") + self.delivery_info = kwargs.get('delivery_info', None) + self.is_cancellable_without_fee = None + + +class JobResourceList(msrest.serialization.Model): + """Job Resource Collection. + + :param value: List of job resources. + :type value: list[~azure.mgmt.databox.v2021_03_01.models.JobResource] + :param next_link: Link for the next set of job resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[JobResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(JobResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class JobResourceUpdateParameter(msrest.serialization.Model): + """The JobResourceUpdateParameter. + + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_03_01.models.ResourceIdentity + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.v2021_03_01.models.UpdateJobDetails + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.details = kwargs.get('details', None) + + +class JobStages(msrest.serialization.Model): + """Job stages. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar stage_name: Name of the job stage. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". + :vartype stage_name: str or ~azure.mgmt.databox.v2021_03_01.models.StageName + :ivar display_name: Display name of the job stage. + :vartype display_name: str + :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", + "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors", + "WaitingForCustomerAction", "SucceededWithWarnings". + :vartype stage_status: str or ~azure.mgmt.databox.v2021_03_01.models.StageStatus + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: ~datetime.datetime + :ivar job_stage_details: Job Stage Details. + :vartype job_stage_details: any + """ + + _validation = { + 'stage_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'stage_status': {'readonly': True}, + 'stage_time': {'readonly': True}, + 'job_stage_details': {'readonly': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'str'}, + 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, + 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(JobStages, self).__init__(**kwargs) + self.stage_name = None + self.display_name = None + self.stage_status = None + self.stage_time = None + self.job_stage_details = None + + +class KeyEncryptionKey(msrest.serialization.Model): + """Encryption key containing details about key to encrypt different keys. + + All required parameters must be populated in order to send to Azure. + + :param kek_type: Required. Type of encryption key used for key encryption. Possible values + include: "MicrosoftManaged", "CustomerManaged". Default value: "MicrosoftManaged". + :type kek_type: str or ~azure.mgmt.databox.v2021_03_01.models.KekType + :param identity_properties: Managed identity properties used for key encryption. + :type identity_properties: ~azure.mgmt.databox.v2021_03_01.models.IdentityProperties + :param kek_url: Key encryption key. It is required in case of Customer managed KekType. + :type kek_url: str + :param kek_vault_resource_id: Kek vault resource id. It is required in case of Customer managed + KekType. + :type kek_vault_resource_id: str + """ + + _validation = { + 'kek_type': {'required': True}, + } + + _attribute_map = { + 'kek_type': {'key': 'kekType', 'type': 'str'}, + 'identity_properties': {'key': 'identityProperties', 'type': 'IdentityProperties'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'kek_vault_resource_id': {'key': 'kekVaultResourceID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyEncryptionKey, self).__init__(**kwargs) + self.kek_type = kwargs.get('kek_type', "MicrosoftManaged") + self.identity_properties = kwargs.get('identity_properties', None) + self.kek_url = kwargs.get('kek_url', None) + self.kek_vault_resource_id = kwargs.get('kek_vault_resource_id', None) + + +class LastMitigationActionOnJob(msrest.serialization.Model): + """Last Mitigation Action Performed On Job. + + :param action_date_time_in_utc: Action performed date time. + :type action_date_time_in_utc: ~datetime.datetime + :param is_performed_by_customer: Action performed by customer, + possibility is that mitigation might happen by customer or service or by ops. + :type is_performed_by_customer: bool + :param customer_resolution: Resolution code provided by customer. Possible values include: + "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution: str or ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode + """ + + _attribute_map = { + 'action_date_time_in_utc': {'key': 'actionDateTimeInUtc', 'type': 'iso-8601'}, + 'is_performed_by_customer': {'key': 'isPerformedByCustomer', 'type': 'bool'}, + 'customer_resolution': {'key': 'customerResolution', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LastMitigationActionOnJob, self).__init__(**kwargs) + self.action_date_time_in_utc = kwargs.get('action_date_time_in_utc', None) + self.is_performed_by_customer = kwargs.get('is_performed_by_customer', None) + self.customer_resolution = kwargs.get('customer_resolution', None) + + +class ManagedDiskDetails(DataAccountDetails): + """Details of the managed disks. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param resource_group_id: Required. Resource Group Id of the compute disks. + :type resource_group_id: str + :param staging_storage_account_id: Required. Resource Id of the storage account that can be + used to copy the vhd for staging. + :type staging_storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'resource_group_id': {'required': True}, + 'staging_storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + 'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedDiskDetails, self).__init__(**kwargs) + self.data_account_type = 'ManagedDisk' # type: str + self.resource_group_id = kwargs['resource_group_id'] + self.staging_storage_account_id = kwargs['staging_storage_account_id'] + + +class MitigateJobRequest(msrest.serialization.Model): + """The Mitigate Job captured from request body for Mitigate API. + + All required parameters must be populated in order to send to Azure. + + :param customer_resolution_code: Required. Resolution code for the job. Possible values + include: "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution_code: str or + ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode + """ + + _validation = { + 'customer_resolution_code': {'required': True}, + } + + _attribute_map = { + 'customer_resolution_code': {'key': 'customerResolutionCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MitigateJobRequest, self).__init__(**kwargs) + self.customer_resolution_code = kwargs['customer_resolution_code'] + + +class NotificationPreference(msrest.serialization.Model): + """Notification preference for a job stage. + + All required parameters must be populated in order to send to Azure. + + :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", + "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". + :type stage_name: str or ~azure.mgmt.databox.v2021_03_01.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = kwargs['stage_name'] + self.send_notification = kwargs.get('send_notification', True) + + +class Operation(msrest.serialization.Model): + """Operation entity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the operation. Format: + {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. + :vartype name: str + :ivar display: Operation display values. + :vartype display: ~azure.mgmt.databox.v2021_03_01.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: any + :ivar origin: Origin of the operation. Can be : user|system|user,system. + :vartype origin: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'properties': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.properties = None + self.origin = None + self.is_data_action = kwargs.get('is_data_action', None) + + +class OperationDisplay(msrest.serialization.Model): + """Operation display. + + :param provider: Provider name. + :type provider: str + :param resource: Resource name. + :type resource: str + :param operation: Localized name of the operation for display purpose. + :type operation: str + :param description: Localized description of the operation for display purpose. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationList(msrest.serialization.Model): + """Operation Collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations. + :vartype value: list[~azure.mgmt.databox.v2021_03_01.models.Operation] + :param next_link: Link for the next set of operations. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationList, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class PackageShippingDetails(msrest.serialization.Model): + """Shipping details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar carrier_name: Name of the carrier. + :vartype carrier_name: str + :ivar tracking_id: Tracking Id of shipment. + :vartype tracking_id: str + :ivar tracking_url: Url where shipment can be tracked. + :vartype tracking_url: str + """ + + _validation = { + 'carrier_name': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'tracking_url': {'readonly': True}, + } + + _attribute_map = { + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PackageShippingDetails, self).__init__(**kwargs) + self.carrier_name = None + self.tracking_id = None + self.tracking_url = None + + +class Preferences(msrest.serialization.Model): + """Preferences related to the order. + + :param preferred_data_center_region: Preferred data center region. + :type preferred_data_center_region: list[str] + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.v2021_03_01.models.TransportPreferences + :param encryption_preferences: Preferences related to the Encryption. + :type encryption_preferences: ~azure.mgmt.databox.v2021_03_01.models.EncryptionPreferences + """ + + _attribute_map = { + 'preferred_data_center_region': {'key': 'preferredDataCenterRegion', 'type': '[str]'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + 'encryption_preferences': {'key': 'encryptionPreferences', 'type': 'EncryptionPreferences'}, + } + + def __init__( + self, + **kwargs + ): + super(Preferences, self).__init__(**kwargs) + self.preferred_data_center_region = kwargs.get('preferred_data_center_region', None) + self.transport_preferences = kwargs.get('transport_preferences', None) + self.encryption_preferences = kwargs.get('encryption_preferences', None) + + +class PreferencesValidationRequest(ValidationInputRequest): + """Request to validate preference of transport and data center. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :param preference: Preference of transport and data center. + :type preference: ~azure.mgmt.databox.v2021_03_01.models.Preferences + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'preference': {'key': 'preference', 'type': 'Preferences'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PreferencesValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.preference = kwargs.get('preference', None) + self.device_type = kwargs['device_type'] + + +class PreferencesValidationResponseProperties(ValidationInputResponse): + """Properties of data center and transport preference validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar status: Validation status of requested data center and transport. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.status = None + + +class RegionConfigurationRequest(msrest.serialization.Model): + """Request body to get the configuration for the region. + + :param schedule_availability_request: Request body to get the availability for scheduling + orders. + :type schedule_availability_request: + ~azure.mgmt.databox.v2021_03_01.models.ScheduleAvailabilityRequest + :param transport_availability_request: Request body to get the transport availability for given + sku. + :type transport_availability_request: + ~azure.mgmt.databox.v2021_03_01.models.TransportAvailabilityRequest + """ + + _attribute_map = { + 'schedule_availability_request': {'key': 'scheduleAvailabilityRequest', 'type': 'ScheduleAvailabilityRequest'}, + 'transport_availability_request': {'key': 'transportAvailabilityRequest', 'type': 'TransportAvailabilityRequest'}, + } + + def __init__( + self, + **kwargs + ): + super(RegionConfigurationRequest, self).__init__(**kwargs) + self.schedule_availability_request = kwargs.get('schedule_availability_request', None) + self.transport_availability_request = kwargs.get('transport_availability_request', None) + + +class RegionConfigurationResponse(msrest.serialization.Model): + """Configuration response specific to a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar schedule_availability_response: Schedule availability for given sku in a region. + :vartype schedule_availability_response: + ~azure.mgmt.databox.v2021_03_01.models.ScheduleAvailabilityResponse + :ivar transport_availability_response: Transport options available for given sku in a region. + :vartype transport_availability_response: + ~azure.mgmt.databox.v2021_03_01.models.TransportAvailabilityResponse + """ + + _validation = { + 'schedule_availability_response': {'readonly': True}, + 'transport_availability_response': {'readonly': True}, + } + + _attribute_map = { + 'schedule_availability_response': {'key': 'scheduleAvailabilityResponse', 'type': 'ScheduleAvailabilityResponse'}, + 'transport_availability_response': {'key': 'transportAvailabilityResponse', 'type': 'TransportAvailabilityResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(RegionConfigurationResponse, self).__init__(**kwargs) + self.schedule_availability_response = None + self.transport_availability_response = None + + +class ResourceIdentity(msrest.serialization.Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: Identity type. + :type type: str + :ivar principal_id: Service Principal Id backing the Msi. + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id. + :vartype tenant_id: str + :param user_assigned_identities: User Assigned Identities. + :type user_assigned_identities: dict[str, + ~azure.mgmt.databox.v2021_03_01.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', "None") + self.principal_id = None + self.tenant_id = None + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class ScheduleAvailabilityResponse(msrest.serialization.Model): + """Schedule availability for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar available_dates: List of dates available to schedule. + :vartype available_dates: list[~datetime.datetime] + """ + + _validation = { + 'available_dates': {'readonly': True}, + } + + _attribute_map = { + 'available_dates': {'key': 'availableDates', 'type': '[iso-8601]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduleAvailabilityResponse, self).__init__(**kwargs) + self.available_dates = None + + +class ShareCredentialDetails(msrest.serialization.Model): + """Credential details of the shares in account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar share_name: Name of the share. + :vartype share_name: str + :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", + "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". + :vartype share_type: str or ~azure.mgmt.databox.v2021_03_01.models.ShareDestinationFormatType + :ivar user_name: User name for the share. + :vartype user_name: str + :ivar password: Password for the share. + :vartype password: str + :ivar supported_access_protocols: Access protocols supported on the device. + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2021_03_01.models.AccessProtocol] + """ + + _validation = { + 'share_name': {'readonly': True}, + 'share_type': {'readonly': True}, + 'user_name': {'readonly': True}, + 'password': {'readonly': True}, + 'supported_access_protocols': {'readonly': True}, + } + + _attribute_map = { + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'share_type': {'key': 'shareType', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareCredentialDetails, self).__init__(**kwargs) + self.share_name = None + self.share_type = None + self.user_name = None + self.password = None + self.supported_access_protocols = None + + +class ShipmentPickUpRequest(msrest.serialization.Model): + """Shipment pick up request details. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. Minimum date after which the pick up should commence, this must be + in local time of pick up area. + :type start_time: ~datetime.datetime + :param end_time: Required. Maximum date before which the pick up should commence, this must be + in local time of pick up area. + :type end_time: ~datetime.datetime + :param shipment_location: Required. Shipment Location in the pickup place. Eg.front desk. + :type shipment_location: str + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + 'shipment_location': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'shipment_location': {'key': 'shipmentLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShipmentPickUpRequest, self).__init__(**kwargs) + self.start_time = kwargs['start_time'] + self.end_time = kwargs['end_time'] + self.shipment_location = kwargs['shipment_location'] + + +class ShipmentPickUpResponse(msrest.serialization.Model): + """Shipment pick up response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar confirmation_number: Confirmation number for the pick up request. + :vartype confirmation_number: str + :ivar ready_by_time: Time by which shipment should be ready for pick up, this is in local time + of pick up area. + :vartype ready_by_time: ~datetime.datetime + """ + + _validation = { + 'confirmation_number': {'readonly': True}, + 'ready_by_time': {'readonly': True}, + } + + _attribute_map = { + 'confirmation_number': {'key': 'confirmationNumber', 'type': 'str'}, + 'ready_by_time': {'key': 'readyByTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ShipmentPickUpResponse, self).__init__(**kwargs) + self.confirmation_number = None + self.ready_by_time = None + + +class ShippingAddress(msrest.serialization.Model): + """Shipping address where customer wishes to receive the device. + + All required parameters must be populated in order to send to Azure. + + :param street_address1: Required. Street Address line 1. + :type street_address1: str + :param street_address2: Street Address line 2. + :type street_address2: str + :param street_address3: Street Address line 3. + :type street_address3: str + :param city: Name of the City. + :type city: str + :param state_or_province: Name of the State or Province. + :type state_or_province: str + :param country: Required. Name of the Country. + :type country: str + :param postal_code: Postal code. + :type postal_code: str + :param zip_extended_code: Extended Zip Code. + :type zip_extended_code: str + :param company_name: Name of the company. + :type company_name: str + :param address_type: Type of address. Possible values include: "None", "Residential", + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2021_03_01.models.AddressType + """ + + _validation = { + 'street_address1': {'required': True}, + 'country': {'required': True}, + } + + _attribute_map = { + 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, + 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, + 'street_address3': {'key': 'streetAddress3', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'zip_extended_code': {'key': 'zipExtendedCode', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'address_type': {'key': 'addressType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShippingAddress, self).__init__(**kwargs) + self.street_address1 = kwargs['street_address1'] + self.street_address2 = kwargs.get('street_address2', None) + self.street_address3 = kwargs.get('street_address3', None) + self.city = kwargs.get('city', None) + self.state_or_province = kwargs.get('state_or_province', None) + self.country = kwargs['country'] + self.postal_code = kwargs.get('postal_code', None) + self.zip_extended_code = kwargs.get('zip_extended_code', None) + self.company_name = kwargs.get('company_name', None) + self.address_type = kwargs.get('address_type', "None") + + +class Sku(msrest.serialization.Model): + """The Sku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param display_name: The display name of the sku. + :type display_name: str + :param family: The sku family. + :type family: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs['name'] + self.display_name = kwargs.get('display_name', None) + self.family = kwargs.get('family', None) + + +class SkuAvailabilityValidationRequest(ValidationInputRequest): + """Request to validate sku availability. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.device_type = kwargs['device_type'] + self.transfer_type = kwargs['transfer_type'] + self.country = kwargs['country'] + self.location = kwargs['location'] + + +class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): + """Properties of sku availability validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", + "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.status = None + + +class SkuCapacity(msrest.serialization.Model): + """Capacity of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar usable: Usable capacity in TB. + :vartype usable: str + :ivar maximum: Maximum capacity in TB. + :vartype maximum: str + """ + + _validation = { + 'usable': {'readonly': True}, + 'maximum': {'readonly': True}, + } + + _attribute_map = { + 'usable': {'key': 'usable', 'type': 'str'}, + 'maximum': {'key': 'maximum', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.usable = None + self.maximum = None + + +class SkuCost(msrest.serialization.Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar meter_id: Meter id of the Sku. + :vartype meter_id: str + :ivar meter_type: The type of the meter. + :vartype meter_type: str + :ivar multiplier: Multiplier specifies the region specific value to be multiplied with 1$ guid. + Eg: Our new regions will be using 1$ shipping guid with appropriate multiplier specific to + region. + :vartype multiplier: float + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'meter_type': {'readonly': True}, + 'multiplier': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_type': {'key': 'meterType', 'type': 'str'}, + 'multiplier': {'key': 'multiplier', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.meter_type = None + self.multiplier = None + + +class SkuInformation(msrest.serialization.Model): + """Information of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.databox.v2021_03_01.models.Sku + :ivar enabled: The sku is enabled or not. + :vartype enabled: bool + :ivar data_location_to_service_location_map: The map of data location to service location. + :vartype data_location_to_service_location_map: + list[~azure.mgmt.databox.v2021_03_01.models.DataLocationToServiceLocationMap] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.v2021_03_01.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.v2021_03_01.models.SkuCost] + :ivar api_versions: Api versions that support this Sku. + :vartype api_versions: list[str] + :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", + "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". + :vartype disabled_reason: str or ~azure.mgmt.databox.v2021_03_01.models.SkuDisabledReason + :ivar disabled_reason_message: Message for why the Sku is disabled. + :vartype disabled_reason_message: str + :ivar required_feature: Required feature to access the sku. + :vartype required_feature: str + """ + + _validation = { + 'sku': {'readonly': True}, + 'enabled': {'readonly': True}, + 'data_location_to_service_location_map': {'readonly': True}, + 'capacity': {'readonly': True}, + 'costs': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'disabled_reason': {'readonly': True}, + 'disabled_reason_message': {'readonly': True}, + 'required_feature': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'data_location_to_service_location_map': {'key': 'properties.dataLocationToServiceLocationMap', 'type': '[DataLocationToServiceLocationMap]'}, + 'capacity': {'key': 'properties.capacity', 'type': 'SkuCapacity'}, + 'costs': {'key': 'properties.costs', 'type': '[SkuCost]'}, + 'api_versions': {'key': 'properties.apiVersions', 'type': '[str]'}, + 'disabled_reason': {'key': 'properties.disabledReason', 'type': 'str'}, + 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, + 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuInformation, self).__init__(**kwargs) + self.sku = None + self.enabled = None + self.data_location_to_service_location_map = None + self.capacity = None + self.costs = None + self.api_versions = None + self.disabled_reason = None + self.disabled_reason_message = None + self.required_feature = None + + +class StorageAccountDetails(DataAccountDetails): + """Details for the storage account. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param storage_account_id: Required. Storage Account Resource Id. + :type storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageAccountDetails, self).__init__(**kwargs) + self.data_account_type = 'StorageAccount' # type: str + self.storage_account_id = kwargs['storage_account_id'] + + +class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): + """Request to validate subscription permission to create jobs. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + + +class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInputResponse): + """Properties of subscription permission to create job validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar status: Validation status of subscription permission to create job. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + self.status = None + + +class SystemData(msrest.serialization.Model): + """Provides details about resource creation and update time. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_by: A string identifier for the identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource: user, application, + managedIdentity. + :vartype created_by_type: str + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: A string identifier for the identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource: user, + application, managedIdentity. + :vartype last_modified_by_type: str + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _validation = { + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + } + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = None + self.created_by_type = None + self.created_at = None + self.last_modified_by = None + self.last_modified_by_type = None + self.last_modified_at = None + + +class TransferAllDetails(msrest.serialization.Model): + """Details to transfer all data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :param transfer_all_blobs: To indicate if all Azure blobs have to be transferred. + :type transfer_all_blobs: bool + :param transfer_all_files: To indicate if all Azure Files have to be transferred. + :type transfer_all_files: bool + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'transfer_all_blobs': {'key': 'transferAllBlobs', 'type': 'bool'}, + 'transfer_all_files': {'key': 'transferAllFiles', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferAllDetails, self).__init__(**kwargs) + self.data_account_type = kwargs['data_account_type'] + self.transfer_all_blobs = kwargs.get('transfer_all_blobs', None) + self.transfer_all_files = kwargs.get('transfer_all_files', None) + + +class TransferConfiguration(msrest.serialization.Model): + """Configuration for defining the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration_type: Required. Type of the configuration for transfer. Possible + values include: "TransferAll", "TransferUsingFilter". + :type transfer_configuration_type: str or + ~azure.mgmt.databox.v2021_03_01.models.TransferConfigurationType + :param transfer_filter_details: Map of filter type and the details to filter. This field is + required only if the TransferConfigurationType is given as TransferUsingFilter. + :type transfer_filter_details: + ~azure.mgmt.databox.v2021_03_01.models.TransferConfigurationTransferFilterDetails + :param transfer_all_details: Map of filter type and the details to transfer all data. This + field is required only if the TransferConfigurationType is given as TransferAll. + :type transfer_all_details: + ~azure.mgmt.databox.v2021_03_01.models.TransferConfigurationTransferAllDetails + """ + + _validation = { + 'transfer_configuration_type': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration_type': {'key': 'transferConfigurationType', 'type': 'str'}, + 'transfer_filter_details': {'key': 'transferFilterDetails', 'type': 'TransferConfigurationTransferFilterDetails'}, + 'transfer_all_details': {'key': 'transferAllDetails', 'type': 'TransferConfigurationTransferAllDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferConfiguration, self).__init__(**kwargs) + self.transfer_configuration_type = kwargs['transfer_configuration_type'] + self.transfer_filter_details = kwargs.get('transfer_filter_details', None) + self.transfer_all_details = kwargs.get('transfer_all_details', None) + + +class TransferConfigurationTransferAllDetails(msrest.serialization.Model): + """Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. + + :param include: Details to transfer all data. + :type include: ~azure.mgmt.databox.v2021_03_01.models.TransferAllDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferAllDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferConfigurationTransferAllDetails, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + + +class TransferConfigurationTransferFilterDetails(msrest.serialization.Model): + """Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. + + :param include: Details of the filtering the transfer of data. + :type include: ~azure.mgmt.databox.v2021_03_01.models.TransferFilterDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferFilterDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferConfigurationTransferFilterDetails, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + + +class TransferFilterDetails(msrest.serialization.Model): + """Details of the filtering the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :param blob_filter_details: Filter details to transfer blobs. + :type blob_filter_details: ~azure.mgmt.databox.v2021_03_01.models.BlobFilterDetails + :param azure_file_filter_details: Filter details to transfer Azure files. + :type azure_file_filter_details: ~azure.mgmt.databox.v2021_03_01.models.AzureFileFilterDetails + :param filter_file_details: Details of the filter files to be used for data transfer. + :type filter_file_details: list[~azure.mgmt.databox.v2021_03_01.models.FilterFileDetails] + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'blob_filter_details': {'key': 'blobFilterDetails', 'type': 'BlobFilterDetails'}, + 'azure_file_filter_details': {'key': 'azureFileFilterDetails', 'type': 'AzureFileFilterDetails'}, + 'filter_file_details': {'key': 'filterFileDetails', 'type': '[FilterFileDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferFilterDetails, self).__init__(**kwargs) + self.data_account_type = kwargs['data_account_type'] + self.blob_filter_details = kwargs.get('blob_filter_details', None) + self.azure_file_filter_details = kwargs.get('azure_file_filter_details', None) + self.filter_file_details = kwargs.get('filter_file_details', None) + + +class TransportAvailabilityDetails(msrest.serialization.Model): + """Transport options availability details for given region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar shipment_type: Transport Shipment Type supported for given region. Possible values + include: "CustomerManaged", "MicrosoftManaged". + :vartype shipment_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransportShipmentTypes + """ + + _validation = { + 'shipment_type': {'readonly': True}, + } + + _attribute_map = { + 'shipment_type': {'key': 'shipmentType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityDetails, self).__init__(**kwargs) + self.shipment_type = None + + +class TransportAvailabilityRequest(msrest.serialization.Model): + """Request body to get the transport availability for given sku. + + :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + """ + + _attribute_map = { + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = kwargs.get('sku_name', None) + + +class TransportAvailabilityResponse(msrest.serialization.Model): + """Transport options available for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar transport_availability_details: List of transport availability details for given region. + :vartype transport_availability_details: + list[~azure.mgmt.databox.v2021_03_01.models.TransportAvailabilityDetails] + """ + + _validation = { + 'transport_availability_details': {'readonly': True}, + } + + _attribute_map = { + 'transport_availability_details': {'key': 'transportAvailabilityDetails', 'type': '[TransportAvailabilityDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityResponse, self).__init__(**kwargs) + self.transport_availability_details = None + + +class TransportPreferences(msrest.serialization.Model): + """Preferences related to the shipment logistics of the sku. + + All required parameters must be populated in order to send to Azure. + + :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2021_03_01.models.TransportShipmentTypes + """ + + _validation = { + 'preferred_shipment_type': {'required': True}, + } + + _attribute_map = { + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportPreferences, self).__init__(**kwargs) + self.preferred_shipment_type = kwargs['preferred_shipment_type'] + + +class UnencryptedCredentials(msrest.serialization.Model): + """Unencrypted credentials for accessing device. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar job_name: Name of the job. + :vartype job_name: str + :ivar job_secrets: Secrets related to this job. + :vartype job_secrets: ~azure.mgmt.databox.v2021_03_01.models.JobSecrets + """ + + _validation = { + 'job_name': {'readonly': True}, + 'job_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'job_secrets': {'key': 'jobSecrets', 'type': 'JobSecrets'}, + } + + def __init__( + self, + **kwargs + ): + super(UnencryptedCredentials, self).__init__(**kwargs) + self.job_name = None + self.job_secrets = None + + +class UnencryptedCredentialsList(msrest.serialization.Model): + """List of unencrypted credentials for accessing device. + + :param value: List of unencrypted credentials. + :type value: list[~azure.mgmt.databox.v2021_03_01.models.UnencryptedCredentials] + :param next_link: Link for the next set of unencrypted credentials. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UnencryptedCredentials]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UnencryptedCredentialsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class UpdateJobDetails(msrest.serialization.Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_03_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :param key_encryption_key: Key encryption key for the job. + :type key_encryption_key: ~azure.mgmt.databox.v2021_03_01.models.KeyEncryptionKey + """ + + _attribute_map = { + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + } + + def __init__( + self, + **kwargs + ): + super(UpdateJobDetails, self).__init__(**kwargs) + self.contact_details = kwargs.get('contact_details', None) + self.shipping_address = kwargs.get('shipping_address', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + + +class UserAssignedIdentity(msrest.serialization.Model): + """Class defining User assigned identity details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedProperties(msrest.serialization.Model): + """User assigned identity properties. + + :param resource_id: Arm resource id for user assigned identity to be used to fetch MSI token. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedProperties, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + + +class ValidateAddress(ValidationInputRequest): + """The requirements to validate customer address where the device needs to be shipped. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.v2021_03_01.models.TransportPreferences + """ + + _validation = { + 'validation_type': {'required': True}, + 'shipping_address': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateAddress, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.shipping_address = kwargs['shipping_address'] + self.device_type = kwargs['device_type'] + self.transport_preferences = kwargs.get('transport_preferences', None) + + +class ValidationResponse(msrest.serialization.Model): + """Response of pre job creation validations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Overall validation status. Possible values include: "AllValidToProceed", + "InputsRevisitRequired", "CertainInputValidationsSkipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.OverallValidationStatus + :ivar individual_response_details: List of response details contain validationType and its + response as key and value respectively. + :vartype individual_response_details: + list[~azure.mgmt.databox.v2021_03_01.models.ValidationInputResponse] + """ + + _validation = { + 'status': {'readonly': True}, + 'individual_response_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'individual_response_details': {'key': 'properties.individualResponseDetails', 'type': '[ValidationInputResponse]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidationResponse, self).__init__(**kwargs) + self.status = None + self.individual_response_details = None diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/_models_py3.py new file mode 100644 index 0000000000000..94076a489c8b6 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/models/_models_py3.py @@ -0,0 +1,4421 @@ +# 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 + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._data_box_management_client_enums import * + + +class AccountCredentialDetails(msrest.serialization.Model): + """Credential details of the account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar account_name: Name of the account. + :vartype account_name: str + :ivar data_account_type: Type of the account. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :ivar account_connection_string: Connection string of the account endpoint to use the account + as a storage endpoint on the device. + :vartype account_connection_string: str + :ivar share_credential_details: Per share level unencrypted access credentials. + :vartype share_credential_details: + list[~azure.mgmt.databox.v2021_03_01.models.ShareCredentialDetails] + """ + + _validation = { + 'account_name': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_connection_string': {'readonly': True}, + 'share_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, + 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountCredentialDetails, self).__init__(**kwargs) + self.account_name = None + self.data_account_type = None + self.account_connection_string = None + self.share_credential_details = None + + +class AdditionalErrorInfo(msrest.serialization.Model): + """Additional error info. + + :param type: Additional error type. + :type type: str + :param info: Additional error info. + :type info: any + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + info: Optional[Any] = None, + **kwargs + ): + super(AdditionalErrorInfo, self).__init__(**kwargs) + self.type = type + self.info = info + + +class AddressValidationOutput(msrest.serialization.Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param validation_type: Identifies the type of validation response.Constant filled by server. + Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", + "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", + "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_03_01.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: list[~azure.mgmt.databox.v2021_03_01.models.ShippingAddress] + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'properties.validationType', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationOutput, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ValidationInputResponse(msrest.serialization.Model): + """Minimum properties that should be present in each individual validation response. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddressValidationProperties, CreateOrderLimitForSubscriptionValidationResponseProperties, DataTransferDetailsValidationResponseProperties, PreferencesValidationResponseProperties, SkuAvailabilityValidationResponseProperties, SubscriptionIsAllowedToCreateJobValidationResponseProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'AddressValidationProperties', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputResponse, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + + +class AddressValidationProperties(ValidationInputResponse): + """The address validation output. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_03_01.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: list[~azure.mgmt.databox.v2021_03_01.models.ShippingAddress] + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_status': {'key': 'validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.validation_status = None + self.alternate_addresses = None + + +class ApiError(msrest.serialization.Model): + """ApiError. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. + :type error: ~azure.mgmt.databox.v2021_03_01.models.ErrorDetail + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: "ErrorDetail", + **kwargs + ): + super(ApiError, self).__init__(**kwargs) + self.error = error + + +class ApplianceNetworkConfiguration(msrest.serialization.Model): + """The Network Adapter configuration of a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the network. + :vartype name: str + :ivar mac_address: Mac Address. + :vartype mac_address: str + """ + + _validation = { + 'name': {'readonly': True}, + 'mac_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceNetworkConfiguration, self).__init__(**kwargs) + self.name = None + self.mac_address = None + + +class ArmBaseObject(msrest.serialization.Model): + """Base class for all objects under resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmBaseObject, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + + +class AvailableSkuRequest(msrest.serialization.Model): + """The filters for showing the available skus. + + All required parameters must be populated in order to send to Azure. + + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + :param sku_names: Sku Names to filter for available skus. + :type sku_names: list[str or ~azure.mgmt.databox.v2021_03_01.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku_names': {'key': 'skuNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + transfer_type: Union[str, "TransferType"], + country: str, + location: str, + sku_names: Optional[List[Union[str, "SkuName"]]] = None, + **kwargs + ): + super(AvailableSkuRequest, self).__init__(**kwargs) + self.transfer_type = transfer_type + self.country = country + self.location = location + self.sku_names = sku_names + + +class AvailableSkusResult(msrest.serialization.Model): + """The available skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of available skus. + :vartype value: list[~azure.mgmt.databox.v2021_03_01.models.SkuInformation] + :param next_link: Link for the next set of skus. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SkuInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(AvailableSkusResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class AzureFileFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure files. + + :param file_prefix_list: Prefix list of the Azure files to be transferred. + :type file_prefix_list: list[str] + :param file_path_list: List of full path of the files to be transferred. + :type file_path_list: list[str] + :param file_share_list: List of file shares to be transferred. + :type file_share_list: list[str] + """ + + _attribute_map = { + 'file_prefix_list': {'key': 'filePrefixList', 'type': '[str]'}, + 'file_path_list': {'key': 'filePathList', 'type': '[str]'}, + 'file_share_list': {'key': 'fileShareList', 'type': '[str]'}, + } + + def __init__( + self, + *, + file_prefix_list: Optional[List[str]] = None, + file_path_list: Optional[List[str]] = None, + file_share_list: Optional[List[str]] = None, + **kwargs + ): + super(AzureFileFilterDetails, self).__init__(**kwargs) + self.file_prefix_list = file_prefix_list + self.file_path_list = file_path_list + self.file_share_list = file_share_list + + +class BlobFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure Blobs. + + :param blob_prefix_list: Prefix list of the Azure blobs to be transferred. + :type blob_prefix_list: list[str] + :param blob_path_list: List of full path of the blobs to be transferred. + :type blob_path_list: list[str] + :param container_list: List of blob containers to be transferred. + :type container_list: list[str] + """ + + _attribute_map = { + 'blob_prefix_list': {'key': 'blobPrefixList', 'type': '[str]'}, + 'blob_path_list': {'key': 'blobPathList', 'type': '[str]'}, + 'container_list': {'key': 'containerList', 'type': '[str]'}, + } + + def __init__( + self, + *, + blob_prefix_list: Optional[List[str]] = None, + blob_path_list: Optional[List[str]] = None, + container_list: Optional[List[str]] = None, + **kwargs + ): + super(BlobFilterDetails, self).__init__(**kwargs) + self.blob_prefix_list = blob_prefix_list + self.blob_path_list = blob_path_list + self.container_list = container_list + + +class CancellationReason(msrest.serialization.Model): + """Reason for cancellation. + + All required parameters must be populated in order to send to Azure. + + :param reason: Required. Reason for cancellation. + :type reason: str + """ + + _validation = { + 'reason': {'required': True}, + } + + _attribute_map = { + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + *, + reason: str, + **kwargs + ): + super(CancellationReason, self).__init__(**kwargs) + self.reason = reason + + +class CloudError(msrest.serialization.Model): + """Cloud error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param code: Cloud error code. + :type code: str + :param message: Cloud error message. + :type message: str + :param target: Cloud error target. + :type target: str + :ivar details: Cloud error details. + :vartype details: list[~azure.mgmt.databox.v2021_03_01.models.CloudError] + :ivar additional_info: Cloud error additional info. + :vartype additional_info: list[~azure.mgmt.databox.v2021_03_01.models.AdditionalErrorInfo] + """ + + _validation = { + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudError]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[AdditionalErrorInfo]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + **kwargs + ): + super(CloudError, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = None + self.additional_info = None + + +class ContactDetails(msrest.serialization.Model): + """Contact Details. + + All required parameters must be populated in order to send to Azure. + + :param contact_name: Required. Contact name of the person. + :type contact_name: str + :param phone: Required. Phone number of the contact person. + :type phone: str + :param phone_extension: Phone extension number of the contact person. + :type phone_extension: str + :param mobile: Mobile number of the contact person. + :type mobile: str + :param email_list: Required. List of Email-ids to be notified about job progress. + :type email_list: list[str] + :param notification_preference: Notification preference for a job stage. + :type notification_preference: + list[~azure.mgmt.databox.v2021_03_01.models.NotificationPreference] + """ + + _validation = { + 'contact_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_name': {'key': 'contactName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'phone_extension': {'key': 'phoneExtension', 'type': 'str'}, + 'mobile': {'key': 'mobile', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + 'notification_preference': {'key': 'notificationPreference', 'type': '[NotificationPreference]'}, + } + + def __init__( + self, + *, + contact_name: str, + phone: str, + email_list: List[str], + phone_extension: Optional[str] = None, + mobile: Optional[str] = None, + notification_preference: Optional[List["NotificationPreference"]] = None, + **kwargs + ): + super(ContactDetails, self).__init__(**kwargs) + self.contact_name = contact_name + self.phone = phone + self.phone_extension = phone_extension + self.mobile = mobile + self.email_list = email_list + self.notification_preference = notification_preference + + +class CopyLogDetails(msrest.serialization.Model): + """Details for log generated during copy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxHeavyAccountCopyLogDetails. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'copy_log_details_type': {'DataBox': 'DataBoxAccountCopyLogDetails', 'DataBoxDisk': 'DataBoxDiskCopyLogDetails', 'DataBoxHeavy': 'DataBoxHeavyAccountCopyLogDetails'} + } + + def __init__( + self, + **kwargs + ): + super(CopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = None # type: Optional[str] + + +class CopyProgress(msrest.serialization.Model): + """Copy progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar storage_account_name: Name of the storage account. This will be empty for data account + types other than storage account. + :vartype storage_account_name: str + :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", + "ExportFromAzure". + :vartype transfer_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransferType + :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :ivar account_id: Id of the account where the data needs to be uploaded. + :vartype account_id: str + :ivar bytes_processed: To indicate bytes transferred. + :vartype bytes_processed: long + :ivar total_bytes_to_process: Total amount of data to be processed by the job. + :vartype total_bytes_to_process: long + :ivar files_processed: Number of files processed. + :vartype files_processed: long + :ivar total_files_to_process: Total files to process. + :vartype total_files_to_process: long + :ivar invalid_files_processed: Number of files not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype invalid_files_processed: long + :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to azure naming + conventions which were processed by automatic renaming. + :vartype invalid_file_bytes_uploaded: long + :ivar renamed_container_count: Number of folders not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype renamed_container_count: long + :ivar files_errored_out: Number of files which could not be copied. + :vartype files_errored_out: long + :ivar directories_errored_out: To indicate directories errored out in the job. + :vartype directories_errored_out: long + :ivar invalid_directories_processed: To indicate directories renamed. + :vartype invalid_directories_processed: long + :ivar is_enumeration_in_progress: To indicate if enumeration of data is in progress. + Until this is true, the TotalBytesToProcess may not be valid. + :vartype is_enumeration_in_progress: bool + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'transfer_type': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_processed': {'readonly': True}, + 'total_bytes_to_process': {'readonly': True}, + 'files_processed': {'readonly': True}, + 'total_files_to_process': {'readonly': True}, + 'invalid_files_processed': {'readonly': True}, + 'invalid_file_bytes_uploaded': {'readonly': True}, + 'renamed_container_count': {'readonly': True}, + 'files_errored_out': {'readonly': True}, + 'directories_errored_out': {'readonly': True}, + 'invalid_directories_processed': {'readonly': True}, + 'is_enumeration_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'bytes_processed': {'key': 'bytesProcessed', 'type': 'long'}, + 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, + 'files_processed': {'key': 'filesProcessed', 'type': 'long'}, + 'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'}, + 'invalid_files_processed': {'key': 'invalidFilesProcessed', 'type': 'long'}, + 'invalid_file_bytes_uploaded': {'key': 'invalidFileBytesUploaded', 'type': 'long'}, + 'renamed_container_count': {'key': 'renamedContainerCount', 'type': 'long'}, + 'files_errored_out': {'key': 'filesErroredOut', 'type': 'long'}, + 'directories_errored_out': {'key': 'directoriesErroredOut', 'type': 'long'}, + 'invalid_directories_processed': {'key': 'invalidDirectoriesProcessed', 'type': 'long'}, + 'is_enumeration_in_progress': {'key': 'isEnumerationInProgress', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CopyProgress, self).__init__(**kwargs) + self.storage_account_name = None + self.transfer_type = None + self.data_account_type = None + self.account_id = None + self.bytes_processed = None + self.total_bytes_to_process = None + self.files_processed = None + self.total_files_to_process = None + self.invalid_files_processed = None + self.invalid_file_bytes_uploaded = None + self.renamed_container_count = None + self.files_errored_out = None + self.directories_errored_out = None + self.invalid_directories_processed = None + self.is_enumeration_in_progress = None + + +class ValidationRequest(msrest.serialization.Model): + """Minimum request requirement of any validation category. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CreateJobValidations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_03_01.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + _subtype_map = { + 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} + } + + def __init__( + self, + *, + individual_request_details: List["ValidationInputRequest"], + **kwargs + ): + super(ValidationRequest, self).__init__(**kwargs) + self.validation_category = None # type: Optional[str] + self.individual_request_details = individual_request_details + + +class CreateJobValidations(ValidationRequest): + """It does all pre-job creation validations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_03_01.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + def __init__( + self, + *, + individual_request_details: List["ValidationInputRequest"], + **kwargs + ): + super(CreateJobValidations, self).__init__(individual_request_details=individual_request_details, **kwargs) + self.validation_category = 'JobCreationValidation' # type: str + + +class ValidationInputRequest(msrest.serialization.Model): + """Minimum fields that must be present in any type of validation request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ValidateAddress, CreateOrderLimitForSubscriptionValidationRequest, DataTransferDetailsValidationRequest, PreferencesValidationRequest, SkuAvailabilityValidationRequest, SubscriptionIsAllowedToCreateJobValidationRequest. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'ValidateAddress', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputRequest, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + + +class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): + """Request to validate create order limit for current subscription. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.device_type = device_type + + +class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInputResponse): + """Properties of create order limit for subscription validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar status: Create order limit validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.status = None + + +class DataAccountDetails(msrest.serialization.Model): + """Account details of the data to be transferred. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedDiskDetails, StorageAccountDetails. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + } + + _subtype_map = { + 'data_account_type': {'ManagedDisk': 'ManagedDiskDetails', 'StorageAccount': 'StorageAccountDetails'} + } + + def __init__( + self, + *, + share_password: Optional[str] = None, + **kwargs + ): + super(DataAccountDetails, self).__init__(**kwargs) + self.data_account_type = None # type: Optional[str] + self.share_password = share_password + + +class DataBoxAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account of a DataBox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: str + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when + LogCollectionLevel is set to Verbose. + :vartype copy_verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': 'str'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBox' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxDiskCopyLogDetails(CopyLogDetails): + """Copy Log Details for a disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar disk_serial_number: Disk Serial Number. + :vartype disk_serial_number: str + :ivar error_log_link: Link for copy error logs. + :vartype error_log_link: str + :ivar verbose_log_link: Link for copy verbose logs. + :vartype verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'disk_serial_number': {'readonly': True}, + 'error_log_link': {'readonly': True}, + 'verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'error_log_link': {'key': 'errorLogLink', 'type': 'str'}, + 'verbose_log_link': {'key': 'verboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxDisk' # type: str + self.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + + +class DataBoxDiskCopyProgress(msrest.serialization.Model): + """DataBox Disk Copy Progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar serial_number: The serial number of the disk. + :vartype serial_number: str + :ivar bytes_copied: Bytes copied during the copy of disk. + :vartype bytes_copied: long + :ivar percent_complete: Indicates the percentage completed for the copy of the disk. + :vartype percent_complete: int + :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", + "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", + "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.CopyStatus + """ + + _validation = { + 'serial_number': {'readonly': True}, + 'bytes_copied': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.bytes_copied = None + self.percent_complete = None + self.status = None + + +class JobDetails(msrest.serialization.Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxJobDetails, DataBoxDiskJobDetails, DataBoxHeavyJobDetails. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_03_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_03_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_03_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_03_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_03_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_03_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_03_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_03_01.models.LastMitigationActionOnJob + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + } + + _subtype_map = { + 'job_details_type': {'DataBox': 'DataBoxJobDetails', 'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails'} + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + **kwargs + ): + super(JobDetails, self).__init__(**kwargs) + self.job_stages = None + self.contact_details = contact_details + self.shipping_address = shipping_address + self.delivery_package = None + self.return_package = None + self.data_import_details = data_import_details + self.data_export_details = data_export_details + self.job_details_type = None # type: Optional[str] + self.preferences = preferences + self.copy_log_details = None + self.reverse_shipment_label_sas_key = None + self.chain_of_custody_sas_key = None + self.key_encryption_key = key_encryption_key + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes + self.actions = None + self.last_mitigation_action_on_job = None + + +class DataBoxDiskJobDetails(JobDetails): + """DataBox Disk Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_03_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_03_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_03_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_03_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_03_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_03_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_03_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_03_01.models.LastMitigationActionOnJob + :param preferred_disks: User preference on what size disks are needed for the job. The map is + from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but + will be checked against an int. + :type preferred_disks: dict[str, int] + :ivar copy_progress: Copy progress per disk. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_03_01.models.DataBoxDiskCopyProgress] + :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being + used for the job. Is returned only after the disks are shipped to the customer. + :vartype disks_and_size_details: dict[str, int] + :param passkey: User entered passkey for DataBox Disk job. + :type passkey: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + 'disks_and_size_details': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, + 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, + 'passkey': {'key': 'passkey', 'type': 'str'}, + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + preferred_disks: Optional[Dict[str, int]] = None, + passkey: Optional[str] = None, + **kwargs + ): + super(DataBoxDiskJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) + self.job_details_type = 'DataBoxDisk' # type: str + self.preferred_disks = preferred_disks + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = passkey + + +class JobSecrets(msrest.serialization.Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataboxJobSecrets, DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_03_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBox': 'DataboxJobSecrets', 'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets'} + } + + def __init__( + self, + **kwargs + ): + super(JobSecrets, self).__init__(**kwargs) + self.job_secrets_type = None # type: Optional[str] + self.dc_access_security_code = None + self.error = None + + +class DataBoxDiskJobSecrets(JobSecrets): + """The secrets related to disk job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_03_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.v2021_03_01.models.DiskSecret] + :ivar pass_key: PassKey for the disk Job. + :vartype pass_key: str + :ivar is_passkey_user_defined: Whether passkey was provided by user. + :vartype is_passkey_user_defined: bool + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'pass_key': {'key': 'passKey', 'type': 'str'}, + 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxDisk' # type: str + self.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + + +class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account for Databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: list[str] + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when the + LogCollectionLevel is set to verbose. + :vartype copy_verbose_log_link: list[str] + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': '[str]'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxHeavy' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxHeavyJobDetails(JobDetails): + """Databox Heavy Device Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_03_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_03_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_03_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_03_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_03_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_03_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_03_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_03_01.models.LastMitigationActionOnJob + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_03_01.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox Heavy. Should not be passed + for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + device_password: Optional[str] = None, + **kwargs + ): + super(DataBoxHeavyJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) + self.job_details_type = 'DataBoxHeavy' # type: str + self.copy_progress = None + self.device_password = device_password + + +class DataBoxHeavyJobSecrets(JobSecrets): + """The secrets related to a databox heavy job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_03_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2021_03_01.models.DataBoxHeavySecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxHeavy' # type: str + self.cabinet_pod_secrets = None + + +class DataBoxHeavySecret(msrest.serialization.Model): + """The secrets related to a databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_03_01.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_03_01.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavySecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DataBoxJobDetails(JobDetails): + """Databox Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_03_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_03_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_03_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_03_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_03_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_03_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_03_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_03_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_03_01.models.LastMitigationActionOnJob + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_03_01.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox. Should not be passed for + TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password + itself. This will not be returned in Get Call. Password Requirements : Password must be + minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, + one number and one special character. Password cannot have the following characters : IilLoO0 + Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + device_password: Optional[str] = None, + **kwargs + ): + super(DataBoxJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) + self.job_details_type = 'DataBox' # type: str + self.copy_progress = None + self.device_password = device_password + + +class DataboxJobSecrets(JobSecrets): + """The secrets related to a databox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_03_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_03_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.v2021_03_01.models.DataBoxSecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__( + self, + *, + pod_secrets: Optional[List["DataBoxSecret"]] = None, + **kwargs + ): + super(DataboxJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBox' # type: str + self.pod_secrets = pod_secrets + + +class ScheduleAvailabilityRequest(msrest.serialization.Model): + """Request body to get the availability for scheduling orders. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxScheduleAvailabilityRequest, DiskScheduleAvailabilityRequest, HeavyScheduleAvailabilityRequest. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + _subtype_map = { + 'sku_name': {'DataBox': 'DataBoxScheduleAvailabilityRequest', 'DataBoxDisk': 'DiskScheduleAvailabilityRequest', 'DataBoxHeavy': 'HeavyScheduleAvailabilityRequest'} + } + + def __init__( + self, + *, + storage_location: str, + country: Optional[str] = None, + **kwargs + ): + super(ScheduleAvailabilityRequest, self).__init__(**kwargs) + self.storage_location = storage_location + self.sku_name = None # type: Optional[str] + self.country = country + + +class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling data box orders orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_location: str, + country: Optional[str] = None, + **kwargs + ): + super(DataBoxScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBox' # type: str + + +class DataBoxSecret(msrest.serialization.Model): + """The secrets related to a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_03_01.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_03_01.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxSecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DataExportDetails(msrest.serialization.Model): + """Details of the data to be used for exporting data from azure. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration: Required. Configuration for the data transfer. + :type transfer_configuration: ~azure.mgmt.databox.v2021_03_01.models.TransferConfiguration + :param log_collection_level: Level of the logs to be collected. Possible values include: + "Error", "Verbose". Default value: "Error". + :type log_collection_level: str or ~azure.mgmt.databox.v2021_03_01.models.LogCollectionLevel + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_03_01.models.DataAccountDetails + """ + + _validation = { + 'transfer_configuration': {'required': True}, + 'account_details': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration': {'key': 'transferConfiguration', 'type': 'TransferConfiguration'}, + 'log_collection_level': {'key': 'logCollectionLevel', 'type': 'str'}, + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + *, + transfer_configuration: "TransferConfiguration", + account_details: "DataAccountDetails", + log_collection_level: Optional[Union[str, "LogCollectionLevel"]] = "Error", + **kwargs + ): + super(DataExportDetails, self).__init__(**kwargs) + self.transfer_configuration = transfer_configuration + self.log_collection_level = log_collection_level + self.account_details = account_details + + +class DataImportDetails(msrest.serialization.Model): + """Details of the data to be used for importing data to azure. + + All required parameters must be populated in order to send to Azure. + + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_03_01.models.DataAccountDetails + """ + + _validation = { + 'account_details': {'required': True}, + } + + _attribute_map = { + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + *, + account_details: "DataAccountDetails", + **kwargs + ): + super(DataImportDetails, self).__init__(**kwargs) + self.account_details = account_details + + +class DataLocationToServiceLocationMap(msrest.serialization.Model): + """Map of data location to service location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar data_location: Location of the data. + :vartype data_location: str + :ivar service_location: Location of the service. + :vartype service_location: str + """ + + _validation = { + 'data_location': {'readonly': True}, + 'service_location': {'readonly': True}, + } + + _attribute_map = { + 'data_location': {'key': 'dataLocation', 'type': 'str'}, + 'service_location': {'key': 'serviceLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataLocationToServiceLocationMap, self).__init__(**kwargs) + self.data_location = None + self.service_location = None + + +class DataTransferDetailsValidationRequest(ValidationInputRequest): + """Request to validate export and import data details. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :param data_export_details: List of DataTransfer details to be used to export data from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_03_01.models.DataExportDetails] + :param data_import_details: List of DataTransfer details to be used to import data to azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_03_01.models.DataImportDetails] + :param device_type: Required. Device type. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransferType + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + transfer_type: Union[str, "TransferType"], + data_export_details: Optional[List["DataExportDetails"]] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + **kwargs + ): + super(DataTransferDetailsValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.data_export_details = data_export_details + self.data_import_details = data_import_details + self.device_type = device_type + self.transfer_type = transfer_type + + +class DataTransferDetailsValidationResponseProperties(ValidationInputResponse): + """Properties of data transfer details validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar status: Data transfer details validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTransferDetailsValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.status = None + + +class DcAccessSecurityCode(msrest.serialization.Model): + """Dc access security code. + + :param reverse_dc_access_code: Reverse Dc access security code. + :type reverse_dc_access_code: str + :param forward_dc_access_code: Forward Dc access security code. + :type forward_dc_access_code: str + """ + + _attribute_map = { + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, + } + + def __init__( + self, + *, + reverse_dc_access_code: Optional[str] = None, + forward_dc_access_code: Optional[str] = None, + **kwargs + ): + super(DcAccessSecurityCode, self).__init__(**kwargs) + self.reverse_dc_access_code = reverse_dc_access_code + self.forward_dc_access_code = forward_dc_access_code + + +class Details(msrest.serialization.Model): + """Details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: str, + message: str, + **kwargs + ): + super(Details, self).__init__(**kwargs) + self.code = code + self.message = message + + +class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling disk orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + } + + def __init__( + self, + *, + storage_location: str, + expected_data_size_in_tera_bytes: int, + country: Optional[str] = None, + **kwargs + ): + super(DiskScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBoxDisk' # type: str + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes + + +class DiskSecret(msrest.serialization.Model): + """Contains all the secrets of a Disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar disk_serial_number: Serial number of the assigned disk. + :vartype disk_serial_number: str + :ivar bit_locker_key: Bit Locker key of the disk which can be used to unlock the disk to copy + data. + :vartype bit_locker_key: str + """ + + _validation = { + 'disk_serial_number': {'readonly': True}, + 'bit_locker_key': {'readonly': True}, + } + + _attribute_map = { + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskSecret, self).__init__(**kwargs) + self.disk_serial_number = None + self.bit_locker_key = None + + +class EncryptionPreferences(msrest.serialization.Model): + """Preferences related to the Encryption. + + :param double_encryption: Defines secondary layer of software-based encryption enablement. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type double_encryption: str or ~azure.mgmt.databox.v2021_03_01.models.DoubleEncryption + """ + + _attribute_map = { + 'double_encryption': {'key': 'doubleEncryption', 'type': 'str'}, + } + + def __init__( + self, + *, + double_encryption: Optional[Union[str, "DoubleEncryption"]] = "Disabled", + **kwargs + ): + super(EncryptionPreferences, self).__init__(**kwargs) + self.double_encryption = double_encryption + + +class ErrorDetail(msrest.serialization.Model): + """ErrorDetail. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + :param details: + :type details: list[~azure.mgmt.databox.v2021_03_01.models.Details] + :param target: + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Details]'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + *, + code: str, + message: str, + details: Optional[List["Details"]] = None, + target: Optional[str] = None, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + self.target = target + + +class FilterFileDetails(msrest.serialization.Model): + """Details of the filter files to be used for data transfer. + + All required parameters must be populated in order to send to Azure. + + :param filter_file_type: Required. Type of the filter file. Possible values include: + "AzureBlob", "AzureFile". + :type filter_file_type: str or ~azure.mgmt.databox.v2021_03_01.models.FilterFileType + :param filter_file_path: Required. Path of the file that contains the details of all items to + transfer. + :type filter_file_path: str + """ + + _validation = { + 'filter_file_type': {'required': True}, + 'filter_file_path': {'required': True}, + } + + _attribute_map = { + 'filter_file_type': {'key': 'filterFileType', 'type': 'str'}, + 'filter_file_path': {'key': 'filterFilePath', 'type': 'str'}, + } + + def __init__( + self, + *, + filter_file_type: Union[str, "FilterFileType"], + filter_file_path: str, + **kwargs + ): + super(FilterFileDetails, self).__init__(**kwargs) + self.filter_file_type = filter_file_type + self.filter_file_path = filter_file_path + + +class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling heavy orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_location: str, + country: Optional[str] = None, + **kwargs + ): + super(HeavyScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBoxHeavy' # type: str + + +class IdentityProperties(msrest.serialization.Model): + """Managed identity properties. + + :param type: Managed service identity type. + :type type: str + :param user_assigned: User assigned identity properties. + :type user_assigned: ~azure.mgmt.databox.v2021_03_01.models.UserAssignedProperties + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned': {'key': 'userAssigned', 'type': 'UserAssignedProperties'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + user_assigned: Optional["UserAssignedProperties"] = None, + **kwargs + ): + super(IdentityProperties, self).__init__(**kwargs) + self.type = type + self.user_assigned = user_assigned + + +class JobDeliveryInfo(msrest.serialization.Model): + """Additional delivery info. + + :param scheduled_date_time: Scheduled date time. + :type scheduled_date_time: ~datetime.datetime + """ + + _attribute_map = { + 'scheduled_date_time': {'key': 'scheduledDateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + scheduled_date_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(JobDeliveryInfo, self).__init__(**kwargs) + self.scheduled_date_time = scheduled_date_time + + +class Resource(msrest.serialization.Model): + """Model of the Resource. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_03_01.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_03_01.models.ResourceIdentity + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + } + + def __init__( + self, + *, + location: str, + sku: "Sku", + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceIdentity"] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.sku = sku + self.identity = identity + + +class JobResource(Resource): + """Job Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_03_01.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_03_01.models.ResourceIdentity + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.databox.v2021_03_01.models.SystemData + :param transfer_type: Required. Type of the data transfer. Possible values include: + "ImportToAzure", "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransferType + :ivar is_cancellable: Describes whether the job is cancellable or not. + :vartype is_cancellable: bool + :ivar is_deletable: Describes whether the job is deletable or not. + :vartype is_deletable: bool + :ivar is_shipping_address_editable: Describes whether the shipping address is editable or not. + :vartype is_shipping_address_editable: bool + :ivar is_prepare_to_ship_enabled: Is Prepare To Ship Enabled on this job. + :vartype is_prepare_to_ship_enabled: bool + :ivar status: Name of the stage which is in progress. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :param details: Details of a job run. This field will only be sent for expand details filter. + :type details: ~azure.mgmt.databox.v2021_03_01.models.JobDetails + :ivar cancellation_reason: Reason for cancellation. + :vartype cancellation_reason: str + :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2021_03_01.models.JobDeliveryType + :param delivery_info: Delivery Info of Job. + :type delivery_info: ~azure.mgmt.databox.v2021_03_01.models.JobDeliveryInfo + :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. + :vartype is_cancellable_without_fee: bool + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'transfer_type': {'required': True}, + 'is_cancellable': {'readonly': True}, + 'is_deletable': {'readonly': True}, + 'is_shipping_address_editable': {'readonly': True}, + 'is_prepare_to_ship_enabled': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'error': {'readonly': True}, + 'cancellation_reason': {'readonly': True}, + 'is_cancellable_without_fee': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'transfer_type': {'key': 'properties.transferType', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, + 'is_shipping_address_editable': {'key': 'properties.isShippingAddressEditable', 'type': 'bool'}, + 'is_prepare_to_ship_enabled': {'key': 'properties.isPrepareToShipEnabled', 'type': 'bool'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'details': {'key': 'properties.details', 'type': 'JobDetails'}, + 'cancellation_reason': {'key': 'properties.cancellationReason', 'type': 'str'}, + 'delivery_type': {'key': 'properties.deliveryType', 'type': 'str'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, + 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, + } + + def __init__( + self, + *, + location: str, + sku: "Sku", + transfer_type: Union[str, "TransferType"], + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceIdentity"] = None, + details: Optional["JobDetails"] = None, + delivery_type: Optional[Union[str, "JobDeliveryType"]] = "NonScheduled", + delivery_info: Optional["JobDeliveryInfo"] = None, + **kwargs + ): + super(JobResource, self).__init__(location=location, tags=tags, sku=sku, identity=identity, **kwargs) + self.name = None + self.id = None + self.type = None + self.system_data = None + self.transfer_type = transfer_type + self.is_cancellable = None + self.is_deletable = None + self.is_shipping_address_editable = None + self.is_prepare_to_ship_enabled = None + self.status = None + self.start_time = None + self.error = None + self.details = details + self.cancellation_reason = None + self.delivery_type = delivery_type + self.delivery_info = delivery_info + self.is_cancellable_without_fee = None + + +class JobResourceList(msrest.serialization.Model): + """Job Resource Collection. + + :param value: List of job resources. + :type value: list[~azure.mgmt.databox.v2021_03_01.models.JobResource] + :param next_link: Link for the next set of job resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[JobResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["JobResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(JobResourceList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class JobResourceUpdateParameter(msrest.serialization.Model): + """The JobResourceUpdateParameter. + + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_03_01.models.ResourceIdentity + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.v2021_03_01.models.UpdateJobDetails + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceIdentity"] = None, + details: Optional["UpdateJobDetails"] = None, + **kwargs + ): + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.tags = tags + self.identity = identity + self.details = details + + +class JobStages(msrest.serialization.Model): + """Job stages. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar stage_name: Name of the job stage. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". + :vartype stage_name: str or ~azure.mgmt.databox.v2021_03_01.models.StageName + :ivar display_name: Display name of the job stage. + :vartype display_name: str + :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", + "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors", + "WaitingForCustomerAction", "SucceededWithWarnings". + :vartype stage_status: str or ~azure.mgmt.databox.v2021_03_01.models.StageStatus + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: ~datetime.datetime + :ivar job_stage_details: Job Stage Details. + :vartype job_stage_details: any + """ + + _validation = { + 'stage_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'stage_status': {'readonly': True}, + 'stage_time': {'readonly': True}, + 'job_stage_details': {'readonly': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'str'}, + 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, + 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(JobStages, self).__init__(**kwargs) + self.stage_name = None + self.display_name = None + self.stage_status = None + self.stage_time = None + self.job_stage_details = None + + +class KeyEncryptionKey(msrest.serialization.Model): + """Encryption key containing details about key to encrypt different keys. + + All required parameters must be populated in order to send to Azure. + + :param kek_type: Required. Type of encryption key used for key encryption. Possible values + include: "MicrosoftManaged", "CustomerManaged". Default value: "MicrosoftManaged". + :type kek_type: str or ~azure.mgmt.databox.v2021_03_01.models.KekType + :param identity_properties: Managed identity properties used for key encryption. + :type identity_properties: ~azure.mgmt.databox.v2021_03_01.models.IdentityProperties + :param kek_url: Key encryption key. It is required in case of Customer managed KekType. + :type kek_url: str + :param kek_vault_resource_id: Kek vault resource id. It is required in case of Customer managed + KekType. + :type kek_vault_resource_id: str + """ + + _validation = { + 'kek_type': {'required': True}, + } + + _attribute_map = { + 'kek_type': {'key': 'kekType', 'type': 'str'}, + 'identity_properties': {'key': 'identityProperties', 'type': 'IdentityProperties'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'kek_vault_resource_id': {'key': 'kekVaultResourceID', 'type': 'str'}, + } + + def __init__( + self, + *, + kek_type: Union[str, "KekType"] = "MicrosoftManaged", + identity_properties: Optional["IdentityProperties"] = None, + kek_url: Optional[str] = None, + kek_vault_resource_id: Optional[str] = None, + **kwargs + ): + super(KeyEncryptionKey, self).__init__(**kwargs) + self.kek_type = kek_type + self.identity_properties = identity_properties + self.kek_url = kek_url + self.kek_vault_resource_id = kek_vault_resource_id + + +class LastMitigationActionOnJob(msrest.serialization.Model): + """Last Mitigation Action Performed On Job. + + :param action_date_time_in_utc: Action performed date time. + :type action_date_time_in_utc: ~datetime.datetime + :param is_performed_by_customer: Action performed by customer, + possibility is that mitigation might happen by customer or service or by ops. + :type is_performed_by_customer: bool + :param customer_resolution: Resolution code provided by customer. Possible values include: + "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution: str or ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode + """ + + _attribute_map = { + 'action_date_time_in_utc': {'key': 'actionDateTimeInUtc', 'type': 'iso-8601'}, + 'is_performed_by_customer': {'key': 'isPerformedByCustomer', 'type': 'bool'}, + 'customer_resolution': {'key': 'customerResolution', 'type': 'str'}, + } + + def __init__( + self, + *, + action_date_time_in_utc: Optional[datetime.datetime] = None, + is_performed_by_customer: Optional[bool] = None, + customer_resolution: Optional[Union[str, "CustomerResolutionCode"]] = None, + **kwargs + ): + super(LastMitigationActionOnJob, self).__init__(**kwargs) + self.action_date_time_in_utc = action_date_time_in_utc + self.is_performed_by_customer = is_performed_by_customer + self.customer_resolution = customer_resolution + + +class ManagedDiskDetails(DataAccountDetails): + """Details of the managed disks. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param resource_group_id: Required. Resource Group Id of the compute disks. + :type resource_group_id: str + :param staging_storage_account_id: Required. Resource Id of the storage account that can be + used to copy the vhd for staging. + :type staging_storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'resource_group_id': {'required': True}, + 'staging_storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + 'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_group_id: str, + staging_storage_account_id: str, + share_password: Optional[str] = None, + **kwargs + ): + super(ManagedDiskDetails, self).__init__(share_password=share_password, **kwargs) + self.data_account_type = 'ManagedDisk' # type: str + self.resource_group_id = resource_group_id + self.staging_storage_account_id = staging_storage_account_id + + +class MitigateJobRequest(msrest.serialization.Model): + """The Mitigate Job captured from request body for Mitigate API. + + All required parameters must be populated in order to send to Azure. + + :param customer_resolution_code: Required. Resolution code for the job. Possible values + include: "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution_code: str or + ~azure.mgmt.databox.v2021_03_01.models.CustomerResolutionCode + """ + + _validation = { + 'customer_resolution_code': {'required': True}, + } + + _attribute_map = { + 'customer_resolution_code': {'key': 'customerResolutionCode', 'type': 'str'}, + } + + def __init__( + self, + *, + customer_resolution_code: Union[str, "CustomerResolutionCode"], + **kwargs + ): + super(MitigateJobRequest, self).__init__(**kwargs) + self.customer_resolution_code = customer_resolution_code + + +class NotificationPreference(msrest.serialization.Model): + """Notification preference for a job stage. + + All required parameters must be populated in order to send to Azure. + + :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", + "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". + :type stage_name: str or ~azure.mgmt.databox.v2021_03_01.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__( + self, + *, + stage_name: Union[str, "NotificationStageName"], + send_notification: bool = True, + **kwargs + ): + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = stage_name + self.send_notification = send_notification + + +class Operation(msrest.serialization.Model): + """Operation entity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the operation. Format: + {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. + :vartype name: str + :ivar display: Operation display values. + :vartype display: ~azure.mgmt.databox.v2021_03_01.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: any + :ivar origin: Origin of the operation. Can be : user|system|user,system. + :vartype origin: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'properties': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + *, + is_data_action: Optional[bool] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.properties = None + self.origin = None + self.is_data_action = is_data_action + + +class OperationDisplay(msrest.serialization.Model): + """Operation display. + + :param provider: Provider name. + :type provider: str + :param resource: Resource name. + :type resource: str + :param operation: Localized name of the operation for display purpose. + :type operation: str + :param description: Localized description of the operation for display purpose. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationList(msrest.serialization.Model): + """Operation Collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations. + :vartype value: list[~azure.mgmt.databox.v2021_03_01.models.Operation] + :param next_link: Link for the next set of operations. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(OperationList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class PackageShippingDetails(msrest.serialization.Model): + """Shipping details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar carrier_name: Name of the carrier. + :vartype carrier_name: str + :ivar tracking_id: Tracking Id of shipment. + :vartype tracking_id: str + :ivar tracking_url: Url where shipment can be tracked. + :vartype tracking_url: str + """ + + _validation = { + 'carrier_name': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'tracking_url': {'readonly': True}, + } + + _attribute_map = { + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PackageShippingDetails, self).__init__(**kwargs) + self.carrier_name = None + self.tracking_id = None + self.tracking_url = None + + +class Preferences(msrest.serialization.Model): + """Preferences related to the order. + + :param preferred_data_center_region: Preferred data center region. + :type preferred_data_center_region: list[str] + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.v2021_03_01.models.TransportPreferences + :param encryption_preferences: Preferences related to the Encryption. + :type encryption_preferences: ~azure.mgmt.databox.v2021_03_01.models.EncryptionPreferences + """ + + _attribute_map = { + 'preferred_data_center_region': {'key': 'preferredDataCenterRegion', 'type': '[str]'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + 'encryption_preferences': {'key': 'encryptionPreferences', 'type': 'EncryptionPreferences'}, + } + + def __init__( + self, + *, + preferred_data_center_region: Optional[List[str]] = None, + transport_preferences: Optional["TransportPreferences"] = None, + encryption_preferences: Optional["EncryptionPreferences"] = None, + **kwargs + ): + super(Preferences, self).__init__(**kwargs) + self.preferred_data_center_region = preferred_data_center_region + self.transport_preferences = transport_preferences + self.encryption_preferences = encryption_preferences + + +class PreferencesValidationRequest(ValidationInputRequest): + """Request to validate preference of transport and data center. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :param preference: Preference of transport and data center. + :type preference: ~azure.mgmt.databox.v2021_03_01.models.Preferences + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'preference': {'key': 'preference', 'type': 'Preferences'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + preference: Optional["Preferences"] = None, + **kwargs + ): + super(PreferencesValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.preference = preference + self.device_type = device_type + + +class PreferencesValidationResponseProperties(ValidationInputResponse): + """Properties of data center and transport preference validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar status: Validation status of requested data center and transport. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.status = None + + +class RegionConfigurationRequest(msrest.serialization.Model): + """Request body to get the configuration for the region. + + :param schedule_availability_request: Request body to get the availability for scheduling + orders. + :type schedule_availability_request: + ~azure.mgmt.databox.v2021_03_01.models.ScheduleAvailabilityRequest + :param transport_availability_request: Request body to get the transport availability for given + sku. + :type transport_availability_request: + ~azure.mgmt.databox.v2021_03_01.models.TransportAvailabilityRequest + """ + + _attribute_map = { + 'schedule_availability_request': {'key': 'scheduleAvailabilityRequest', 'type': 'ScheduleAvailabilityRequest'}, + 'transport_availability_request': {'key': 'transportAvailabilityRequest', 'type': 'TransportAvailabilityRequest'}, + } + + def __init__( + self, + *, + schedule_availability_request: Optional["ScheduleAvailabilityRequest"] = None, + transport_availability_request: Optional["TransportAvailabilityRequest"] = None, + **kwargs + ): + super(RegionConfigurationRequest, self).__init__(**kwargs) + self.schedule_availability_request = schedule_availability_request + self.transport_availability_request = transport_availability_request + + +class RegionConfigurationResponse(msrest.serialization.Model): + """Configuration response specific to a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar schedule_availability_response: Schedule availability for given sku in a region. + :vartype schedule_availability_response: + ~azure.mgmt.databox.v2021_03_01.models.ScheduleAvailabilityResponse + :ivar transport_availability_response: Transport options available for given sku in a region. + :vartype transport_availability_response: + ~azure.mgmt.databox.v2021_03_01.models.TransportAvailabilityResponse + """ + + _validation = { + 'schedule_availability_response': {'readonly': True}, + 'transport_availability_response': {'readonly': True}, + } + + _attribute_map = { + 'schedule_availability_response': {'key': 'scheduleAvailabilityResponse', 'type': 'ScheduleAvailabilityResponse'}, + 'transport_availability_response': {'key': 'transportAvailabilityResponse', 'type': 'TransportAvailabilityResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(RegionConfigurationResponse, self).__init__(**kwargs) + self.schedule_availability_response = None + self.transport_availability_response = None + + +class ResourceIdentity(msrest.serialization.Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: Identity type. + :type type: str + :ivar principal_id: Service Principal Id backing the Msi. + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id. + :vartype tenant_id: str + :param user_assigned_identities: User Assigned Identities. + :type user_assigned_identities: dict[str, + ~azure.mgmt.databox.v2021_03_01.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + *, + type: Optional[str] = "None", + user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None, + **kwargs + ): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = None + self.tenant_id = None + self.user_assigned_identities = user_assigned_identities + + +class ScheduleAvailabilityResponse(msrest.serialization.Model): + """Schedule availability for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar available_dates: List of dates available to schedule. + :vartype available_dates: list[~datetime.datetime] + """ + + _validation = { + 'available_dates': {'readonly': True}, + } + + _attribute_map = { + 'available_dates': {'key': 'availableDates', 'type': '[iso-8601]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduleAvailabilityResponse, self).__init__(**kwargs) + self.available_dates = None + + +class ShareCredentialDetails(msrest.serialization.Model): + """Credential details of the shares in account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar share_name: Name of the share. + :vartype share_name: str + :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", + "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". + :vartype share_type: str or ~azure.mgmt.databox.v2021_03_01.models.ShareDestinationFormatType + :ivar user_name: User name for the share. + :vartype user_name: str + :ivar password: Password for the share. + :vartype password: str + :ivar supported_access_protocols: Access protocols supported on the device. + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2021_03_01.models.AccessProtocol] + """ + + _validation = { + 'share_name': {'readonly': True}, + 'share_type': {'readonly': True}, + 'user_name': {'readonly': True}, + 'password': {'readonly': True}, + 'supported_access_protocols': {'readonly': True}, + } + + _attribute_map = { + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'share_type': {'key': 'shareType', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareCredentialDetails, self).__init__(**kwargs) + self.share_name = None + self.share_type = None + self.user_name = None + self.password = None + self.supported_access_protocols = None + + +class ShipmentPickUpRequest(msrest.serialization.Model): + """Shipment pick up request details. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. Minimum date after which the pick up should commence, this must be + in local time of pick up area. + :type start_time: ~datetime.datetime + :param end_time: Required. Maximum date before which the pick up should commence, this must be + in local time of pick up area. + :type end_time: ~datetime.datetime + :param shipment_location: Required. Shipment Location in the pickup place. Eg.front desk. + :type shipment_location: str + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + 'shipment_location': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'shipment_location': {'key': 'shipmentLocation', 'type': 'str'}, + } + + def __init__( + self, + *, + start_time: datetime.datetime, + end_time: datetime.datetime, + shipment_location: str, + **kwargs + ): + super(ShipmentPickUpRequest, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.shipment_location = shipment_location + + +class ShipmentPickUpResponse(msrest.serialization.Model): + """Shipment pick up response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar confirmation_number: Confirmation number for the pick up request. + :vartype confirmation_number: str + :ivar ready_by_time: Time by which shipment should be ready for pick up, this is in local time + of pick up area. + :vartype ready_by_time: ~datetime.datetime + """ + + _validation = { + 'confirmation_number': {'readonly': True}, + 'ready_by_time': {'readonly': True}, + } + + _attribute_map = { + 'confirmation_number': {'key': 'confirmationNumber', 'type': 'str'}, + 'ready_by_time': {'key': 'readyByTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ShipmentPickUpResponse, self).__init__(**kwargs) + self.confirmation_number = None + self.ready_by_time = None + + +class ShippingAddress(msrest.serialization.Model): + """Shipping address where customer wishes to receive the device. + + All required parameters must be populated in order to send to Azure. + + :param street_address1: Required. Street Address line 1. + :type street_address1: str + :param street_address2: Street Address line 2. + :type street_address2: str + :param street_address3: Street Address line 3. + :type street_address3: str + :param city: Name of the City. + :type city: str + :param state_or_province: Name of the State or Province. + :type state_or_province: str + :param country: Required. Name of the Country. + :type country: str + :param postal_code: Postal code. + :type postal_code: str + :param zip_extended_code: Extended Zip Code. + :type zip_extended_code: str + :param company_name: Name of the company. + :type company_name: str + :param address_type: Type of address. Possible values include: "None", "Residential", + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2021_03_01.models.AddressType + """ + + _validation = { + 'street_address1': {'required': True}, + 'country': {'required': True}, + } + + _attribute_map = { + 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, + 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, + 'street_address3': {'key': 'streetAddress3', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'zip_extended_code': {'key': 'zipExtendedCode', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'address_type': {'key': 'addressType', 'type': 'str'}, + } + + def __init__( + self, + *, + street_address1: str, + country: str, + street_address2: Optional[str] = None, + street_address3: Optional[str] = None, + city: Optional[str] = None, + state_or_province: Optional[str] = None, + postal_code: Optional[str] = None, + zip_extended_code: Optional[str] = None, + company_name: Optional[str] = None, + address_type: Optional[Union[str, "AddressType"]] = "None", + **kwargs + ): + super(ShippingAddress, self).__init__(**kwargs) + self.street_address1 = street_address1 + self.street_address2 = street_address2 + self.street_address3 = street_address3 + self.city = city + self.state_or_province = state_or_province + self.country = country + self.postal_code = postal_code + self.zip_extended_code = zip_extended_code + self.company_name = company_name + self.address_type = address_type + + +class Sku(msrest.serialization.Model): + """The Sku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param display_name: The display name of the sku. + :type display_name: str + :param family: The sku family. + :type family: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Union[str, "SkuName"], + display_name: Optional[str] = None, + family: Optional[str] = None, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.family = family + + +class SkuAvailabilityValidationRequest(ValidationInputRequest): + """Request to validate sku availability. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + transfer_type: Union[str, "TransferType"], + country: str, + location: str, + **kwargs + ): + super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.device_type = device_type + self.transfer_type = transfer_type + self.country = country + self.location = location + + +class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): + """Properties of sku availability validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", + "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.status = None + + +class SkuCapacity(msrest.serialization.Model): + """Capacity of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar usable: Usable capacity in TB. + :vartype usable: str + :ivar maximum: Maximum capacity in TB. + :vartype maximum: str + """ + + _validation = { + 'usable': {'readonly': True}, + 'maximum': {'readonly': True}, + } + + _attribute_map = { + 'usable': {'key': 'usable', 'type': 'str'}, + 'maximum': {'key': 'maximum', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.usable = None + self.maximum = None + + +class SkuCost(msrest.serialization.Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar meter_id: Meter id of the Sku. + :vartype meter_id: str + :ivar meter_type: The type of the meter. + :vartype meter_type: str + :ivar multiplier: Multiplier specifies the region specific value to be multiplied with 1$ guid. + Eg: Our new regions will be using 1$ shipping guid with appropriate multiplier specific to + region. + :vartype multiplier: float + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'meter_type': {'readonly': True}, + 'multiplier': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_type': {'key': 'meterType', 'type': 'str'}, + 'multiplier': {'key': 'multiplier', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.meter_type = None + self.multiplier = None + + +class SkuInformation(msrest.serialization.Model): + """Information of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.databox.v2021_03_01.models.Sku + :ivar enabled: The sku is enabled or not. + :vartype enabled: bool + :ivar data_location_to_service_location_map: The map of data location to service location. + :vartype data_location_to_service_location_map: + list[~azure.mgmt.databox.v2021_03_01.models.DataLocationToServiceLocationMap] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.v2021_03_01.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.v2021_03_01.models.SkuCost] + :ivar api_versions: Api versions that support this Sku. + :vartype api_versions: list[str] + :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", + "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". + :vartype disabled_reason: str or ~azure.mgmt.databox.v2021_03_01.models.SkuDisabledReason + :ivar disabled_reason_message: Message for why the Sku is disabled. + :vartype disabled_reason_message: str + :ivar required_feature: Required feature to access the sku. + :vartype required_feature: str + """ + + _validation = { + 'sku': {'readonly': True}, + 'enabled': {'readonly': True}, + 'data_location_to_service_location_map': {'readonly': True}, + 'capacity': {'readonly': True}, + 'costs': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'disabled_reason': {'readonly': True}, + 'disabled_reason_message': {'readonly': True}, + 'required_feature': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'data_location_to_service_location_map': {'key': 'properties.dataLocationToServiceLocationMap', 'type': '[DataLocationToServiceLocationMap]'}, + 'capacity': {'key': 'properties.capacity', 'type': 'SkuCapacity'}, + 'costs': {'key': 'properties.costs', 'type': '[SkuCost]'}, + 'api_versions': {'key': 'properties.apiVersions', 'type': '[str]'}, + 'disabled_reason': {'key': 'properties.disabledReason', 'type': 'str'}, + 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, + 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuInformation, self).__init__(**kwargs) + self.sku = None + self.enabled = None + self.data_location_to_service_location_map = None + self.capacity = None + self.costs = None + self.api_versions = None + self.disabled_reason = None + self.disabled_reason_message = None + self.required_feature = None + + +class StorageAccountDetails(DataAccountDetails): + """Details for the storage account. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param storage_account_id: Required. Storage Account Resource Id. + :type storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_account_id: str, + share_password: Optional[str] = None, + **kwargs + ): + super(StorageAccountDetails, self).__init__(share_password=share_password, **kwargs) + self.data_account_type = 'StorageAccount' # type: str + self.storage_account_id = storage_account_id + + +class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): + """Request to validate subscription permission to create jobs. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + + +class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInputResponse): + """Properties of subscription permission to create job validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_03_01.models.CloudError + :ivar status: Validation status of subscription permission to create job. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + self.status = None + + +class SystemData(msrest.serialization.Model): + """Provides details about resource creation and update time. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_by: A string identifier for the identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource: user, application, + managedIdentity. + :vartype created_by_type: str + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: A string identifier for the identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource: user, + application, managedIdentity. + :vartype last_modified_by_type: str + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _validation = { + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + } + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = None + self.created_by_type = None + self.created_at = None + self.last_modified_by = None + self.last_modified_by_type = None + self.last_modified_at = None + + +class TransferAllDetails(msrest.serialization.Model): + """Details to transfer all data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :param transfer_all_blobs: To indicate if all Azure blobs have to be transferred. + :type transfer_all_blobs: bool + :param transfer_all_files: To indicate if all Azure Files have to be transferred. + :type transfer_all_files: bool + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'transfer_all_blobs': {'key': 'transferAllBlobs', 'type': 'bool'}, + 'transfer_all_files': {'key': 'transferAllFiles', 'type': 'bool'}, + } + + def __init__( + self, + *, + data_account_type: Union[str, "DataAccountType"], + transfer_all_blobs: Optional[bool] = None, + transfer_all_files: Optional[bool] = None, + **kwargs + ): + super(TransferAllDetails, self).__init__(**kwargs) + self.data_account_type = data_account_type + self.transfer_all_blobs = transfer_all_blobs + self.transfer_all_files = transfer_all_files + + +class TransferConfiguration(msrest.serialization.Model): + """Configuration for defining the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration_type: Required. Type of the configuration for transfer. Possible + values include: "TransferAll", "TransferUsingFilter". + :type transfer_configuration_type: str or + ~azure.mgmt.databox.v2021_03_01.models.TransferConfigurationType + :param transfer_filter_details: Map of filter type and the details to filter. This field is + required only if the TransferConfigurationType is given as TransferUsingFilter. + :type transfer_filter_details: + ~azure.mgmt.databox.v2021_03_01.models.TransferConfigurationTransferFilterDetails + :param transfer_all_details: Map of filter type and the details to transfer all data. This + field is required only if the TransferConfigurationType is given as TransferAll. + :type transfer_all_details: + ~azure.mgmt.databox.v2021_03_01.models.TransferConfigurationTransferAllDetails + """ + + _validation = { + 'transfer_configuration_type': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration_type': {'key': 'transferConfigurationType', 'type': 'str'}, + 'transfer_filter_details': {'key': 'transferFilterDetails', 'type': 'TransferConfigurationTransferFilterDetails'}, + 'transfer_all_details': {'key': 'transferAllDetails', 'type': 'TransferConfigurationTransferAllDetails'}, + } + + def __init__( + self, + *, + transfer_configuration_type: Union[str, "TransferConfigurationType"], + transfer_filter_details: Optional["TransferConfigurationTransferFilterDetails"] = None, + transfer_all_details: Optional["TransferConfigurationTransferAllDetails"] = None, + **kwargs + ): + super(TransferConfiguration, self).__init__(**kwargs) + self.transfer_configuration_type = transfer_configuration_type + self.transfer_filter_details = transfer_filter_details + self.transfer_all_details = transfer_all_details + + +class TransferConfigurationTransferAllDetails(msrest.serialization.Model): + """Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. + + :param include: Details to transfer all data. + :type include: ~azure.mgmt.databox.v2021_03_01.models.TransferAllDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferAllDetails'}, + } + + def __init__( + self, + *, + include: Optional["TransferAllDetails"] = None, + **kwargs + ): + super(TransferConfigurationTransferAllDetails, self).__init__(**kwargs) + self.include = include + + +class TransferConfigurationTransferFilterDetails(msrest.serialization.Model): + """Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. + + :param include: Details of the filtering the transfer of data. + :type include: ~azure.mgmt.databox.v2021_03_01.models.TransferFilterDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferFilterDetails'}, + } + + def __init__( + self, + *, + include: Optional["TransferFilterDetails"] = None, + **kwargs + ): + super(TransferConfigurationTransferFilterDetails, self).__init__(**kwargs) + self.include = include + + +class TransferFilterDetails(msrest.serialization.Model): + """Details of the filtering the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_03_01.models.DataAccountType + :param blob_filter_details: Filter details to transfer blobs. + :type blob_filter_details: ~azure.mgmt.databox.v2021_03_01.models.BlobFilterDetails + :param azure_file_filter_details: Filter details to transfer Azure files. + :type azure_file_filter_details: ~azure.mgmt.databox.v2021_03_01.models.AzureFileFilterDetails + :param filter_file_details: Details of the filter files to be used for data transfer. + :type filter_file_details: list[~azure.mgmt.databox.v2021_03_01.models.FilterFileDetails] + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'blob_filter_details': {'key': 'blobFilterDetails', 'type': 'BlobFilterDetails'}, + 'azure_file_filter_details': {'key': 'azureFileFilterDetails', 'type': 'AzureFileFilterDetails'}, + 'filter_file_details': {'key': 'filterFileDetails', 'type': '[FilterFileDetails]'}, + } + + def __init__( + self, + *, + data_account_type: Union[str, "DataAccountType"], + blob_filter_details: Optional["BlobFilterDetails"] = None, + azure_file_filter_details: Optional["AzureFileFilterDetails"] = None, + filter_file_details: Optional[List["FilterFileDetails"]] = None, + **kwargs + ): + super(TransferFilterDetails, self).__init__(**kwargs) + self.data_account_type = data_account_type + self.blob_filter_details = blob_filter_details + self.azure_file_filter_details = azure_file_filter_details + self.filter_file_details = filter_file_details + + +class TransportAvailabilityDetails(msrest.serialization.Model): + """Transport options availability details for given region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar shipment_type: Transport Shipment Type supported for given region. Possible values + include: "CustomerManaged", "MicrosoftManaged". + :vartype shipment_type: str or ~azure.mgmt.databox.v2021_03_01.models.TransportShipmentTypes + """ + + _validation = { + 'shipment_type': {'readonly': True}, + } + + _attribute_map = { + 'shipment_type': {'key': 'shipmentType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityDetails, self).__init__(**kwargs) + self.shipment_type = None + + +class TransportAvailabilityRequest(msrest.serialization.Model): + """Request body to get the transport availability for given sku. + + :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + """ + + _attribute_map = { + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__( + self, + *, + sku_name: Optional[Union[str, "SkuName"]] = None, + **kwargs + ): + super(TransportAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = sku_name + + +class TransportAvailabilityResponse(msrest.serialization.Model): + """Transport options available for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar transport_availability_details: List of transport availability details for given region. + :vartype transport_availability_details: + list[~azure.mgmt.databox.v2021_03_01.models.TransportAvailabilityDetails] + """ + + _validation = { + 'transport_availability_details': {'readonly': True}, + } + + _attribute_map = { + 'transport_availability_details': {'key': 'transportAvailabilityDetails', 'type': '[TransportAvailabilityDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityResponse, self).__init__(**kwargs) + self.transport_availability_details = None + + +class TransportPreferences(msrest.serialization.Model): + """Preferences related to the shipment logistics of the sku. + + All required parameters must be populated in order to send to Azure. + + :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2021_03_01.models.TransportShipmentTypes + """ + + _validation = { + 'preferred_shipment_type': {'required': True}, + } + + _attribute_map = { + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'str'}, + } + + def __init__( + self, + *, + preferred_shipment_type: Union[str, "TransportShipmentTypes"], + **kwargs + ): + super(TransportPreferences, self).__init__(**kwargs) + self.preferred_shipment_type = preferred_shipment_type + + +class UnencryptedCredentials(msrest.serialization.Model): + """Unencrypted credentials for accessing device. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar job_name: Name of the job. + :vartype job_name: str + :ivar job_secrets: Secrets related to this job. + :vartype job_secrets: ~azure.mgmt.databox.v2021_03_01.models.JobSecrets + """ + + _validation = { + 'job_name': {'readonly': True}, + 'job_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'job_secrets': {'key': 'jobSecrets', 'type': 'JobSecrets'}, + } + + def __init__( + self, + **kwargs + ): + super(UnencryptedCredentials, self).__init__(**kwargs) + self.job_name = None + self.job_secrets = None + + +class UnencryptedCredentialsList(msrest.serialization.Model): + """List of unencrypted credentials for accessing device. + + :param value: List of unencrypted credentials. + :type value: list[~azure.mgmt.databox.v2021_03_01.models.UnencryptedCredentials] + :param next_link: Link for the next set of unencrypted credentials. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UnencryptedCredentials]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["UnencryptedCredentials"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(UnencryptedCredentialsList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class UpdateJobDetails(msrest.serialization.Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_03_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :param key_encryption_key: Key encryption key for the job. + :type key_encryption_key: ~azure.mgmt.databox.v2021_03_01.models.KeyEncryptionKey + """ + + _attribute_map = { + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + } + + def __init__( + self, + *, + contact_details: Optional["ContactDetails"] = None, + shipping_address: Optional["ShippingAddress"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + **kwargs + ): + super(UpdateJobDetails, self).__init__(**kwargs) + self.contact_details = contact_details + self.shipping_address = shipping_address + self.key_encryption_key = key_encryption_key + + +class UserAssignedIdentity(msrest.serialization.Model): + """Class defining User assigned identity details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedProperties(msrest.serialization.Model): + """User assigned identity properties. + + :param resource_id: Arm resource id for user assigned identity to be used to fetch MSI token. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + **kwargs + ): + super(UserAssignedProperties, self).__init__(**kwargs) + self.resource_id = resource_id + + +class ValidateAddress(ValidationInputRequest): + """The requirements to validate customer address where the device needs to be shipped. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_03_01.models.ValidationInputDiscriminator + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_03_01.models.ShippingAddress + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_03_01.models.SkuName + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.v2021_03_01.models.TransportPreferences + """ + + _validation = { + 'validation_type': {'required': True}, + 'shipping_address': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__( + self, + *, + shipping_address: "ShippingAddress", + device_type: Union[str, "SkuName"], + transport_preferences: Optional["TransportPreferences"] = None, + **kwargs + ): + super(ValidateAddress, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.shipping_address = shipping_address + self.device_type = device_type + self.transport_preferences = transport_preferences + + +class ValidationResponse(msrest.serialization.Model): + """Response of pre job creation validations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Overall validation status. Possible values include: "AllValidToProceed", + "InputsRevisitRequired", "CertainInputValidationsSkipped". + :vartype status: str or ~azure.mgmt.databox.v2021_03_01.models.OverallValidationStatus + :ivar individual_response_details: List of response details contain validationType and its + response as key and value respectively. + :vartype individual_response_details: + list[~azure.mgmt.databox.v2021_03_01.models.ValidationInputResponse] + """ + + _validation = { + 'status': {'readonly': True}, + 'individual_response_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'individual_response_details': {'key': 'properties.individualResponseDetails', 'type': '[ValidationInputResponse]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidationResponse, self).__init__(**kwargs) + self.status = None + self.individual_response_details = None diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/__init__.py new file mode 100644 index 0000000000000..bd13cc67afb6e --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/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 ._operations import Operations +from ._jobs_operations import JobsOperations +from ._data_box_management_client_operations import DataBoxManagementClientOperationsMixin +from ._service_operations import ServiceOperations + +__all__ = [ + 'Operations', + 'JobsOperations', + 'DataBoxManagementClientOperationsMixin', + 'ServiceOperations', +] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_data_box_management_client_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_data_box_management_client_operations.py new file mode 100644 index 0000000000000..2ab554a043158 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_data_box_management_client_operations.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +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 HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +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]] + +class DataBoxManagementClientOperationsMixin(object): + + def mitigate( + self, + job_name, # type: str + resource_group_name, # type: str + mitigate_job_request, # type: "_models.MitigateJobRequest" + **kwargs # type: Any + ): + # type: (...) -> None + """Request to mitigate for a given job. + + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param mitigate_job_request: Mitigation Request. + :type mitigate_job_request: ~azure.mgmt.databox.v2021_03_01.models.MitigateJobRequest + :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', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.mitigate.metadata['url'] # type: ignore + path_format_arguments = { + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(mitigate_job_request, 'MitigateJobRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + mitigate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_jobs_operations.py new file mode 100644 index 0000000000000..fd542cd2f7a5f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_jobs_operations.py @@ -0,0 +1,860 @@ +# 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 +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations(object): + """JobsOperations 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.databox.v2021_03_01.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 + + def list( + self, + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobResourceList"] + """Lists all the jobs available under the subscription. + + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_03_01.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobResourceList"] + """Lists all the jobs available under the given resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_03_01.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def get( + self, + resource_group_name, # type: str + job_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.JobResource" + """Gets information about the specified job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param expand: $expand is supported on details parameter for job, which provides details on the + job stages. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobResource, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource, # type: "_models.JobResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.JobResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource, 'JobResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource, # type: "_models.JobResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.JobResource"] + """Creates a new job with the specified parameters. Existing job cannot be updated with this API + and should instead be updated with the Update job API. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource: Job details from request body. + :type job_resource: ~azure.mgmt.databox.v2021_03_01.models.JobResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2021_03_01.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource_update_parameter, # type: "_models.JobResourceUpdateParameter" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.JobResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource_update_parameter, # type: "_models.JobResourceUpdateParameter" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.JobResource"] + """Updates the properties of an existing job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource_update_parameter: Job update parameters from request body. + :type job_resource_update_parameter: ~azure.mgmt.databox.v2021_03_01.models.JobResourceUpdateParameter + :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag + of the job on the server matches this value. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2021_03_01.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource_update_parameter=job_resource_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def book_shipment_pick_up( + self, + resource_group_name, # type: str + job_name, # type: str + shipment_pick_up_request, # type: "_models.ShipmentPickUpRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ShipmentPickUpResponse" + """Book shipment pick up. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param shipment_pick_up_request: Details of shipment pick up request. + :type shipment_pick_up_request: ~azure.mgmt.databox.v2021_03_01.models.ShipmentPickUpRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShipmentPickUpResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.ShipmentPickUpResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} # type: ignore + + def cancel( + self, + resource_group_name, # type: str + job_name, # type: str + cancellation_reason, # type: "_models.CancellationReason" + **kwargs # type: Any + ): + # type: (...) -> None + """CancelJob. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.databox.v2021_03_01.models.CancellationReason + :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', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} # type: ignore + + def list_credentials( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.UnencryptedCredentialsList"] + """This method gets the unencrypted secrets related to the job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_03_01.models.UnencryptedCredentialsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('UnencryptedCredentialsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_operations.py new file mode 100644 index 0000000000000..491dcd502b64c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_operations.py @@ -0,0 +1,110 @@ +# 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 +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations 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.databox.v2021_03_01.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 + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationList"] + """This method gets all the operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_03_01.models.OperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_service_operations.py new file mode 100644 index 0000000000000..877c8b4244b9d --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/operations/_service_operations.py @@ -0,0 +1,466 @@ +# 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 +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServiceOperations(object): + """ServiceOperations 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.databox.v2021_03_01.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 + + def list_available_skus_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + available_sku_request, # type: "_models.AvailableSkuRequest" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AvailableSkusResult"] + """This method provides the list of available skus for the given subscription, resource group and + location. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param available_sku_request: Filters for showing the available skus. + :type available_sku_request: ~azure.mgmt.databox.v2021_03_01.models.AvailableSkuRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_03_01.models.AvailableSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_available_skus_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} # type: ignore + + def validate_address( + self, + location, # type: str + validate_address, # type: "_models.ValidateAddress" + **kwargs # type: Any + ): + # type: (...) -> "_models.AddressValidationOutput" + """[DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer + shipping address and provide alternate addresses if any. + + :param location: The location of the resource. + :type location: str + :param validate_address: Shipping address of the customer. + :type validate_address: ~azure.mgmt.databox.v2021_03_01.models.ValidateAddress + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressValidationOutput, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.AddressValidationOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_address.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_address, 'ValidateAddress') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressValidationOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_address.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} # type: ignore + + def validate_inputs_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + validation_request, # type: "_models.ValidationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidationResponse" + """This method does all necessary pre-job creation validation under resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_03_01.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + def validate_inputs( + self, + location, # type: str + validation_request, # type: "_models.ValidationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidationResponse" + """This method does all necessary pre-job creation validation under subscription. + + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_03_01.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + def region_configuration( + self, + location, # type: str + region_configuration_request, # type: "_models.RegionConfigurationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.RegionConfigurationResponse" + """This API provides configuration details specific to given region/location at Subscription + level. + + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region. + :type region_configuration_request: ~azure.mgmt.databox.v2021_03_01.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore + + def region_configuration_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + region_configuration_request, # type: "_models.RegionConfigurationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.RegionConfigurationResponse" + """This API provides configuration details specific to given region/location at Resource group + level. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region at + resource group level. + :type region_configuration_request: ~azure.mgmt.databox.v2021_03_01.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_03_01.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/py.typed b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_03_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/__init__.py new file mode 100644 index 0000000000000..ae972ed54f84f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/__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 ._data_box_management_client import DataBoxManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['DataBoxManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_configuration.py new file mode 100644 index 0000000000000..1b72c6956bb25 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_configuration.py @@ -0,0 +1,71 @@ +# 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 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 DataBoxManagementClientConfiguration(Configuration): + """Configuration for DataBoxManagementClient. + + 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 + :param subscription_id: The Subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataBoxManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-05-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-databox/{}'.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 = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_data_box_management_client.py new file mode 100644 index 0000000000000..136426d1c54c0 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_data_box_management_client.py @@ -0,0 +1,100 @@ +# 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.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import DataBoxManagementClientOperationsMixin +from .operations import ServiceOperations +from . import models + + +class DataBoxManagementClient(DataBoxManagementClientOperationsMixin): + """The DataBox Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.v2021_05_01.operations.Operations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.databox.v2021_05_01.operations.JobsOperations + :ivar service: ServiceOperations operations + :vartype service: azure.mgmt.databox.v2021_05_01.operations.ServiceOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataBoxManagementClientConfiguration(credential, subscription_id, **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._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> DataBoxManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_metadata.json b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_metadata.json new file mode 100644 index 0000000000000..be40b7f60a2c3 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_metadata.json @@ -0,0 +1,123 @@ +{ + "chosen_version": "2021-05-01", + "total_api_version_list": ["2021-05-01"], + "client": { + "name": "DataBoxManagementClient", + "filename": "_data_box_management_client", + "description": "The DataBox Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"], \"._operations_mixin\": [\"DataBoxManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"], \"._operations_mixin\": [\"DataBoxManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The Subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The Subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "operations": "Operations", + "jobs": "JobsOperations", + "service": "ServiceOperations" + }, + "operation_mixins": { + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "operations": { + "mitigate" : { + "sync": { + "signature": "def mitigate(\n self,\n job_name, # type: str\n resource_group_name, # type: str\n mitigate_job_request, # type: \"_models.MitigateJobRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Request to mitigate for a given job.\n\n:param job_name: The name of the job Resource within the specified resource group. job names\n must be between 3 and 24 characters in length and use any alphanumeric and underscore only.\n:type job_name: str\n:param resource_group_name: The Resource Group Name.\n:type resource_group_name: str\n:param mitigate_job_request: Mitigation Request.\n:type mitigate_job_request: ~azure.mgmt.databox.v2021_05_01.models.MitigateJobRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def mitigate(\n self,\n job_name: str,\n resource_group_name: str,\n mitigate_job_request: \"_models.MitigateJobRequest\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Request to mitigate for a given job.\n\n:param job_name: The name of the job Resource within the specified resource group. job names\n must be between 3 and 24 characters in length and use any alphanumeric and underscore only.\n:type job_name: str\n:param resource_group_name: The Resource Group Name.\n:type resource_group_name: str\n:param mitigate_job_request: Mitigation Request.\n:type mitigate_job_request: ~azure.mgmt.databox.v2021_05_01.models.MitigateJobRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "job_name, resource_group_name, mitigate_job_request" + } + } + } +} \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_version.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_version.py new file mode 100644 index 0000000000000..e5754a47ce68f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/_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 = "1.0.0b1" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/__init__.py new file mode 100644 index 0000000000000..bb6b75a72db8d --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/__init__.py @@ -0,0 +1,10 @@ +# 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 ._data_box_management_client import DataBoxManagementClient +__all__ = ['DataBoxManagementClient'] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/_configuration.py new file mode 100644 index 0000000000000..11335d578e8a4 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# 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 + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class DataBoxManagementClientConfiguration(Configuration): + """Configuration for DataBoxManagementClient. + + 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 + :param subscription_id: The Subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataBoxManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-05-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-databox/{}'.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 = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/_data_box_management_client.py new file mode 100644 index 0000000000000..01b0960090e3e --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/_data_box_management_client.py @@ -0,0 +1,93 @@ +# 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, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import DataBoxManagementClientOperationsMixin +from .operations import ServiceOperations +from .. import models + + +class DataBoxManagementClient(DataBoxManagementClientOperationsMixin): + """The DataBox Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.v2021_05_01.aio.operations.Operations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.databox.v2021_05_01.aio.operations.JobsOperations + :ivar service: ServiceOperations operations + :vartype service: azure.mgmt.databox.v2021_05_01.aio.operations.ServiceOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataBoxManagementClientConfiguration(credential, subscription_id, **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._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DataBoxManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/__init__.py new file mode 100644 index 0000000000000..bd13cc67afb6e --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/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 ._operations import Operations +from ._jobs_operations import JobsOperations +from ._data_box_management_client_operations import DataBoxManagementClientOperationsMixin +from ._service_operations import ServiceOperations + +__all__ = [ + 'Operations', + 'JobsOperations', + 'DataBoxManagementClientOperationsMixin', + 'ServiceOperations', +] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_data_box_management_client_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_data_box_management_client_operations.py new file mode 100644 index 0000000000000..692bce3b6adeb --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_data_box_management_client_operations.py @@ -0,0 +1,86 @@ +# 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, 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, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataBoxManagementClientOperationsMixin: + + async def mitigate( + self, + job_name: str, + resource_group_name: str, + mitigate_job_request: "_models.MitigateJobRequest", + **kwargs: Any + ) -> None: + """Request to mitigate for a given job. + + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param mitigate_job_request: Mitigation Request. + :type mitigate_job_request: ~azure.mgmt.databox.v2021_05_01.models.MitigateJobRequest + :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', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.mitigate.metadata['url'] # type: ignore + path_format_arguments = { + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(mitigate_job_request, 'MitigateJobRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + mitigate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_jobs_operations.py new file mode 100644 index 0000000000000..0eaf0e4c29e06 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_jobs_operations.py @@ -0,0 +1,844 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations: + """JobsOperations 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.databox.v2021_05_01.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 + + def list( + self, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.JobResourceList"]: + """Lists all the jobs available under the subscription. + + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_05_01.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.JobResourceList"]: + """Lists all the jobs available under the given resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_05_01.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} # type: ignore + + async def get( + self, + resource_group_name: str, + job_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.JobResource": + """Gets information about the specified job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param expand: $expand is supported on details parameter for job, which provides details on the + job stages. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobResource, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + job_name: str, + job_resource: "_models.JobResource", + **kwargs: Any + ) -> Optional["_models.JobResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource, 'JobResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + job_name: str, + job_resource: "_models.JobResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.JobResource"]: + """Creates a new job with the specified parameters. Existing job cannot be updated with this API + and should instead be updated with the Update job API. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource: Job details from request body. + :type job_resource: ~azure.mgmt.databox.v2021_05_01.models.JobResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2021_05_01.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + job_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + job_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + job_name: str, + job_resource_update_parameter: "_models.JobResourceUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.JobResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + job_name: str, + job_resource_update_parameter: "_models.JobResourceUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.JobResource"]: + """Updates the properties of an existing job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource_update_parameter: Job update parameters from request body. + :type job_resource_update_parameter: ~azure.mgmt.databox.v2021_05_01.models.JobResourceUpdateParameter + :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag + of the job on the server matches this value. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2021_05_01.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource_update_parameter=job_resource_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def book_shipment_pick_up( + self, + resource_group_name: str, + job_name: str, + shipment_pick_up_request: "_models.ShipmentPickUpRequest", + **kwargs: Any + ) -> "_models.ShipmentPickUpResponse": + """Book shipment pick up. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param shipment_pick_up_request: Details of shipment pick up request. + :type shipment_pick_up_request: ~azure.mgmt.databox.v2021_05_01.models.ShipmentPickUpRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShipmentPickUpResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.ShipmentPickUpResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} # type: ignore + + async def cancel( + self, + resource_group_name: str, + job_name: str, + cancellation_reason: "_models.CancellationReason", + **kwargs: Any + ) -> None: + """CancelJob. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.databox.v2021_05_01.models.CancellationReason + :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', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} # type: ignore + + def list_credentials( + self, + resource_group_name: str, + job_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.UnencryptedCredentialsList"]: + """This method gets the unencrypted secrets related to the job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_05_01.models.UnencryptedCredentialsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('UnencryptedCredentialsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_operations.py new file mode 100644 index 0000000000000..ae6a1871c872a --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_operations.py @@ -0,0 +1,105 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations 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.databox.v2021_05_01.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 + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationList"]: + """This method gets all the operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_05_01.models.OperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_service_operations.py new file mode 100644 index 0000000000000..82e01314cd0f4 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/aio/operations/_service_operations.py @@ -0,0 +1,456 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceOperations: + """ServiceOperations 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.databox.v2021_05_01.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 + + def list_available_skus_by_resource_group( + self, + resource_group_name: str, + location: str, + available_sku_request: "_models.AvailableSkuRequest", + **kwargs: Any + ) -> AsyncIterable["_models.AvailableSkusResult"]: + """This method provides the list of available skus for the given subscription, resource group and + location. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param available_sku_request: Filters for showing the available skus. + :type available_sku_request: ~azure.mgmt.databox.v2021_05_01.models.AvailableSkuRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_05_01.models.AvailableSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_available_skus_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} # type: ignore + + async def validate_address( + self, + location: str, + validate_address: "_models.ValidateAddress", + **kwargs: Any + ) -> "_models.AddressValidationOutput": + """[DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer + shipping address and provide alternate addresses if any. + + :param location: The location of the resource. + :type location: str + :param validate_address: Shipping address of the customer. + :type validate_address: ~azure.mgmt.databox.v2021_05_01.models.ValidateAddress + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressValidationOutput, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.AddressValidationOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_address.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_address, 'ValidateAddress') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressValidationOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_address.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} # type: ignore + + async def validate_inputs_by_resource_group( + self, + resource_group_name: str, + location: str, + validation_request: "_models.ValidationRequest", + **kwargs: Any + ) -> "_models.ValidationResponse": + """This method does all necessary pre-job creation validation under resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_05_01.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + async def validate_inputs( + self, + location: str, + validation_request: "_models.ValidationRequest", + **kwargs: Any + ) -> "_models.ValidationResponse": + """This method does all necessary pre-job creation validation under subscription. + + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_05_01.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + async def region_configuration( + self, + location: str, + region_configuration_request: "_models.RegionConfigurationRequest", + **kwargs: Any + ) -> "_models.RegionConfigurationResponse": + """This API provides configuration details specific to given region/location at Subscription + level. + + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region. + :type region_configuration_request: ~azure.mgmt.databox.v2021_05_01.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore + + async def region_configuration_by_resource_group( + self, + resource_group_name: str, + location: str, + region_configuration_request: "_models.RegionConfigurationRequest", + **kwargs: Any + ) -> "_models.RegionConfigurationResponse": + """This API provides configuration details specific to given region/location at Resource group + level. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region at + resource group level. + :type region_configuration_request: ~azure.mgmt.databox.v2021_05_01.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/__init__.py new file mode 100644 index 0000000000000..6fab328348ad6 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/__init__.py @@ -0,0 +1,379 @@ +# 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 AccountCredentialDetails + from ._models_py3 import AdditionalErrorInfo + from ._models_py3 import AddressValidationOutput + from ._models_py3 import AddressValidationProperties + from ._models_py3 import ApiError + from ._models_py3 import ApplianceNetworkConfiguration + from ._models_py3 import ArmBaseObject + from ._models_py3 import AvailableSkuRequest + from ._models_py3 import AvailableSkusResult + from ._models_py3 import AzureFileFilterDetails + from ._models_py3 import BlobFilterDetails + from ._models_py3 import CancellationReason + from ._models_py3 import CloudError + from ._models_py3 import ContactDetails + from ._models_py3 import CopyLogDetails + from ._models_py3 import CopyProgress + from ._models_py3 import CreateJobValidations + from ._models_py3 import CreateOrderLimitForSubscriptionValidationRequest + from ._models_py3 import CreateOrderLimitForSubscriptionValidationResponseProperties + from ._models_py3 import DataAccountDetails + from ._models_py3 import DataBoxAccountCopyLogDetails + from ._models_py3 import DataBoxDiskCopyLogDetails + from ._models_py3 import DataBoxDiskCopyProgress + from ._models_py3 import DataBoxDiskJobDetails + from ._models_py3 import DataBoxDiskJobSecrets + from ._models_py3 import DataBoxHeavyAccountCopyLogDetails + from ._models_py3 import DataBoxHeavyJobDetails + from ._models_py3 import DataBoxHeavyJobSecrets + from ._models_py3 import DataBoxHeavySecret + from ._models_py3 import DataBoxJobDetails + from ._models_py3 import DataBoxScheduleAvailabilityRequest + from ._models_py3 import DataBoxSecret + from ._models_py3 import DataExportDetails + from ._models_py3 import DataImportDetails + from ._models_py3 import DataLocationToServiceLocationMap + from ._models_py3 import DataTransferDetailsValidationRequest + from ._models_py3 import DataTransferDetailsValidationResponseProperties + from ._models_py3 import DataboxJobSecrets + from ._models_py3 import DcAccessSecurityCode + from ._models_py3 import Details + from ._models_py3 import DiskScheduleAvailabilityRequest + from ._models_py3 import DiskSecret + from ._models_py3 import EncryptionPreferences + from ._models_py3 import ErrorDetail + from ._models_py3 import FilterFileDetails + from ._models_py3 import HeavyScheduleAvailabilityRequest + from ._models_py3 import IdentityProperties + from ._models_py3 import JobDeliveryInfo + from ._models_py3 import JobDetails + from ._models_py3 import JobResource + from ._models_py3 import JobResourceList + from ._models_py3 import JobResourceUpdateParameter + from ._models_py3 import JobSecrets + from ._models_py3 import JobStages + from ._models_py3 import KeyEncryptionKey + from ._models_py3 import LastMitigationActionOnJob + from ._models_py3 import ManagedDiskDetails + from ._models_py3 import MitigateJobRequest + from ._models_py3 import NotificationPreference + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationList + from ._models_py3 import PackageShippingDetails + from ._models_py3 import Preferences + from ._models_py3 import PreferencesValidationRequest + from ._models_py3 import PreferencesValidationResponseProperties + from ._models_py3 import RegionConfigurationRequest + from ._models_py3 import RegionConfigurationResponse + from ._models_py3 import Resource + from ._models_py3 import ResourceIdentity + from ._models_py3 import ScheduleAvailabilityRequest + from ._models_py3 import ScheduleAvailabilityResponse + from ._models_py3 import ShareCredentialDetails + from ._models_py3 import ShipmentPickUpRequest + from ._models_py3 import ShipmentPickUpResponse + from ._models_py3 import ShippingAddress + from ._models_py3 import Sku + from ._models_py3 import SkuAvailabilityValidationRequest + from ._models_py3 import SkuAvailabilityValidationResponseProperties + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuCost + from ._models_py3 import SkuInformation + from ._models_py3 import StorageAccountDetails + from ._models_py3 import SubscriptionIsAllowedToCreateJobValidationRequest + from ._models_py3 import SubscriptionIsAllowedToCreateJobValidationResponseProperties + from ._models_py3 import SystemData + from ._models_py3 import TransferAllDetails + from ._models_py3 import TransferConfiguration + from ._models_py3 import TransferConfigurationTransferAllDetails + from ._models_py3 import TransferConfigurationTransferFilterDetails + from ._models_py3 import TransferFilterDetails + from ._models_py3 import TransportAvailabilityDetails + from ._models_py3 import TransportAvailabilityRequest + from ._models_py3 import TransportAvailabilityResponse + from ._models_py3 import TransportPreferences + from ._models_py3 import UnencryptedCredentials + from ._models_py3 import UnencryptedCredentialsList + from ._models_py3 import UpdateJobDetails + from ._models_py3 import UserAssignedIdentity + from ._models_py3 import UserAssignedProperties + from ._models_py3 import ValidateAddress + from ._models_py3 import ValidationInputRequest + from ._models_py3 import ValidationInputResponse + from ._models_py3 import ValidationRequest + from ._models_py3 import ValidationResponse +except (SyntaxError, ImportError): + from ._models import AccountCredentialDetails # type: ignore + from ._models import AdditionalErrorInfo # type: ignore + from ._models import AddressValidationOutput # type: ignore + from ._models import AddressValidationProperties # type: ignore + from ._models import ApiError # type: ignore + from ._models import ApplianceNetworkConfiguration # type: ignore + from ._models import ArmBaseObject # type: ignore + from ._models import AvailableSkuRequest # type: ignore + from ._models import AvailableSkusResult # type: ignore + from ._models import AzureFileFilterDetails # type: ignore + from ._models import BlobFilterDetails # type: ignore + from ._models import CancellationReason # type: ignore + from ._models import CloudError # type: ignore + from ._models import ContactDetails # type: ignore + from ._models import CopyLogDetails # type: ignore + from ._models import CopyProgress # type: ignore + from ._models import CreateJobValidations # type: ignore + from ._models import CreateOrderLimitForSubscriptionValidationRequest # type: ignore + from ._models import CreateOrderLimitForSubscriptionValidationResponseProperties # type: ignore + from ._models import DataAccountDetails # type: ignore + from ._models import DataBoxAccountCopyLogDetails # type: ignore + from ._models import DataBoxDiskCopyLogDetails # type: ignore + from ._models import DataBoxDiskCopyProgress # type: ignore + from ._models import DataBoxDiskJobDetails # type: ignore + from ._models import DataBoxDiskJobSecrets # type: ignore + from ._models import DataBoxHeavyAccountCopyLogDetails # type: ignore + from ._models import DataBoxHeavyJobDetails # type: ignore + from ._models import DataBoxHeavyJobSecrets # type: ignore + from ._models import DataBoxHeavySecret # type: ignore + from ._models import DataBoxJobDetails # type: ignore + from ._models import DataBoxScheduleAvailabilityRequest # type: ignore + from ._models import DataBoxSecret # type: ignore + from ._models import DataExportDetails # type: ignore + from ._models import DataImportDetails # type: ignore + from ._models import DataLocationToServiceLocationMap # type: ignore + from ._models import DataTransferDetailsValidationRequest # type: ignore + from ._models import DataTransferDetailsValidationResponseProperties # type: ignore + from ._models import DataboxJobSecrets # type: ignore + from ._models import DcAccessSecurityCode # type: ignore + from ._models import Details # type: ignore + from ._models import DiskScheduleAvailabilityRequest # type: ignore + from ._models import DiskSecret # type: ignore + from ._models import EncryptionPreferences # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import FilterFileDetails # type: ignore + from ._models import HeavyScheduleAvailabilityRequest # type: ignore + from ._models import IdentityProperties # type: ignore + from ._models import JobDeliveryInfo # type: ignore + from ._models import JobDetails # type: ignore + from ._models import JobResource # type: ignore + from ._models import JobResourceList # type: ignore + from ._models import JobResourceUpdateParameter # type: ignore + from ._models import JobSecrets # type: ignore + from ._models import JobStages # type: ignore + from ._models import KeyEncryptionKey # type: ignore + from ._models import LastMitigationActionOnJob # type: ignore + from ._models import ManagedDiskDetails # type: ignore + from ._models import MitigateJobRequest # type: ignore + from ._models import NotificationPreference # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationList # type: ignore + from ._models import PackageShippingDetails # type: ignore + from ._models import Preferences # type: ignore + from ._models import PreferencesValidationRequest # type: ignore + from ._models import PreferencesValidationResponseProperties # type: ignore + from ._models import RegionConfigurationRequest # type: ignore + from ._models import RegionConfigurationResponse # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceIdentity # type: ignore + from ._models import ScheduleAvailabilityRequest # type: ignore + from ._models import ScheduleAvailabilityResponse # type: ignore + from ._models import ShareCredentialDetails # type: ignore + from ._models import ShipmentPickUpRequest # type: ignore + from ._models import ShipmentPickUpResponse # type: ignore + from ._models import ShippingAddress # type: ignore + from ._models import Sku # type: ignore + from ._models import SkuAvailabilityValidationRequest # type: ignore + from ._models import SkuAvailabilityValidationResponseProperties # type: ignore + from ._models import SkuCapacity # type: ignore + from ._models import SkuCost # type: ignore + from ._models import SkuInformation # type: ignore + from ._models import StorageAccountDetails # type: ignore + from ._models import SubscriptionIsAllowedToCreateJobValidationRequest # type: ignore + from ._models import SubscriptionIsAllowedToCreateJobValidationResponseProperties # type: ignore + from ._models import SystemData # type: ignore + from ._models import TransferAllDetails # type: ignore + from ._models import TransferConfiguration # type: ignore + from ._models import TransferConfigurationTransferAllDetails # type: ignore + from ._models import TransferConfigurationTransferFilterDetails # type: ignore + from ._models import TransferFilterDetails # type: ignore + from ._models import TransportAvailabilityDetails # type: ignore + from ._models import TransportAvailabilityRequest # type: ignore + from ._models import TransportAvailabilityResponse # type: ignore + from ._models import TransportPreferences # type: ignore + from ._models import UnencryptedCredentials # type: ignore + from ._models import UnencryptedCredentialsList # type: ignore + from ._models import UpdateJobDetails # type: ignore + from ._models import UserAssignedIdentity # type: ignore + from ._models import UserAssignedProperties # type: ignore + from ._models import ValidateAddress # type: ignore + from ._models import ValidationInputRequest # type: ignore + from ._models import ValidationInputResponse # type: ignore + from ._models import ValidationRequest # type: ignore + from ._models import ValidationResponse # type: ignore + +from ._data_box_management_client_enums import ( + AccessProtocol, + AddressType, + AddressValidationStatus, + ClassDiscriminator, + CopyStatus, + CustomerResolutionCode, + DataAccountType, + DoubleEncryption, + FilterFileType, + JobDeliveryType, + KekType, + LogCollectionLevel, + NotificationStageName, + OverallValidationStatus, + ShareDestinationFormatType, + SkuDisabledReason, + SkuName, + StageName, + StageStatus, + TransferConfigurationType, + TransferType, + TransportShipmentTypes, + ValidationInputDiscriminator, + ValidationStatus, +) + +__all__ = [ + 'AccountCredentialDetails', + 'AdditionalErrorInfo', + 'AddressValidationOutput', + 'AddressValidationProperties', + 'ApiError', + 'ApplianceNetworkConfiguration', + 'ArmBaseObject', + 'AvailableSkuRequest', + 'AvailableSkusResult', + 'AzureFileFilterDetails', + 'BlobFilterDetails', + 'CancellationReason', + 'CloudError', + 'ContactDetails', + 'CopyLogDetails', + 'CopyProgress', + 'CreateJobValidations', + 'CreateOrderLimitForSubscriptionValidationRequest', + 'CreateOrderLimitForSubscriptionValidationResponseProperties', + 'DataAccountDetails', + 'DataBoxAccountCopyLogDetails', + 'DataBoxDiskCopyLogDetails', + 'DataBoxDiskCopyProgress', + 'DataBoxDiskJobDetails', + 'DataBoxDiskJobSecrets', + 'DataBoxHeavyAccountCopyLogDetails', + 'DataBoxHeavyJobDetails', + 'DataBoxHeavyJobSecrets', + 'DataBoxHeavySecret', + 'DataBoxJobDetails', + 'DataBoxScheduleAvailabilityRequest', + 'DataBoxSecret', + 'DataExportDetails', + 'DataImportDetails', + 'DataLocationToServiceLocationMap', + 'DataTransferDetailsValidationRequest', + 'DataTransferDetailsValidationResponseProperties', + 'DataboxJobSecrets', + 'DcAccessSecurityCode', + 'Details', + 'DiskScheduleAvailabilityRequest', + 'DiskSecret', + 'EncryptionPreferences', + 'ErrorDetail', + 'FilterFileDetails', + 'HeavyScheduleAvailabilityRequest', + 'IdentityProperties', + 'JobDeliveryInfo', + 'JobDetails', + 'JobResource', + 'JobResourceList', + 'JobResourceUpdateParameter', + 'JobSecrets', + 'JobStages', + 'KeyEncryptionKey', + 'LastMitigationActionOnJob', + 'ManagedDiskDetails', + 'MitigateJobRequest', + 'NotificationPreference', + 'Operation', + 'OperationDisplay', + 'OperationList', + 'PackageShippingDetails', + 'Preferences', + 'PreferencesValidationRequest', + 'PreferencesValidationResponseProperties', + 'RegionConfigurationRequest', + 'RegionConfigurationResponse', + 'Resource', + 'ResourceIdentity', + 'ScheduleAvailabilityRequest', + 'ScheduleAvailabilityResponse', + 'ShareCredentialDetails', + 'ShipmentPickUpRequest', + 'ShipmentPickUpResponse', + 'ShippingAddress', + 'Sku', + 'SkuAvailabilityValidationRequest', + 'SkuAvailabilityValidationResponseProperties', + 'SkuCapacity', + 'SkuCost', + 'SkuInformation', + 'StorageAccountDetails', + 'SubscriptionIsAllowedToCreateJobValidationRequest', + 'SubscriptionIsAllowedToCreateJobValidationResponseProperties', + 'SystemData', + 'TransferAllDetails', + 'TransferConfiguration', + 'TransferConfigurationTransferAllDetails', + 'TransferConfigurationTransferFilterDetails', + 'TransferFilterDetails', + 'TransportAvailabilityDetails', + 'TransportAvailabilityRequest', + 'TransportAvailabilityResponse', + 'TransportPreferences', + 'UnencryptedCredentials', + 'UnencryptedCredentialsList', + 'UpdateJobDetails', + 'UserAssignedIdentity', + 'UserAssignedProperties', + 'ValidateAddress', + 'ValidationInputRequest', + 'ValidationInputResponse', + 'ValidationRequest', + 'ValidationResponse', + 'AccessProtocol', + 'AddressType', + 'AddressValidationStatus', + 'ClassDiscriminator', + 'CopyStatus', + 'CustomerResolutionCode', + 'DataAccountType', + 'DoubleEncryption', + 'FilterFileType', + 'JobDeliveryType', + 'KekType', + 'LogCollectionLevel', + 'NotificationStageName', + 'OverallValidationStatus', + 'ShareDestinationFormatType', + 'SkuDisabledReason', + 'SkuName', + 'StageName', + 'StageStatus', + 'TransferConfigurationType', + 'TransferType', + 'TransportShipmentTypes', + 'ValidationInputDiscriminator', + 'ValidationStatus', +] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/_data_box_management_client_enums.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/_data_box_management_client_enums.py new file mode 100644 index 0000000000000..dd32fd7888dd9 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/_data_box_management_client_enums.py @@ -0,0 +1,350 @@ +# 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, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + #: Server Message Block protocol(SMB). + SMB = "SMB" + #: Network File System protocol(NFS). + NFS = "NFS" + +class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of address. + """ + + #: Address type not known. + NONE = "None" + #: Residential Address. + RESIDENTIAL = "Residential" + #: Commercial Address. + COMMERCIAL = "Commercial" + +class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The address validation status. + """ + + #: Address provided is valid. + VALID = "Valid" + #: Address provided is invalid or not supported. + INVALID = "Invalid" + #: Address provided is ambiguous, please choose one of the alternate addresses returned. + AMBIGUOUS = "Ambiguous" + +class ClassDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates the type of job details. + """ + + #: Data Box orders. + DATA_BOX = "DataBox" + #: Data Box Disk orders. + DATA_BOX_DISK = "DataBoxDisk" + #: Data Box Heavy orders. + DATA_BOX_HEAVY = "DataBoxHeavy" + +class CopyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Status of the copy + """ + + #: Data copy hasn't started yet. + NOT_STARTED = "NotStarted" + #: Data copy is in progress. + IN_PROGRESS = "InProgress" + #: Data copy completed. + COMPLETED = "Completed" + #: Data copy completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Data copy failed. No data was copied. + FAILED = "Failed" + #: No copy triggered as device was not returned. + NOT_RETURNED = "NotReturned" + #: The Device has hit hardware issues. + HARDWARE_ERROR = "HardwareError" + #: Data copy failed. The Device was formatted by user. + DEVICE_FORMATTED = "DeviceFormatted" + #: Data copy failed. Device metadata was modified by user. + DEVICE_METADATA_MODIFIED = "DeviceMetadataModified" + #: Data copy failed. Storage Account was not accessible during copy. + STORAGE_ACCOUNT_NOT_ACCESSIBLE = "StorageAccountNotAccessible" + #: Data copy failed. The Device data content is not supported. + UNSUPPORTED_DATA = "UnsupportedData" + +class CustomerResolutionCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + #: No Resolution Yet. + NONE = "None" + #: Clean the device. + MOVE_TO_CLEAN_UP_DEVICE = "MoveToCleanUpDevice" + #: Resume the job to same stage. + RESUME = "Resume" + +class DataAccountType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the account. + """ + + #: Storage Accounts . + STORAGE_ACCOUNT = "StorageAccount" + #: Azure Managed disk storage. + MANAGED_DISK = "ManagedDisk" + +class DoubleEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Defines secondary layer of software-based encryption enablement. + """ + + #: Software-based encryption is enabled. + ENABLED = "Enabled" + #: Software-based encryption is disabled. + DISABLED = "Disabled" + +class FilterFileType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the filter file. + """ + + #: Filter file is of the type AzureBlob. + AZURE_BLOB = "AzureBlob" + #: Filter file is of the type AzureFiles. + AZURE_FILE = "AzureFile" + +class JobDeliveryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Delivery type of Job. + """ + + #: Non Scheduled job. + NON_SCHEDULED = "NonScheduled" + #: Scheduled job. + SCHEDULED = "Scheduled" + +class KekType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of encryption key used for key encryption. + """ + + #: Key encryption key is managed by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" + #: Key encryption key is managed by the Customer. + CUSTOMER_MANAGED = "CustomerManaged" + +class LogCollectionLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Level of the logs to be collected. + """ + + #: Only Errors will be collected in the logs. + ERROR = "Error" + #: Verbose logging (includes Errors, CRC, size information and others). + VERBOSE = "Verbose" + +class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the stage. + """ + + #: Notification at device prepared stage. + DEVICE_PREPARED = "DevicePrepared" + #: Notification at device dispatched stage. + DISPATCHED = "Dispatched" + #: Notification at device delivered stage. + DELIVERED = "Delivered" + #: Notification at device picked up from user stage. + PICKED_UP = "PickedUp" + #: Notification at device received at Azure datacenter stage. + AT_AZURE_DC = "AtAzureDC" + #: Notification at data copy started stage. + DATA_COPY = "DataCopy" + +class OverallValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Overall validation status. + """ + + #: Every input request is valid. + ALL_VALID_TO_PROCEED = "AllValidToProceed" + #: Some input requests are not valid. + INPUTS_REVISIT_REQUIRED = "InputsRevisitRequired" + #: Certain input validations skipped. + CERTAIN_INPUT_VALIDATIONS_SKIPPED = "CertainInputValidationsSkipped" + +class ShareDestinationFormatType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the share. + """ + + #: Unknown format. + UNKNOWN_TYPE = "UnknownType" + #: Storsimple data format. + HCS = "HCS" + #: Azure storage block blob format. + BLOCK_BLOB = "BlockBlob" + #: Azure storage page blob format. + PAGE_BLOB = "PageBlob" + #: Azure storage file format. + AZURE_FILE = "AzureFile" + #: Azure Compute Disk. + MANAGED_DISK = "ManagedDisk" + +class SkuDisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Reason why the Sku is disabled. + """ + + #: SKU is not disabled. + NONE = "None" + #: SKU is not available in the requested country. + COUNTRY = "Country" + #: SKU is not available to push data to the requested Azure region. + REGION = "Region" + #: Required features are not enabled for the SKU. + FEATURE = "Feature" + #: Subscription does not have required offer types for the SKU. + OFFER_TYPE = "OfferType" + #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription + #: notification. + NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + #: Data Box. + DATA_BOX = "DataBox" + #: Data Box Disk. + DATA_BOX_DISK = "DataBoxDisk" + #: Data Box Heavy. + DATA_BOX_HEAVY = "DataBoxHeavy" + +class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the stage which is in progress. + """ + + #: An order has been created. + DEVICE_ORDERED = "DeviceOrdered" + #: A device has been prepared for the order. + DEVICE_PREPARED = "DevicePrepared" + #: Device has been dispatched to the user of the order. + DISPATCHED = "Dispatched" + #: Device has been delivered to the user of the order. + DELIVERED = "Delivered" + #: Device has been picked up from user and in transit to Azure datacenter. + PICKED_UP = "PickedUp" + #: Device has been received at Azure datacenter from the user. + AT_AZURE_DC = "AtAzureDC" + #: Data copy from the device at Azure datacenter. + DATA_COPY = "DataCopy" + #: Order has completed. + COMPLETED = "Completed" + #: Order has completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Order has been cancelled. + CANCELLED = "Cancelled" + #: Order has failed due to issue reported by user. + FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" + #: Order has failed due to issue detected at Azure datacenter. + FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" + #: Order has been aborted. + ABORTED = "Aborted" + #: Order has completed with warnings. + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" + #: Device is ready to be handed to customer from Azure DC. + READY_TO_DISPATCH_FROM_AZURE_DC = "ReadyToDispatchFromAzureDC" + #: Device can be dropped off at Azure DC. + READY_TO_RECEIVE_AT_AZURE_DC = "ReadyToReceiveAtAzureDC" + +class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of the job stage. + """ + + #: No status available yet. + NONE = "None" + #: Stage is in progress. + IN_PROGRESS = "InProgress" + #: Stage has succeeded. + SUCCEEDED = "Succeeded" + #: Stage has failed. + FAILED = "Failed" + #: Stage has been cancelled. + CANCELLED = "Cancelled" + #: Stage is cancelling. + CANCELLING = "Cancelling" + #: Stage has succeeded with errors. + SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" + #: Stage is stuck until customer takes some action. + WAITING_FOR_CUSTOMER_ACTION = "WaitingForCustomerAction" + #: Stage has succeeded with warnings. + SUCCEEDED_WITH_WARNINGS = "SucceededWithWarnings" + #: Stage is waiting for customer action for kek action items. + WAITING_FOR_CUSTOMER_ACTION_FOR_KEK = "WaitingForCustomerActionForKek" + #: Stage is waiting for customer action for clean up. + WAITING_FOR_CUSTOMER_ACTION_FOR_CLEAN_UP = "WaitingForCustomerActionForCleanUp" + #: Stage has performed customer action for clean up. + CUSTOMER_ACTION_PERFORMED_FOR_CLEAN_UP = "CustomerActionPerformedForCleanUp" + +class TransferConfigurationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the configuration for transfer. + """ + + #: Transfer all the data. + TRANSFER_ALL = "TransferAll" + #: Transfer using filter. + TRANSFER_USING_FILTER = "TransferUsingFilter" + +class TransferType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the transfer. + """ + + #: Import data to azure. + IMPORT_TO_AZURE = "ImportToAzure" + #: Export data from azure. + EXPORT_FROM_AZURE = "ExportFromAzure" + +class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Transport Shipment Type supported for given region. + """ + + #: Shipment Logistics is handled by the customer. + CUSTOMER_MANAGED = "CustomerManaged" + #: Shipment Logistics is handled by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" + +class ValidationInputDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Identifies the type of validation request. + """ + + #: Identify request and response of address validation. + VALIDATE_ADDRESS = "ValidateAddress" + #: Identify request and response for validation of subscription permission to create job. + VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB = "ValidateSubscriptionIsAllowedToCreateJob" + #: Identify request and response of preference validation. + VALIDATE_PREFERENCES = "ValidatePreferences" + #: Identify request and response of create order limit for subscription validation. + VALIDATE_CREATE_ORDER_LIMIT = "ValidateCreateOrderLimit" + #: Identify request and response of active job limit for sku availability. + VALIDATE_SKU_AVAILABILITY = "ValidateSkuAvailability" + #: Identify request and response of data transfer details validation. + VALIDATE_DATA_TRANSFER_DETAILS = "ValidateDataTransferDetails" + +class ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Create order limit validation status. + """ + + #: Validation is successful. + VALID = "Valid" + #: Validation is not successful. + INVALID = "Invalid" + #: Validation is skipped. + SKIPPED = "Skipped" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/_models.py new file mode 100644 index 0000000000000..2941855d12e65 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/_models.py @@ -0,0 +1,4171 @@ +# 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.core.exceptions import HttpResponseError +import msrest.serialization + + +class AccountCredentialDetails(msrest.serialization.Model): + """Credential details of the account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar account_name: Name of the account. + :vartype account_name: str + :ivar data_account_type: Type of the account. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :ivar account_connection_string: Connection string of the account endpoint to use the account + as a storage endpoint on the device. + :vartype account_connection_string: str + :ivar share_credential_details: Per share level unencrypted access credentials. + :vartype share_credential_details: + list[~azure.mgmt.databox.v2021_05_01.models.ShareCredentialDetails] + """ + + _validation = { + 'account_name': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_connection_string': {'readonly': True}, + 'share_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, + 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountCredentialDetails, self).__init__(**kwargs) + self.account_name = None + self.data_account_type = None + self.account_connection_string = None + self.share_credential_details = None + + +class AdditionalErrorInfo(msrest.serialization.Model): + """Additional error info. + + :param type: Additional error type. + :type type: str + :param info: Additional error info. + :type info: any + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(AdditionalErrorInfo, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.info = kwargs.get('info', None) + + +class AddressValidationOutput(msrest.serialization.Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param validation_type: Identifies the type of validation response.Constant filled by server. + Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", + "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", + "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_05_01.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: list[~azure.mgmt.databox.v2021_05_01.models.ShippingAddress] + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'properties.validationType', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationOutput, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ValidationInputResponse(msrest.serialization.Model): + """Minimum properties that should be present in each individual validation response. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddressValidationProperties, CreateOrderLimitForSubscriptionValidationResponseProperties, DataTransferDetailsValidationResponseProperties, PreferencesValidationResponseProperties, SkuAvailabilityValidationResponseProperties, SubscriptionIsAllowedToCreateJobValidationResponseProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'AddressValidationProperties', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputResponse, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + + +class AddressValidationProperties(ValidationInputResponse): + """The address validation output. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_05_01.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: list[~azure.mgmt.databox.v2021_05_01.models.ShippingAddress] + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_status': {'key': 'validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.validation_status = None + self.alternate_addresses = None + + +class ApiError(msrest.serialization.Model): + """ApiError. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. + :type error: ~azure.mgmt.databox.v2021_05_01.models.ErrorDetail + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ApiError, self).__init__(**kwargs) + self.error = kwargs['error'] + + +class ApplianceNetworkConfiguration(msrest.serialization.Model): + """The Network Adapter configuration of a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the network. + :vartype name: str + :ivar mac_address: Mac Address. + :vartype mac_address: str + """ + + _validation = { + 'name': {'readonly': True}, + 'mac_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceNetworkConfiguration, self).__init__(**kwargs) + self.name = None + self.mac_address = None + + +class ArmBaseObject(msrest.serialization.Model): + """Base class for all objects under resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmBaseObject, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + + +class AvailableSkuRequest(msrest.serialization.Model): + """The filters for showing the available skus. + + All required parameters must be populated in order to send to Azure. + + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + :param sku_names: Sku Names to filter for available skus. + :type sku_names: list[str or ~azure.mgmt.databox.v2021_05_01.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku_names': {'key': 'skuNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableSkuRequest, self).__init__(**kwargs) + self.transfer_type = kwargs['transfer_type'] + self.country = kwargs['country'] + self.location = kwargs['location'] + self.sku_names = kwargs.get('sku_names', None) + + +class AvailableSkusResult(msrest.serialization.Model): + """The available skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of available skus. + :vartype value: list[~azure.mgmt.databox.v2021_05_01.models.SkuInformation] + :param next_link: Link for the next set of skus. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SkuInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableSkusResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class AzureFileFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure files. + + :param file_prefix_list: Prefix list of the Azure files to be transferred. + :type file_prefix_list: list[str] + :param file_path_list: List of full path of the files to be transferred. + :type file_path_list: list[str] + :param file_share_list: List of file shares to be transferred. + :type file_share_list: list[str] + """ + + _attribute_map = { + 'file_prefix_list': {'key': 'filePrefixList', 'type': '[str]'}, + 'file_path_list': {'key': 'filePathList', 'type': '[str]'}, + 'file_share_list': {'key': 'fileShareList', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFileFilterDetails, self).__init__(**kwargs) + self.file_prefix_list = kwargs.get('file_prefix_list', None) + self.file_path_list = kwargs.get('file_path_list', None) + self.file_share_list = kwargs.get('file_share_list', None) + + +class BlobFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure Blobs. + + :param blob_prefix_list: Prefix list of the Azure blobs to be transferred. + :type blob_prefix_list: list[str] + :param blob_path_list: List of full path of the blobs to be transferred. + :type blob_path_list: list[str] + :param container_list: List of blob containers to be transferred. + :type container_list: list[str] + """ + + _attribute_map = { + 'blob_prefix_list': {'key': 'blobPrefixList', 'type': '[str]'}, + 'blob_path_list': {'key': 'blobPathList', 'type': '[str]'}, + 'container_list': {'key': 'containerList', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobFilterDetails, self).__init__(**kwargs) + self.blob_prefix_list = kwargs.get('blob_prefix_list', None) + self.blob_path_list = kwargs.get('blob_path_list', None) + self.container_list = kwargs.get('container_list', None) + + +class CancellationReason(msrest.serialization.Model): + """Reason for cancellation. + + All required parameters must be populated in order to send to Azure. + + :param reason: Required. Reason for cancellation. + :type reason: str + """ + + _validation = { + 'reason': {'required': True}, + } + + _attribute_map = { + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CancellationReason, self).__init__(**kwargs) + self.reason = kwargs['reason'] + + +class CloudError(msrest.serialization.Model): + """Cloud error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param code: Cloud error code. + :type code: str + :param message: Cloud error message. + :type message: str + :param target: Cloud error target. + :type target: str + :ivar details: Cloud error details. + :vartype details: list[~azure.mgmt.databox.v2021_05_01.models.CloudError] + :ivar additional_info: Cloud error additional info. + :vartype additional_info: list[~azure.mgmt.databox.v2021_05_01.models.AdditionalErrorInfo] + """ + + _validation = { + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudError]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[AdditionalErrorInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = None + self.additional_info = None + + +class ContactDetails(msrest.serialization.Model): + """Contact Details. + + All required parameters must be populated in order to send to Azure. + + :param contact_name: Required. Contact name of the person. + :type contact_name: str + :param phone: Required. Phone number of the contact person. + :type phone: str + :param phone_extension: Phone extension number of the contact person. + :type phone_extension: str + :param mobile: Mobile number of the contact person. + :type mobile: str + :param email_list: Required. List of Email-ids to be notified about job progress. + :type email_list: list[str] + :param notification_preference: Notification preference for a job stage. + :type notification_preference: + list[~azure.mgmt.databox.v2021_05_01.models.NotificationPreference] + """ + + _validation = { + 'contact_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_name': {'key': 'contactName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'phone_extension': {'key': 'phoneExtension', 'type': 'str'}, + 'mobile': {'key': 'mobile', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + 'notification_preference': {'key': 'notificationPreference', 'type': '[NotificationPreference]'}, + } + + def __init__( + self, + **kwargs + ): + super(ContactDetails, self).__init__(**kwargs) + self.contact_name = kwargs['contact_name'] + self.phone = kwargs['phone'] + self.phone_extension = kwargs.get('phone_extension', None) + self.mobile = kwargs.get('mobile', None) + self.email_list = kwargs['email_list'] + self.notification_preference = kwargs.get('notification_preference', None) + + +class CopyLogDetails(msrest.serialization.Model): + """Details for log generated during copy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxHeavyAccountCopyLogDetails. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'copy_log_details_type': {'DataBox': 'DataBoxAccountCopyLogDetails', 'DataBoxDisk': 'DataBoxDiskCopyLogDetails', 'DataBoxHeavy': 'DataBoxHeavyAccountCopyLogDetails'} + } + + def __init__( + self, + **kwargs + ): + super(CopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = None # type: Optional[str] + + +class CopyProgress(msrest.serialization.Model): + """Copy progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar storage_account_name: Name of the storage account. This will be empty for data account + types other than storage account. + :vartype storage_account_name: str + :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", + "ExportFromAzure". + :vartype transfer_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransferType + :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :ivar account_id: Id of the account where the data needs to be uploaded. + :vartype account_id: str + :ivar bytes_processed: To indicate bytes transferred. + :vartype bytes_processed: long + :ivar total_bytes_to_process: Total amount of data to be processed by the job. + :vartype total_bytes_to_process: long + :ivar files_processed: Number of files processed. + :vartype files_processed: long + :ivar total_files_to_process: Total files to process. + :vartype total_files_to_process: long + :ivar invalid_files_processed: Number of files not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype invalid_files_processed: long + :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to azure naming + conventions which were processed by automatic renaming. + :vartype invalid_file_bytes_uploaded: long + :ivar renamed_container_count: Number of folders not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype renamed_container_count: long + :ivar files_errored_out: Number of files which could not be copied. + :vartype files_errored_out: long + :ivar directories_errored_out: To indicate directories errored out in the job. + :vartype directories_errored_out: long + :ivar invalid_directories_processed: To indicate directories renamed. + :vartype invalid_directories_processed: long + :ivar is_enumeration_in_progress: To indicate if enumeration of data is in progress. + Until this is true, the TotalBytesToProcess may not be valid. + :vartype is_enumeration_in_progress: bool + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'transfer_type': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_processed': {'readonly': True}, + 'total_bytes_to_process': {'readonly': True}, + 'files_processed': {'readonly': True}, + 'total_files_to_process': {'readonly': True}, + 'invalid_files_processed': {'readonly': True}, + 'invalid_file_bytes_uploaded': {'readonly': True}, + 'renamed_container_count': {'readonly': True}, + 'files_errored_out': {'readonly': True}, + 'directories_errored_out': {'readonly': True}, + 'invalid_directories_processed': {'readonly': True}, + 'is_enumeration_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'bytes_processed': {'key': 'bytesProcessed', 'type': 'long'}, + 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, + 'files_processed': {'key': 'filesProcessed', 'type': 'long'}, + 'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'}, + 'invalid_files_processed': {'key': 'invalidFilesProcessed', 'type': 'long'}, + 'invalid_file_bytes_uploaded': {'key': 'invalidFileBytesUploaded', 'type': 'long'}, + 'renamed_container_count': {'key': 'renamedContainerCount', 'type': 'long'}, + 'files_errored_out': {'key': 'filesErroredOut', 'type': 'long'}, + 'directories_errored_out': {'key': 'directoriesErroredOut', 'type': 'long'}, + 'invalid_directories_processed': {'key': 'invalidDirectoriesProcessed', 'type': 'long'}, + 'is_enumeration_in_progress': {'key': 'isEnumerationInProgress', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CopyProgress, self).__init__(**kwargs) + self.storage_account_name = None + self.transfer_type = None + self.data_account_type = None + self.account_id = None + self.bytes_processed = None + self.total_bytes_to_process = None + self.files_processed = None + self.total_files_to_process = None + self.invalid_files_processed = None + self.invalid_file_bytes_uploaded = None + self.renamed_container_count = None + self.files_errored_out = None + self.directories_errored_out = None + self.invalid_directories_processed = None + self.is_enumeration_in_progress = None + + +class ValidationRequest(msrest.serialization.Model): + """Minimum request requirement of any validation category. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CreateJobValidations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_05_01.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + _subtype_map = { + 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationRequest, self).__init__(**kwargs) + self.validation_category = None # type: Optional[str] + self.individual_request_details = kwargs['individual_request_details'] + + +class CreateJobValidations(ValidationRequest): + """It does all pre-job creation validations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_05_01.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateJobValidations, self).__init__(**kwargs) + self.validation_category = 'JobCreationValidation' # type: str + + +class ValidationInputRequest(msrest.serialization.Model): + """Minimum fields that must be present in any type of validation request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ValidateAddress, CreateOrderLimitForSubscriptionValidationRequest, DataTransferDetailsValidationRequest, PreferencesValidationRequest, SkuAvailabilityValidationRequest, SubscriptionIsAllowedToCreateJobValidationRequest. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'ValidateAddress', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputRequest, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + + +class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): + """Request to validate create order limit for current subscription. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.device_type = kwargs['device_type'] + + +class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInputResponse): + """Properties of create order limit for subscription validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar status: Create order limit validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.status = None + + +class DataAccountDetails(msrest.serialization.Model): + """Account details of the data to be transferred. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedDiskDetails, StorageAccountDetails. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + } + + _subtype_map = { + 'data_account_type': {'ManagedDisk': 'ManagedDiskDetails', 'StorageAccount': 'StorageAccountDetails'} + } + + def __init__( + self, + **kwargs + ): + super(DataAccountDetails, self).__init__(**kwargs) + self.data_account_type = None # type: Optional[str] + self.share_password = kwargs.get('share_password', None) + + +class DataBoxAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account of a DataBox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: str + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when + LogCollectionLevel is set to Verbose. + :vartype copy_verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': 'str'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBox' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxDiskCopyLogDetails(CopyLogDetails): + """Copy Log Details for a disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar disk_serial_number: Disk Serial Number. + :vartype disk_serial_number: str + :ivar error_log_link: Link for copy error logs. + :vartype error_log_link: str + :ivar verbose_log_link: Link for copy verbose logs. + :vartype verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'disk_serial_number': {'readonly': True}, + 'error_log_link': {'readonly': True}, + 'verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'error_log_link': {'key': 'errorLogLink', 'type': 'str'}, + 'verbose_log_link': {'key': 'verboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxDisk' # type: str + self.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + + +class DataBoxDiskCopyProgress(msrest.serialization.Model): + """DataBox Disk Copy Progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar serial_number: The serial number of the disk. + :vartype serial_number: str + :ivar bytes_copied: Bytes copied during the copy of disk. + :vartype bytes_copied: long + :ivar percent_complete: Indicates the percentage completed for the copy of the disk. + :vartype percent_complete: int + :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", + "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", + "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.CopyStatus + """ + + _validation = { + 'serial_number': {'readonly': True}, + 'bytes_copied': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.bytes_copied = None + self.percent_complete = None + self.status = None + + +class JobDetails(msrest.serialization.Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxJobDetails, DataBoxDiskJobDetails, DataBoxHeavyJobDetails. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_05_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_05_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_05_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_05_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_05_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_05_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_05_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_05_01.models.LastMitigationActionOnJob + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + } + + _subtype_map = { + 'job_details_type': {'DataBox': 'DataBoxJobDetails', 'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails'} + } + + def __init__( + self, + **kwargs + ): + super(JobDetails, self).__init__(**kwargs) + self.job_stages = None + self.contact_details = kwargs['contact_details'] + self.shipping_address = kwargs.get('shipping_address', None) + self.delivery_package = None + self.return_package = None + self.data_import_details = kwargs.get('data_import_details', None) + self.data_export_details = kwargs.get('data_export_details', None) + self.job_details_type = None # type: Optional[str] + self.preferences = kwargs.get('preferences', None) + self.copy_log_details = None + self.reverse_shipment_label_sas_key = None + self.chain_of_custody_sas_key = None + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.expected_data_size_in_tera_bytes = kwargs.get('expected_data_size_in_tera_bytes', None) + self.actions = None + self.last_mitigation_action_on_job = None + + +class DataBoxDiskJobDetails(JobDetails): + """DataBox Disk Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_05_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_05_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_05_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_05_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_05_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_05_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_05_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_05_01.models.LastMitigationActionOnJob + :param preferred_disks: User preference on what size disks are needed for the job. The map is + from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but + will be checked against an int. + :type preferred_disks: dict[str, int] + :ivar copy_progress: Copy progress per disk. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_05_01.models.DataBoxDiskCopyProgress] + :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being + used for the job. Is returned only after the disks are shipped to the customer. + :vartype disks_and_size_details: dict[str, int] + :param passkey: User entered passkey for DataBox Disk job. + :type passkey: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + 'disks_and_size_details': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, + 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, + 'passkey': {'key': 'passkey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBoxDisk' # type: str + self.preferred_disks = kwargs.get('preferred_disks', None) + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = kwargs.get('passkey', None) + + +class JobSecrets(msrest.serialization.Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataboxJobSecrets, DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_05_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBox': 'DataboxJobSecrets', 'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets'} + } + + def __init__( + self, + **kwargs + ): + super(JobSecrets, self).__init__(**kwargs) + self.job_secrets_type = None # type: Optional[str] + self.dc_access_security_code = None + self.error = None + + +class DataBoxDiskJobSecrets(JobSecrets): + """The secrets related to disk job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_05_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.v2021_05_01.models.DiskSecret] + :ivar pass_key: PassKey for the disk Job. + :vartype pass_key: str + :ivar is_passkey_user_defined: Whether passkey was provided by user. + :vartype is_passkey_user_defined: bool + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'pass_key': {'key': 'passKey', 'type': 'str'}, + 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxDisk' # type: str + self.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + + +class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account for Databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: list[str] + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when the + LogCollectionLevel is set to verbose. + :vartype copy_verbose_log_link: list[str] + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': '[str]'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxHeavy' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxHeavyJobDetails(JobDetails): + """Databox Heavy Device Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_05_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_05_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_05_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_05_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_05_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_05_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_05_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_05_01.models.LastMitigationActionOnJob + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_05_01.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox Heavy. Should not be passed + for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBoxHeavy' # type: str + self.copy_progress = None + self.device_password = kwargs.get('device_password', None) + + +class DataBoxHeavyJobSecrets(JobSecrets): + """The secrets related to a databox heavy job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_05_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2021_05_01.models.DataBoxHeavySecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxHeavy' # type: str + self.cabinet_pod_secrets = None + + +class DataBoxHeavySecret(msrest.serialization.Model): + """The secrets related to a databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_05_01.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_05_01.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavySecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DataBoxJobDetails(JobDetails): + """Databox Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_05_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_05_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_05_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_05_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_05_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_05_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_05_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_05_01.models.LastMitigationActionOnJob + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_05_01.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox. Should not be passed for + TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password + itself. This will not be returned in Get Call. Password Requirements : Password must be + minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, + one number and one special character. Password cannot have the following characters : IilLoO0 + Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBox' # type: str + self.copy_progress = None + self.device_password = kwargs.get('device_password', None) + + +class DataboxJobSecrets(JobSecrets): + """The secrets related to a databox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_05_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.v2021_05_01.models.DataBoxSecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataboxJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBox' # type: str + self.pod_secrets = kwargs.get('pod_secrets', None) + + +class ScheduleAvailabilityRequest(msrest.serialization.Model): + """Request body to get the availability for scheduling orders. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxScheduleAvailabilityRequest, DiskScheduleAvailabilityRequest, HeavyScheduleAvailabilityRequest. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + _subtype_map = { + 'sku_name': {'DataBox': 'DataBoxScheduleAvailabilityRequest', 'DataBoxDisk': 'DiskScheduleAvailabilityRequest', 'DataBoxHeavy': 'HeavyScheduleAvailabilityRequest'} + } + + def __init__( + self, + **kwargs + ): + super(ScheduleAvailabilityRequest, self).__init__(**kwargs) + self.storage_location = kwargs['storage_location'] + self.sku_name = None # type: Optional[str] + self.country = kwargs.get('country', None) + + +class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling data box orders orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBox' # type: str + + +class DataBoxSecret(msrest.serialization.Model): + """The secrets related to a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_05_01.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_05_01.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxSecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DataExportDetails(msrest.serialization.Model): + """Details of the data to be used for exporting data from azure. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration: Required. Configuration for the data transfer. + :type transfer_configuration: ~azure.mgmt.databox.v2021_05_01.models.TransferConfiguration + :param log_collection_level: Level of the logs to be collected. Possible values include: + "Error", "Verbose". Default value: "Error". + :type log_collection_level: str or ~azure.mgmt.databox.v2021_05_01.models.LogCollectionLevel + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_05_01.models.DataAccountDetails + """ + + _validation = { + 'transfer_configuration': {'required': True}, + 'account_details': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration': {'key': 'transferConfiguration', 'type': 'TransferConfiguration'}, + 'log_collection_level': {'key': 'logCollectionLevel', 'type': 'str'}, + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(DataExportDetails, self).__init__(**kwargs) + self.transfer_configuration = kwargs['transfer_configuration'] + self.log_collection_level = kwargs.get('log_collection_level', "Error") + self.account_details = kwargs['account_details'] + + +class DataImportDetails(msrest.serialization.Model): + """Details of the data to be used for importing data to azure. + + All required parameters must be populated in order to send to Azure. + + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_05_01.models.DataAccountDetails + """ + + _validation = { + 'account_details': {'required': True}, + } + + _attribute_map = { + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(DataImportDetails, self).__init__(**kwargs) + self.account_details = kwargs['account_details'] + + +class DataLocationToServiceLocationMap(msrest.serialization.Model): + """Map of data location to service location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar data_location: Location of the data. + :vartype data_location: str + :ivar service_location: Location of the service. + :vartype service_location: str + """ + + _validation = { + 'data_location': {'readonly': True}, + 'service_location': {'readonly': True}, + } + + _attribute_map = { + 'data_location': {'key': 'dataLocation', 'type': 'str'}, + 'service_location': {'key': 'serviceLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataLocationToServiceLocationMap, self).__init__(**kwargs) + self.data_location = None + self.service_location = None + + +class DataTransferDetailsValidationRequest(ValidationInputRequest): + """Request to validate export and import data details. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :param data_export_details: List of DataTransfer details to be used to export data from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_05_01.models.DataExportDetails] + :param data_import_details: List of DataTransfer details to be used to import data to azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_05_01.models.DataImportDetails] + :param device_type: Required. Device type. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransferType + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTransferDetailsValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.data_export_details = kwargs.get('data_export_details', None) + self.data_import_details = kwargs.get('data_import_details', None) + self.device_type = kwargs['device_type'] + self.transfer_type = kwargs['transfer_type'] + + +class DataTransferDetailsValidationResponseProperties(ValidationInputResponse): + """Properties of data transfer details validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar status: Data transfer details validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTransferDetailsValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.status = None + + +class DcAccessSecurityCode(msrest.serialization.Model): + """Dc access security code. + + :param reverse_dc_access_code: Reverse Dc access security code. + :type reverse_dc_access_code: str + :param forward_dc_access_code: Forward Dc access security code. + :type forward_dc_access_code: str + """ + + _attribute_map = { + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DcAccessSecurityCode, self).__init__(**kwargs) + self.reverse_dc_access_code = kwargs.get('reverse_dc_access_code', None) + self.forward_dc_access_code = kwargs.get('forward_dc_access_code', None) + + +class Details(msrest.serialization.Model): + """Details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Details, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + + +class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling disk orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBoxDisk' # type: str + self.expected_data_size_in_tera_bytes = kwargs['expected_data_size_in_tera_bytes'] + + +class DiskSecret(msrest.serialization.Model): + """Contains all the secrets of a Disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar disk_serial_number: Serial number of the assigned disk. + :vartype disk_serial_number: str + :ivar bit_locker_key: Bit Locker key of the disk which can be used to unlock the disk to copy + data. + :vartype bit_locker_key: str + """ + + _validation = { + 'disk_serial_number': {'readonly': True}, + 'bit_locker_key': {'readonly': True}, + } + + _attribute_map = { + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskSecret, self).__init__(**kwargs) + self.disk_serial_number = None + self.bit_locker_key = None + + +class EncryptionPreferences(msrest.serialization.Model): + """Preferences related to the Encryption. + + :param double_encryption: Defines secondary layer of software-based encryption enablement. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type double_encryption: str or ~azure.mgmt.databox.v2021_05_01.models.DoubleEncryption + """ + + _attribute_map = { + 'double_encryption': {'key': 'doubleEncryption', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EncryptionPreferences, self).__init__(**kwargs) + self.double_encryption = kwargs.get('double_encryption', "Disabled") + + +class ErrorDetail(msrest.serialization.Model): + """ErrorDetail. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + :param details: + :type details: list[~azure.mgmt.databox.v2021_05_01.models.Details] + :param target: + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Details]'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.details = kwargs.get('details', None) + self.target = kwargs.get('target', None) + + +class FilterFileDetails(msrest.serialization.Model): + """Details of the filter files to be used for data transfer. + + All required parameters must be populated in order to send to Azure. + + :param filter_file_type: Required. Type of the filter file. Possible values include: + "AzureBlob", "AzureFile". + :type filter_file_type: str or ~azure.mgmt.databox.v2021_05_01.models.FilterFileType + :param filter_file_path: Required. Path of the file that contains the details of all items to + transfer. + :type filter_file_path: str + """ + + _validation = { + 'filter_file_type': {'required': True}, + 'filter_file_path': {'required': True}, + } + + _attribute_map = { + 'filter_file_type': {'key': 'filterFileType', 'type': 'str'}, + 'filter_file_path': {'key': 'filterFilePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FilterFileDetails, self).__init__(**kwargs) + self.filter_file_type = kwargs['filter_file_type'] + self.filter_file_path = kwargs['filter_file_path'] + + +class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling heavy orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HeavyScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBoxHeavy' # type: str + + +class IdentityProperties(msrest.serialization.Model): + """Managed identity properties. + + :param type: Managed service identity type. + :type type: str + :param user_assigned: User assigned identity properties. + :type user_assigned: ~azure.mgmt.databox.v2021_05_01.models.UserAssignedProperties + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned': {'key': 'userAssigned', 'type': 'UserAssignedProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(IdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.user_assigned = kwargs.get('user_assigned', None) + + +class JobDeliveryInfo(msrest.serialization.Model): + """Additional delivery info. + + :param scheduled_date_time: Scheduled date time. + :type scheduled_date_time: ~datetime.datetime + """ + + _attribute_map = { + 'scheduled_date_time': {'key': 'scheduledDateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(JobDeliveryInfo, self).__init__(**kwargs) + self.scheduled_date_time = kwargs.get('scheduled_date_time', None) + + +class Resource(msrest.serialization.Model): + """Model of the Resource. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_05_01.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_05_01.models.ResourceIdentity + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + self.sku = kwargs['sku'] + self.identity = kwargs.get('identity', None) + + +class JobResource(Resource): + """Job Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_05_01.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_05_01.models.ResourceIdentity + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.databox.v2021_05_01.models.SystemData + :param transfer_type: Required. Type of the data transfer. Possible values include: + "ImportToAzure", "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransferType + :ivar is_cancellable: Describes whether the job is cancellable or not. + :vartype is_cancellable: bool + :ivar is_deletable: Describes whether the job is deletable or not. + :vartype is_deletable: bool + :ivar is_shipping_address_editable: Describes whether the shipping address is editable or not. + :vartype is_shipping_address_editable: bool + :ivar is_prepare_to_ship_enabled: Is Prepare To Ship Enabled on this job. + :vartype is_prepare_to_ship_enabled: bool + :ivar status: Name of the stage which is in progress. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :param details: Details of a job run. This field will only be sent for expand details filter. + :type details: ~azure.mgmt.databox.v2021_05_01.models.JobDetails + :ivar cancellation_reason: Reason for cancellation. + :vartype cancellation_reason: str + :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2021_05_01.models.JobDeliveryType + :param delivery_info: Delivery Info of Job. + :type delivery_info: ~azure.mgmt.databox.v2021_05_01.models.JobDeliveryInfo + :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. + :vartype is_cancellable_without_fee: bool + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'transfer_type': {'required': True}, + 'is_cancellable': {'readonly': True}, + 'is_deletable': {'readonly': True}, + 'is_shipping_address_editable': {'readonly': True}, + 'is_prepare_to_ship_enabled': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'error': {'readonly': True}, + 'cancellation_reason': {'readonly': True}, + 'is_cancellable_without_fee': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'transfer_type': {'key': 'properties.transferType', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, + 'is_shipping_address_editable': {'key': 'properties.isShippingAddressEditable', 'type': 'bool'}, + 'is_prepare_to_ship_enabled': {'key': 'properties.isPrepareToShipEnabled', 'type': 'bool'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'details': {'key': 'properties.details', 'type': 'JobDetails'}, + 'cancellation_reason': {'key': 'properties.cancellationReason', 'type': 'str'}, + 'delivery_type': {'key': 'properties.deliveryType', 'type': 'str'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, + 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(JobResource, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + self.system_data = None + self.transfer_type = kwargs['transfer_type'] + self.is_cancellable = None + self.is_deletable = None + self.is_shipping_address_editable = None + self.is_prepare_to_ship_enabled = None + self.status = None + self.start_time = None + self.error = None + self.details = kwargs.get('details', None) + self.cancellation_reason = None + self.delivery_type = kwargs.get('delivery_type', "NonScheduled") + self.delivery_info = kwargs.get('delivery_info', None) + self.is_cancellable_without_fee = None + + +class JobResourceList(msrest.serialization.Model): + """Job Resource Collection. + + :param value: List of job resources. + :type value: list[~azure.mgmt.databox.v2021_05_01.models.JobResource] + :param next_link: Link for the next set of job resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[JobResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(JobResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class JobResourceUpdateParameter(msrest.serialization.Model): + """The JobResourceUpdateParameter. + + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_05_01.models.ResourceIdentity + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.v2021_05_01.models.UpdateJobDetails + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.details = kwargs.get('details', None) + + +class JobStages(msrest.serialization.Model): + """Job stages. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar stage_name: Name of the job stage. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". + :vartype stage_name: str or ~azure.mgmt.databox.v2021_05_01.models.StageName + :ivar display_name: Display name of the job stage. + :vartype display_name: str + :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", + "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors", + "WaitingForCustomerAction", "SucceededWithWarnings", "WaitingForCustomerActionForKek", + "WaitingForCustomerActionForCleanUp", "CustomerActionPerformedForCleanUp". + :vartype stage_status: str or ~azure.mgmt.databox.v2021_05_01.models.StageStatus + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: ~datetime.datetime + :ivar job_stage_details: Job Stage Details. + :vartype job_stage_details: any + """ + + _validation = { + 'stage_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'stage_status': {'readonly': True}, + 'stage_time': {'readonly': True}, + 'job_stage_details': {'readonly': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'str'}, + 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, + 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(JobStages, self).__init__(**kwargs) + self.stage_name = None + self.display_name = None + self.stage_status = None + self.stage_time = None + self.job_stage_details = None + + +class KeyEncryptionKey(msrest.serialization.Model): + """Encryption key containing details about key to encrypt different keys. + + All required parameters must be populated in order to send to Azure. + + :param kek_type: Required. Type of encryption key used for key encryption. Possible values + include: "MicrosoftManaged", "CustomerManaged". Default value: "MicrosoftManaged". + :type kek_type: str or ~azure.mgmt.databox.v2021_05_01.models.KekType + :param identity_properties: Managed identity properties used for key encryption. + :type identity_properties: ~azure.mgmt.databox.v2021_05_01.models.IdentityProperties + :param kek_url: Key encryption key. It is required in case of Customer managed KekType. + :type kek_url: str + :param kek_vault_resource_id: Kek vault resource id. It is required in case of Customer managed + KekType. + :type kek_vault_resource_id: str + """ + + _validation = { + 'kek_type': {'required': True}, + } + + _attribute_map = { + 'kek_type': {'key': 'kekType', 'type': 'str'}, + 'identity_properties': {'key': 'identityProperties', 'type': 'IdentityProperties'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'kek_vault_resource_id': {'key': 'kekVaultResourceID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyEncryptionKey, self).__init__(**kwargs) + self.kek_type = kwargs.get('kek_type', "MicrosoftManaged") + self.identity_properties = kwargs.get('identity_properties', None) + self.kek_url = kwargs.get('kek_url', None) + self.kek_vault_resource_id = kwargs.get('kek_vault_resource_id', None) + + +class LastMitigationActionOnJob(msrest.serialization.Model): + """Last Mitigation Action Performed On Job. + + :param action_date_time_in_utc: Action performed date time. + :type action_date_time_in_utc: ~datetime.datetime + :param is_performed_by_customer: Action performed by customer, + possibility is that mitigation might happen by customer or service or by ops. + :type is_performed_by_customer: bool + :param customer_resolution: Resolution code provided by customer. Possible values include: + "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution: str or ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode + """ + + _attribute_map = { + 'action_date_time_in_utc': {'key': 'actionDateTimeInUtc', 'type': 'iso-8601'}, + 'is_performed_by_customer': {'key': 'isPerformedByCustomer', 'type': 'bool'}, + 'customer_resolution': {'key': 'customerResolution', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LastMitigationActionOnJob, self).__init__(**kwargs) + self.action_date_time_in_utc = kwargs.get('action_date_time_in_utc', None) + self.is_performed_by_customer = kwargs.get('is_performed_by_customer', None) + self.customer_resolution = kwargs.get('customer_resolution', None) + + +class ManagedDiskDetails(DataAccountDetails): + """Details of the managed disks. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param resource_group_id: Required. Resource Group Id of the compute disks. + :type resource_group_id: str + :param staging_storage_account_id: Required. Resource Id of the storage account that can be + used to copy the vhd for staging. + :type staging_storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'resource_group_id': {'required': True}, + 'staging_storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + 'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedDiskDetails, self).__init__(**kwargs) + self.data_account_type = 'ManagedDisk' # type: str + self.resource_group_id = kwargs['resource_group_id'] + self.staging_storage_account_id = kwargs['staging_storage_account_id'] + + +class MitigateJobRequest(msrest.serialization.Model): + """The Mitigate Job captured from request body for Mitigate API. + + All required parameters must be populated in order to send to Azure. + + :param customer_resolution_code: Required. Resolution code for the job. Possible values + include: "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution_code: str or + ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode + """ + + _validation = { + 'customer_resolution_code': {'required': True}, + } + + _attribute_map = { + 'customer_resolution_code': {'key': 'customerResolutionCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MitigateJobRequest, self).__init__(**kwargs) + self.customer_resolution_code = kwargs['customer_resolution_code'] + + +class NotificationPreference(msrest.serialization.Model): + """Notification preference for a job stage. + + All required parameters must be populated in order to send to Azure. + + :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", + "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". + :type stage_name: str or ~azure.mgmt.databox.v2021_05_01.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = kwargs['stage_name'] + self.send_notification = kwargs.get('send_notification', True) + + +class Operation(msrest.serialization.Model): + """Operation entity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the operation. Format: + {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. + :vartype name: str + :ivar display: Operation display values. + :vartype display: ~azure.mgmt.databox.v2021_05_01.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: any + :ivar origin: Origin of the operation. Can be : user|system|user,system. + :vartype origin: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'properties': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.properties = None + self.origin = None + self.is_data_action = kwargs.get('is_data_action', None) + + +class OperationDisplay(msrest.serialization.Model): + """Operation display. + + :param provider: Provider name. + :type provider: str + :param resource: Resource name. + :type resource: str + :param operation: Localized name of the operation for display purpose. + :type operation: str + :param description: Localized description of the operation for display purpose. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationList(msrest.serialization.Model): + """Operation Collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations. + :vartype value: list[~azure.mgmt.databox.v2021_05_01.models.Operation] + :param next_link: Link for the next set of operations. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationList, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class PackageShippingDetails(msrest.serialization.Model): + """Shipping details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar carrier_name: Name of the carrier. + :vartype carrier_name: str + :ivar tracking_id: Tracking Id of shipment. + :vartype tracking_id: str + :ivar tracking_url: Url where shipment can be tracked. + :vartype tracking_url: str + """ + + _validation = { + 'carrier_name': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'tracking_url': {'readonly': True}, + } + + _attribute_map = { + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PackageShippingDetails, self).__init__(**kwargs) + self.carrier_name = None + self.tracking_id = None + self.tracking_url = None + + +class Preferences(msrest.serialization.Model): + """Preferences related to the order. + + :param preferred_data_center_region: Preferred data center region. + :type preferred_data_center_region: list[str] + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.v2021_05_01.models.TransportPreferences + :param encryption_preferences: Preferences related to the Encryption. + :type encryption_preferences: ~azure.mgmt.databox.v2021_05_01.models.EncryptionPreferences + """ + + _attribute_map = { + 'preferred_data_center_region': {'key': 'preferredDataCenterRegion', 'type': '[str]'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + 'encryption_preferences': {'key': 'encryptionPreferences', 'type': 'EncryptionPreferences'}, + } + + def __init__( + self, + **kwargs + ): + super(Preferences, self).__init__(**kwargs) + self.preferred_data_center_region = kwargs.get('preferred_data_center_region', None) + self.transport_preferences = kwargs.get('transport_preferences', None) + self.encryption_preferences = kwargs.get('encryption_preferences', None) + + +class PreferencesValidationRequest(ValidationInputRequest): + """Request to validate preference of transport and data center. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :param preference: Preference of transport and data center. + :type preference: ~azure.mgmt.databox.v2021_05_01.models.Preferences + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'preference': {'key': 'preference', 'type': 'Preferences'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PreferencesValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.preference = kwargs.get('preference', None) + self.device_type = kwargs['device_type'] + + +class PreferencesValidationResponseProperties(ValidationInputResponse): + """Properties of data center and transport preference validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar status: Validation status of requested data center and transport. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.status = None + + +class RegionConfigurationRequest(msrest.serialization.Model): + """Request body to get the configuration for the region. + + :param schedule_availability_request: Request body to get the availability for scheduling + orders. + :type schedule_availability_request: + ~azure.mgmt.databox.v2021_05_01.models.ScheduleAvailabilityRequest + :param transport_availability_request: Request body to get the transport availability for given + sku. + :type transport_availability_request: + ~azure.mgmt.databox.v2021_05_01.models.TransportAvailabilityRequest + """ + + _attribute_map = { + 'schedule_availability_request': {'key': 'scheduleAvailabilityRequest', 'type': 'ScheduleAvailabilityRequest'}, + 'transport_availability_request': {'key': 'transportAvailabilityRequest', 'type': 'TransportAvailabilityRequest'}, + } + + def __init__( + self, + **kwargs + ): + super(RegionConfigurationRequest, self).__init__(**kwargs) + self.schedule_availability_request = kwargs.get('schedule_availability_request', None) + self.transport_availability_request = kwargs.get('transport_availability_request', None) + + +class RegionConfigurationResponse(msrest.serialization.Model): + """Configuration response specific to a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar schedule_availability_response: Schedule availability for given sku in a region. + :vartype schedule_availability_response: + ~azure.mgmt.databox.v2021_05_01.models.ScheduleAvailabilityResponse + :ivar transport_availability_response: Transport options available for given sku in a region. + :vartype transport_availability_response: + ~azure.mgmt.databox.v2021_05_01.models.TransportAvailabilityResponse + """ + + _validation = { + 'schedule_availability_response': {'readonly': True}, + 'transport_availability_response': {'readonly': True}, + } + + _attribute_map = { + 'schedule_availability_response': {'key': 'scheduleAvailabilityResponse', 'type': 'ScheduleAvailabilityResponse'}, + 'transport_availability_response': {'key': 'transportAvailabilityResponse', 'type': 'TransportAvailabilityResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(RegionConfigurationResponse, self).__init__(**kwargs) + self.schedule_availability_response = None + self.transport_availability_response = None + + +class ResourceIdentity(msrest.serialization.Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: Identity type. + :type type: str + :ivar principal_id: Service Principal Id backing the Msi. + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id. + :vartype tenant_id: str + :param user_assigned_identities: User Assigned Identities. + :type user_assigned_identities: dict[str, + ~azure.mgmt.databox.v2021_05_01.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', "None") + self.principal_id = None + self.tenant_id = None + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class ScheduleAvailabilityResponse(msrest.serialization.Model): + """Schedule availability for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar available_dates: List of dates available to schedule. + :vartype available_dates: list[~datetime.datetime] + """ + + _validation = { + 'available_dates': {'readonly': True}, + } + + _attribute_map = { + 'available_dates': {'key': 'availableDates', 'type': '[iso-8601]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduleAvailabilityResponse, self).__init__(**kwargs) + self.available_dates = None + + +class ShareCredentialDetails(msrest.serialization.Model): + """Credential details of the shares in account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar share_name: Name of the share. + :vartype share_name: str + :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", + "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". + :vartype share_type: str or ~azure.mgmt.databox.v2021_05_01.models.ShareDestinationFormatType + :ivar user_name: User name for the share. + :vartype user_name: str + :ivar password: Password for the share. + :vartype password: str + :ivar supported_access_protocols: Access protocols supported on the device. + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2021_05_01.models.AccessProtocol] + """ + + _validation = { + 'share_name': {'readonly': True}, + 'share_type': {'readonly': True}, + 'user_name': {'readonly': True}, + 'password': {'readonly': True}, + 'supported_access_protocols': {'readonly': True}, + } + + _attribute_map = { + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'share_type': {'key': 'shareType', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareCredentialDetails, self).__init__(**kwargs) + self.share_name = None + self.share_type = None + self.user_name = None + self.password = None + self.supported_access_protocols = None + + +class ShipmentPickUpRequest(msrest.serialization.Model): + """Shipment pick up request details. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. Minimum date after which the pick up should commence, this must be + in local time of pick up area. + :type start_time: ~datetime.datetime + :param end_time: Required. Maximum date before which the pick up should commence, this must be + in local time of pick up area. + :type end_time: ~datetime.datetime + :param shipment_location: Required. Shipment Location in the pickup place. Eg.front desk. + :type shipment_location: str + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + 'shipment_location': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'shipment_location': {'key': 'shipmentLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShipmentPickUpRequest, self).__init__(**kwargs) + self.start_time = kwargs['start_time'] + self.end_time = kwargs['end_time'] + self.shipment_location = kwargs['shipment_location'] + + +class ShipmentPickUpResponse(msrest.serialization.Model): + """Shipment pick up response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar confirmation_number: Confirmation number for the pick up request. + :vartype confirmation_number: str + :ivar ready_by_time: Time by which shipment should be ready for pick up, this is in local time + of pick up area. + :vartype ready_by_time: ~datetime.datetime + """ + + _validation = { + 'confirmation_number': {'readonly': True}, + 'ready_by_time': {'readonly': True}, + } + + _attribute_map = { + 'confirmation_number': {'key': 'confirmationNumber', 'type': 'str'}, + 'ready_by_time': {'key': 'readyByTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ShipmentPickUpResponse, self).__init__(**kwargs) + self.confirmation_number = None + self.ready_by_time = None + + +class ShippingAddress(msrest.serialization.Model): + """Shipping address where customer wishes to receive the device. + + All required parameters must be populated in order to send to Azure. + + :param street_address1: Required. Street Address line 1. + :type street_address1: str + :param street_address2: Street Address line 2. + :type street_address2: str + :param street_address3: Street Address line 3. + :type street_address3: str + :param city: Name of the City. + :type city: str + :param state_or_province: Name of the State or Province. + :type state_or_province: str + :param country: Required. Name of the Country. + :type country: str + :param postal_code: Postal code. + :type postal_code: str + :param zip_extended_code: Extended Zip Code. + :type zip_extended_code: str + :param company_name: Name of the company. + :type company_name: str + :param address_type: Type of address. Possible values include: "None", "Residential", + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2021_05_01.models.AddressType + """ + + _validation = { + 'street_address1': {'required': True}, + 'country': {'required': True}, + } + + _attribute_map = { + 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, + 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, + 'street_address3': {'key': 'streetAddress3', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'zip_extended_code': {'key': 'zipExtendedCode', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'address_type': {'key': 'addressType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShippingAddress, self).__init__(**kwargs) + self.street_address1 = kwargs['street_address1'] + self.street_address2 = kwargs.get('street_address2', None) + self.street_address3 = kwargs.get('street_address3', None) + self.city = kwargs.get('city', None) + self.state_or_province = kwargs.get('state_or_province', None) + self.country = kwargs['country'] + self.postal_code = kwargs.get('postal_code', None) + self.zip_extended_code = kwargs.get('zip_extended_code', None) + self.company_name = kwargs.get('company_name', None) + self.address_type = kwargs.get('address_type', "None") + + +class Sku(msrest.serialization.Model): + """The Sku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param display_name: The display name of the sku. + :type display_name: str + :param family: The sku family. + :type family: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs['name'] + self.display_name = kwargs.get('display_name', None) + self.family = kwargs.get('family', None) + + +class SkuAvailabilityValidationRequest(ValidationInputRequest): + """Request to validate sku availability. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.device_type = kwargs['device_type'] + self.transfer_type = kwargs['transfer_type'] + self.country = kwargs['country'] + self.location = kwargs['location'] + + +class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): + """Properties of sku availability validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", + "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.status = None + + +class SkuCapacity(msrest.serialization.Model): + """Capacity of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar usable: Usable capacity in TB. + :vartype usable: str + :ivar maximum: Maximum capacity in TB. + :vartype maximum: str + """ + + _validation = { + 'usable': {'readonly': True}, + 'maximum': {'readonly': True}, + } + + _attribute_map = { + 'usable': {'key': 'usable', 'type': 'str'}, + 'maximum': {'key': 'maximum', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.usable = None + self.maximum = None + + +class SkuCost(msrest.serialization.Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar meter_id: Meter id of the Sku. + :vartype meter_id: str + :ivar meter_type: The type of the meter. + :vartype meter_type: str + :ivar multiplier: Multiplier specifies the region specific value to be multiplied with 1$ guid. + Eg: Our new regions will be using 1$ shipping guid with appropriate multiplier specific to + region. + :vartype multiplier: float + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'meter_type': {'readonly': True}, + 'multiplier': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_type': {'key': 'meterType', 'type': 'str'}, + 'multiplier': {'key': 'multiplier', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.meter_type = None + self.multiplier = None + + +class SkuInformation(msrest.serialization.Model): + """Information of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.databox.v2021_05_01.models.Sku + :ivar enabled: The sku is enabled or not. + :vartype enabled: bool + :ivar data_location_to_service_location_map: The map of data location to service location. + :vartype data_location_to_service_location_map: + list[~azure.mgmt.databox.v2021_05_01.models.DataLocationToServiceLocationMap] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.v2021_05_01.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.v2021_05_01.models.SkuCost] + :ivar api_versions: Api versions that support this Sku. + :vartype api_versions: list[str] + :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", + "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". + :vartype disabled_reason: str or ~azure.mgmt.databox.v2021_05_01.models.SkuDisabledReason + :ivar disabled_reason_message: Message for why the Sku is disabled. + :vartype disabled_reason_message: str + :ivar required_feature: Required feature to access the sku. + :vartype required_feature: str + """ + + _validation = { + 'sku': {'readonly': True}, + 'enabled': {'readonly': True}, + 'data_location_to_service_location_map': {'readonly': True}, + 'capacity': {'readonly': True}, + 'costs': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'disabled_reason': {'readonly': True}, + 'disabled_reason_message': {'readonly': True}, + 'required_feature': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'data_location_to_service_location_map': {'key': 'properties.dataLocationToServiceLocationMap', 'type': '[DataLocationToServiceLocationMap]'}, + 'capacity': {'key': 'properties.capacity', 'type': 'SkuCapacity'}, + 'costs': {'key': 'properties.costs', 'type': '[SkuCost]'}, + 'api_versions': {'key': 'properties.apiVersions', 'type': '[str]'}, + 'disabled_reason': {'key': 'properties.disabledReason', 'type': 'str'}, + 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, + 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuInformation, self).__init__(**kwargs) + self.sku = None + self.enabled = None + self.data_location_to_service_location_map = None + self.capacity = None + self.costs = None + self.api_versions = None + self.disabled_reason = None + self.disabled_reason_message = None + self.required_feature = None + + +class StorageAccountDetails(DataAccountDetails): + """Details for the storage account. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param storage_account_id: Required. Storage Account Resource Id. + :type storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageAccountDetails, self).__init__(**kwargs) + self.data_account_type = 'StorageAccount' # type: str + self.storage_account_id = kwargs['storage_account_id'] + + +class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): + """Request to validate subscription permission to create jobs. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + + +class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInputResponse): + """Properties of subscription permission to create job validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar status: Validation status of subscription permission to create job. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + self.status = None + + +class SystemData(msrest.serialization.Model): + """Provides details about resource creation and update time. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_by: A string identifier for the identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource: user, application, + managedIdentity. + :vartype created_by_type: str + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: A string identifier for the identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource: user, + application, managedIdentity. + :vartype last_modified_by_type: str + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _validation = { + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + } + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = None + self.created_by_type = None + self.created_at = None + self.last_modified_by = None + self.last_modified_by_type = None + self.last_modified_at = None + + +class TransferAllDetails(msrest.serialization.Model): + """Details to transfer all data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :param transfer_all_blobs: To indicate if all Azure blobs have to be transferred. + :type transfer_all_blobs: bool + :param transfer_all_files: To indicate if all Azure Files have to be transferred. + :type transfer_all_files: bool + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'transfer_all_blobs': {'key': 'transferAllBlobs', 'type': 'bool'}, + 'transfer_all_files': {'key': 'transferAllFiles', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferAllDetails, self).__init__(**kwargs) + self.data_account_type = kwargs['data_account_type'] + self.transfer_all_blobs = kwargs.get('transfer_all_blobs', None) + self.transfer_all_files = kwargs.get('transfer_all_files', None) + + +class TransferConfiguration(msrest.serialization.Model): + """Configuration for defining the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration_type: Required. Type of the configuration for transfer. Possible + values include: "TransferAll", "TransferUsingFilter". + :type transfer_configuration_type: str or + ~azure.mgmt.databox.v2021_05_01.models.TransferConfigurationType + :param transfer_filter_details: Map of filter type and the details to filter. This field is + required only if the TransferConfigurationType is given as TransferUsingFilter. + :type transfer_filter_details: + ~azure.mgmt.databox.v2021_05_01.models.TransferConfigurationTransferFilterDetails + :param transfer_all_details: Map of filter type and the details to transfer all data. This + field is required only if the TransferConfigurationType is given as TransferAll. + :type transfer_all_details: + ~azure.mgmt.databox.v2021_05_01.models.TransferConfigurationTransferAllDetails + """ + + _validation = { + 'transfer_configuration_type': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration_type': {'key': 'transferConfigurationType', 'type': 'str'}, + 'transfer_filter_details': {'key': 'transferFilterDetails', 'type': 'TransferConfigurationTransferFilterDetails'}, + 'transfer_all_details': {'key': 'transferAllDetails', 'type': 'TransferConfigurationTransferAllDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferConfiguration, self).__init__(**kwargs) + self.transfer_configuration_type = kwargs['transfer_configuration_type'] + self.transfer_filter_details = kwargs.get('transfer_filter_details', None) + self.transfer_all_details = kwargs.get('transfer_all_details', None) + + +class TransferConfigurationTransferAllDetails(msrest.serialization.Model): + """Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. + + :param include: Details to transfer all data. + :type include: ~azure.mgmt.databox.v2021_05_01.models.TransferAllDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferAllDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferConfigurationTransferAllDetails, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + + +class TransferConfigurationTransferFilterDetails(msrest.serialization.Model): + """Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. + + :param include: Details of the filtering the transfer of data. + :type include: ~azure.mgmt.databox.v2021_05_01.models.TransferFilterDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferFilterDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferConfigurationTransferFilterDetails, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + + +class TransferFilterDetails(msrest.serialization.Model): + """Details of the filtering the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :param blob_filter_details: Filter details to transfer blobs. + :type blob_filter_details: ~azure.mgmt.databox.v2021_05_01.models.BlobFilterDetails + :param azure_file_filter_details: Filter details to transfer Azure files. + :type azure_file_filter_details: ~azure.mgmt.databox.v2021_05_01.models.AzureFileFilterDetails + :param filter_file_details: Details of the filter files to be used for data transfer. + :type filter_file_details: list[~azure.mgmt.databox.v2021_05_01.models.FilterFileDetails] + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'blob_filter_details': {'key': 'blobFilterDetails', 'type': 'BlobFilterDetails'}, + 'azure_file_filter_details': {'key': 'azureFileFilterDetails', 'type': 'AzureFileFilterDetails'}, + 'filter_file_details': {'key': 'filterFileDetails', 'type': '[FilterFileDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferFilterDetails, self).__init__(**kwargs) + self.data_account_type = kwargs['data_account_type'] + self.blob_filter_details = kwargs.get('blob_filter_details', None) + self.azure_file_filter_details = kwargs.get('azure_file_filter_details', None) + self.filter_file_details = kwargs.get('filter_file_details', None) + + +class TransportAvailabilityDetails(msrest.serialization.Model): + """Transport options availability details for given region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar shipment_type: Transport Shipment Type supported for given region. Possible values + include: "CustomerManaged", "MicrosoftManaged". + :vartype shipment_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransportShipmentTypes + """ + + _validation = { + 'shipment_type': {'readonly': True}, + } + + _attribute_map = { + 'shipment_type': {'key': 'shipmentType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityDetails, self).__init__(**kwargs) + self.shipment_type = None + + +class TransportAvailabilityRequest(msrest.serialization.Model): + """Request body to get the transport availability for given sku. + + :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + """ + + _attribute_map = { + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = kwargs.get('sku_name', None) + + +class TransportAvailabilityResponse(msrest.serialization.Model): + """Transport options available for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar transport_availability_details: List of transport availability details for given region. + :vartype transport_availability_details: + list[~azure.mgmt.databox.v2021_05_01.models.TransportAvailabilityDetails] + """ + + _validation = { + 'transport_availability_details': {'readonly': True}, + } + + _attribute_map = { + 'transport_availability_details': {'key': 'transportAvailabilityDetails', 'type': '[TransportAvailabilityDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityResponse, self).__init__(**kwargs) + self.transport_availability_details = None + + +class TransportPreferences(msrest.serialization.Model): + """Preferences related to the shipment logistics of the sku. + + All required parameters must be populated in order to send to Azure. + + :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2021_05_01.models.TransportShipmentTypes + """ + + _validation = { + 'preferred_shipment_type': {'required': True}, + } + + _attribute_map = { + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportPreferences, self).__init__(**kwargs) + self.preferred_shipment_type = kwargs['preferred_shipment_type'] + + +class UnencryptedCredentials(msrest.serialization.Model): + """Unencrypted credentials for accessing device. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar job_name: Name of the job. + :vartype job_name: str + :ivar job_secrets: Secrets related to this job. + :vartype job_secrets: ~azure.mgmt.databox.v2021_05_01.models.JobSecrets + """ + + _validation = { + 'job_name': {'readonly': True}, + 'job_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'job_secrets': {'key': 'jobSecrets', 'type': 'JobSecrets'}, + } + + def __init__( + self, + **kwargs + ): + super(UnencryptedCredentials, self).__init__(**kwargs) + self.job_name = None + self.job_secrets = None + + +class UnencryptedCredentialsList(msrest.serialization.Model): + """List of unencrypted credentials for accessing device. + + :param value: List of unencrypted credentials. + :type value: list[~azure.mgmt.databox.v2021_05_01.models.UnencryptedCredentials] + :param next_link: Link for the next set of unencrypted credentials. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UnencryptedCredentials]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UnencryptedCredentialsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class UpdateJobDetails(msrest.serialization.Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_05_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :param key_encryption_key: Key encryption key for the job. + :type key_encryption_key: ~azure.mgmt.databox.v2021_05_01.models.KeyEncryptionKey + """ + + _attribute_map = { + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + } + + def __init__( + self, + **kwargs + ): + super(UpdateJobDetails, self).__init__(**kwargs) + self.contact_details = kwargs.get('contact_details', None) + self.shipping_address = kwargs.get('shipping_address', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + + +class UserAssignedIdentity(msrest.serialization.Model): + """Class defining User assigned identity details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedProperties(msrest.serialization.Model): + """User assigned identity properties. + + :param resource_id: Arm resource id for user assigned identity to be used to fetch MSI token. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedProperties, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + + +class ValidateAddress(ValidationInputRequest): + """The requirements to validate customer address where the device needs to be shipped. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.v2021_05_01.models.TransportPreferences + """ + + _validation = { + 'validation_type': {'required': True}, + 'shipping_address': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateAddress, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.shipping_address = kwargs['shipping_address'] + self.device_type = kwargs['device_type'] + self.transport_preferences = kwargs.get('transport_preferences', None) + + +class ValidationResponse(msrest.serialization.Model): + """Response of pre job creation validations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Overall validation status. Possible values include: "AllValidToProceed", + "InputsRevisitRequired", "CertainInputValidationsSkipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.OverallValidationStatus + :ivar individual_response_details: List of response details contain validationType and its + response as key and value respectively. + :vartype individual_response_details: + list[~azure.mgmt.databox.v2021_05_01.models.ValidationInputResponse] + """ + + _validation = { + 'status': {'readonly': True}, + 'individual_response_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'individual_response_details': {'key': 'properties.individualResponseDetails', 'type': '[ValidationInputResponse]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidationResponse, self).__init__(**kwargs) + self.status = None + self.individual_response_details = None diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/_models_py3.py new file mode 100644 index 0000000000000..608ebd372692c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/models/_models_py3.py @@ -0,0 +1,4422 @@ +# 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 + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._data_box_management_client_enums import * + + +class AccountCredentialDetails(msrest.serialization.Model): + """Credential details of the account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar account_name: Name of the account. + :vartype account_name: str + :ivar data_account_type: Type of the account. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :ivar account_connection_string: Connection string of the account endpoint to use the account + as a storage endpoint on the device. + :vartype account_connection_string: str + :ivar share_credential_details: Per share level unencrypted access credentials. + :vartype share_credential_details: + list[~azure.mgmt.databox.v2021_05_01.models.ShareCredentialDetails] + """ + + _validation = { + 'account_name': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_connection_string': {'readonly': True}, + 'share_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, + 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountCredentialDetails, self).__init__(**kwargs) + self.account_name = None + self.data_account_type = None + self.account_connection_string = None + self.share_credential_details = None + + +class AdditionalErrorInfo(msrest.serialization.Model): + """Additional error info. + + :param type: Additional error type. + :type type: str + :param info: Additional error info. + :type info: any + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + info: Optional[Any] = None, + **kwargs + ): + super(AdditionalErrorInfo, self).__init__(**kwargs) + self.type = type + self.info = info + + +class AddressValidationOutput(msrest.serialization.Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param validation_type: Identifies the type of validation response.Constant filled by server. + Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", + "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", + "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_05_01.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: list[~azure.mgmt.databox.v2021_05_01.models.ShippingAddress] + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'properties.validationType', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationOutput, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ValidationInputResponse(msrest.serialization.Model): + """Minimum properties that should be present in each individual validation response. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddressValidationProperties, CreateOrderLimitForSubscriptionValidationResponseProperties, DataTransferDetailsValidationResponseProperties, PreferencesValidationResponseProperties, SkuAvailabilityValidationResponseProperties, SubscriptionIsAllowedToCreateJobValidationResponseProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'AddressValidationProperties', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputResponse, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + + +class AddressValidationProperties(ValidationInputResponse): + """The address validation output. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_05_01.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: list[~azure.mgmt.databox.v2021_05_01.models.ShippingAddress] + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_status': {'key': 'validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.validation_status = None + self.alternate_addresses = None + + +class ApiError(msrest.serialization.Model): + """ApiError. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. + :type error: ~azure.mgmt.databox.v2021_05_01.models.ErrorDetail + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: "ErrorDetail", + **kwargs + ): + super(ApiError, self).__init__(**kwargs) + self.error = error + + +class ApplianceNetworkConfiguration(msrest.serialization.Model): + """The Network Adapter configuration of a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the network. + :vartype name: str + :ivar mac_address: Mac Address. + :vartype mac_address: str + """ + + _validation = { + 'name': {'readonly': True}, + 'mac_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceNetworkConfiguration, self).__init__(**kwargs) + self.name = None + self.mac_address = None + + +class ArmBaseObject(msrest.serialization.Model): + """Base class for all objects under resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmBaseObject, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + + +class AvailableSkuRequest(msrest.serialization.Model): + """The filters for showing the available skus. + + All required parameters must be populated in order to send to Azure. + + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + :param sku_names: Sku Names to filter for available skus. + :type sku_names: list[str or ~azure.mgmt.databox.v2021_05_01.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku_names': {'key': 'skuNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + transfer_type: Union[str, "TransferType"], + country: str, + location: str, + sku_names: Optional[List[Union[str, "SkuName"]]] = None, + **kwargs + ): + super(AvailableSkuRequest, self).__init__(**kwargs) + self.transfer_type = transfer_type + self.country = country + self.location = location + self.sku_names = sku_names + + +class AvailableSkusResult(msrest.serialization.Model): + """The available skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of available skus. + :vartype value: list[~azure.mgmt.databox.v2021_05_01.models.SkuInformation] + :param next_link: Link for the next set of skus. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SkuInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(AvailableSkusResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class AzureFileFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure files. + + :param file_prefix_list: Prefix list of the Azure files to be transferred. + :type file_prefix_list: list[str] + :param file_path_list: List of full path of the files to be transferred. + :type file_path_list: list[str] + :param file_share_list: List of file shares to be transferred. + :type file_share_list: list[str] + """ + + _attribute_map = { + 'file_prefix_list': {'key': 'filePrefixList', 'type': '[str]'}, + 'file_path_list': {'key': 'filePathList', 'type': '[str]'}, + 'file_share_list': {'key': 'fileShareList', 'type': '[str]'}, + } + + def __init__( + self, + *, + file_prefix_list: Optional[List[str]] = None, + file_path_list: Optional[List[str]] = None, + file_share_list: Optional[List[str]] = None, + **kwargs + ): + super(AzureFileFilterDetails, self).__init__(**kwargs) + self.file_prefix_list = file_prefix_list + self.file_path_list = file_path_list + self.file_share_list = file_share_list + + +class BlobFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure Blobs. + + :param blob_prefix_list: Prefix list of the Azure blobs to be transferred. + :type blob_prefix_list: list[str] + :param blob_path_list: List of full path of the blobs to be transferred. + :type blob_path_list: list[str] + :param container_list: List of blob containers to be transferred. + :type container_list: list[str] + """ + + _attribute_map = { + 'blob_prefix_list': {'key': 'blobPrefixList', 'type': '[str]'}, + 'blob_path_list': {'key': 'blobPathList', 'type': '[str]'}, + 'container_list': {'key': 'containerList', 'type': '[str]'}, + } + + def __init__( + self, + *, + blob_prefix_list: Optional[List[str]] = None, + blob_path_list: Optional[List[str]] = None, + container_list: Optional[List[str]] = None, + **kwargs + ): + super(BlobFilterDetails, self).__init__(**kwargs) + self.blob_prefix_list = blob_prefix_list + self.blob_path_list = blob_path_list + self.container_list = container_list + + +class CancellationReason(msrest.serialization.Model): + """Reason for cancellation. + + All required parameters must be populated in order to send to Azure. + + :param reason: Required. Reason for cancellation. + :type reason: str + """ + + _validation = { + 'reason': {'required': True}, + } + + _attribute_map = { + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + *, + reason: str, + **kwargs + ): + super(CancellationReason, self).__init__(**kwargs) + self.reason = reason + + +class CloudError(msrest.serialization.Model): + """Cloud error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param code: Cloud error code. + :type code: str + :param message: Cloud error message. + :type message: str + :param target: Cloud error target. + :type target: str + :ivar details: Cloud error details. + :vartype details: list[~azure.mgmt.databox.v2021_05_01.models.CloudError] + :ivar additional_info: Cloud error additional info. + :vartype additional_info: list[~azure.mgmt.databox.v2021_05_01.models.AdditionalErrorInfo] + """ + + _validation = { + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudError]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[AdditionalErrorInfo]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + **kwargs + ): + super(CloudError, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = None + self.additional_info = None + + +class ContactDetails(msrest.serialization.Model): + """Contact Details. + + All required parameters must be populated in order to send to Azure. + + :param contact_name: Required. Contact name of the person. + :type contact_name: str + :param phone: Required. Phone number of the contact person. + :type phone: str + :param phone_extension: Phone extension number of the contact person. + :type phone_extension: str + :param mobile: Mobile number of the contact person. + :type mobile: str + :param email_list: Required. List of Email-ids to be notified about job progress. + :type email_list: list[str] + :param notification_preference: Notification preference for a job stage. + :type notification_preference: + list[~azure.mgmt.databox.v2021_05_01.models.NotificationPreference] + """ + + _validation = { + 'contact_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_name': {'key': 'contactName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'phone_extension': {'key': 'phoneExtension', 'type': 'str'}, + 'mobile': {'key': 'mobile', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + 'notification_preference': {'key': 'notificationPreference', 'type': '[NotificationPreference]'}, + } + + def __init__( + self, + *, + contact_name: str, + phone: str, + email_list: List[str], + phone_extension: Optional[str] = None, + mobile: Optional[str] = None, + notification_preference: Optional[List["NotificationPreference"]] = None, + **kwargs + ): + super(ContactDetails, self).__init__(**kwargs) + self.contact_name = contact_name + self.phone = phone + self.phone_extension = phone_extension + self.mobile = mobile + self.email_list = email_list + self.notification_preference = notification_preference + + +class CopyLogDetails(msrest.serialization.Model): + """Details for log generated during copy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxHeavyAccountCopyLogDetails. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'copy_log_details_type': {'DataBox': 'DataBoxAccountCopyLogDetails', 'DataBoxDisk': 'DataBoxDiskCopyLogDetails', 'DataBoxHeavy': 'DataBoxHeavyAccountCopyLogDetails'} + } + + def __init__( + self, + **kwargs + ): + super(CopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = None # type: Optional[str] + + +class CopyProgress(msrest.serialization.Model): + """Copy progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar storage_account_name: Name of the storage account. This will be empty for data account + types other than storage account. + :vartype storage_account_name: str + :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", + "ExportFromAzure". + :vartype transfer_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransferType + :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :ivar account_id: Id of the account where the data needs to be uploaded. + :vartype account_id: str + :ivar bytes_processed: To indicate bytes transferred. + :vartype bytes_processed: long + :ivar total_bytes_to_process: Total amount of data to be processed by the job. + :vartype total_bytes_to_process: long + :ivar files_processed: Number of files processed. + :vartype files_processed: long + :ivar total_files_to_process: Total files to process. + :vartype total_files_to_process: long + :ivar invalid_files_processed: Number of files not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype invalid_files_processed: long + :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to azure naming + conventions which were processed by automatic renaming. + :vartype invalid_file_bytes_uploaded: long + :ivar renamed_container_count: Number of folders not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype renamed_container_count: long + :ivar files_errored_out: Number of files which could not be copied. + :vartype files_errored_out: long + :ivar directories_errored_out: To indicate directories errored out in the job. + :vartype directories_errored_out: long + :ivar invalid_directories_processed: To indicate directories renamed. + :vartype invalid_directories_processed: long + :ivar is_enumeration_in_progress: To indicate if enumeration of data is in progress. + Until this is true, the TotalBytesToProcess may not be valid. + :vartype is_enumeration_in_progress: bool + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'transfer_type': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_processed': {'readonly': True}, + 'total_bytes_to_process': {'readonly': True}, + 'files_processed': {'readonly': True}, + 'total_files_to_process': {'readonly': True}, + 'invalid_files_processed': {'readonly': True}, + 'invalid_file_bytes_uploaded': {'readonly': True}, + 'renamed_container_count': {'readonly': True}, + 'files_errored_out': {'readonly': True}, + 'directories_errored_out': {'readonly': True}, + 'invalid_directories_processed': {'readonly': True}, + 'is_enumeration_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'bytes_processed': {'key': 'bytesProcessed', 'type': 'long'}, + 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, + 'files_processed': {'key': 'filesProcessed', 'type': 'long'}, + 'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'}, + 'invalid_files_processed': {'key': 'invalidFilesProcessed', 'type': 'long'}, + 'invalid_file_bytes_uploaded': {'key': 'invalidFileBytesUploaded', 'type': 'long'}, + 'renamed_container_count': {'key': 'renamedContainerCount', 'type': 'long'}, + 'files_errored_out': {'key': 'filesErroredOut', 'type': 'long'}, + 'directories_errored_out': {'key': 'directoriesErroredOut', 'type': 'long'}, + 'invalid_directories_processed': {'key': 'invalidDirectoriesProcessed', 'type': 'long'}, + 'is_enumeration_in_progress': {'key': 'isEnumerationInProgress', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CopyProgress, self).__init__(**kwargs) + self.storage_account_name = None + self.transfer_type = None + self.data_account_type = None + self.account_id = None + self.bytes_processed = None + self.total_bytes_to_process = None + self.files_processed = None + self.total_files_to_process = None + self.invalid_files_processed = None + self.invalid_file_bytes_uploaded = None + self.renamed_container_count = None + self.files_errored_out = None + self.directories_errored_out = None + self.invalid_directories_processed = None + self.is_enumeration_in_progress = None + + +class ValidationRequest(msrest.serialization.Model): + """Minimum request requirement of any validation category. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CreateJobValidations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_05_01.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + _subtype_map = { + 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} + } + + def __init__( + self, + *, + individual_request_details: List["ValidationInputRequest"], + **kwargs + ): + super(ValidationRequest, self).__init__(**kwargs) + self.validation_category = None # type: Optional[str] + self.individual_request_details = individual_request_details + + +class CreateJobValidations(ValidationRequest): + """It does all pre-job creation validations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_05_01.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + def __init__( + self, + *, + individual_request_details: List["ValidationInputRequest"], + **kwargs + ): + super(CreateJobValidations, self).__init__(individual_request_details=individual_request_details, **kwargs) + self.validation_category = 'JobCreationValidation' # type: str + + +class ValidationInputRequest(msrest.serialization.Model): + """Minimum fields that must be present in any type of validation request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ValidateAddress, CreateOrderLimitForSubscriptionValidationRequest, DataTransferDetailsValidationRequest, PreferencesValidationRequest, SkuAvailabilityValidationRequest, SubscriptionIsAllowedToCreateJobValidationRequest. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'ValidateAddress', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputRequest, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + + +class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): + """Request to validate create order limit for current subscription. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.device_type = device_type + + +class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInputResponse): + """Properties of create order limit for subscription validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar status: Create order limit validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.status = None + + +class DataAccountDetails(msrest.serialization.Model): + """Account details of the data to be transferred. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedDiskDetails, StorageAccountDetails. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + } + + _subtype_map = { + 'data_account_type': {'ManagedDisk': 'ManagedDiskDetails', 'StorageAccount': 'StorageAccountDetails'} + } + + def __init__( + self, + *, + share_password: Optional[str] = None, + **kwargs + ): + super(DataAccountDetails, self).__init__(**kwargs) + self.data_account_type = None # type: Optional[str] + self.share_password = share_password + + +class DataBoxAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account of a DataBox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: str + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when + LogCollectionLevel is set to Verbose. + :vartype copy_verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': 'str'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBox' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxDiskCopyLogDetails(CopyLogDetails): + """Copy Log Details for a disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar disk_serial_number: Disk Serial Number. + :vartype disk_serial_number: str + :ivar error_log_link: Link for copy error logs. + :vartype error_log_link: str + :ivar verbose_log_link: Link for copy verbose logs. + :vartype verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'disk_serial_number': {'readonly': True}, + 'error_log_link': {'readonly': True}, + 'verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'error_log_link': {'key': 'errorLogLink', 'type': 'str'}, + 'verbose_log_link': {'key': 'verboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxDisk' # type: str + self.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + + +class DataBoxDiskCopyProgress(msrest.serialization.Model): + """DataBox Disk Copy Progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar serial_number: The serial number of the disk. + :vartype serial_number: str + :ivar bytes_copied: Bytes copied during the copy of disk. + :vartype bytes_copied: long + :ivar percent_complete: Indicates the percentage completed for the copy of the disk. + :vartype percent_complete: int + :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", + "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", + "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.CopyStatus + """ + + _validation = { + 'serial_number': {'readonly': True}, + 'bytes_copied': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.bytes_copied = None + self.percent_complete = None + self.status = None + + +class JobDetails(msrest.serialization.Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxJobDetails, DataBoxDiskJobDetails, DataBoxHeavyJobDetails. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_05_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_05_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_05_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_05_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_05_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_05_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_05_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_05_01.models.LastMitigationActionOnJob + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + } + + _subtype_map = { + 'job_details_type': {'DataBox': 'DataBoxJobDetails', 'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails'} + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + **kwargs + ): + super(JobDetails, self).__init__(**kwargs) + self.job_stages = None + self.contact_details = contact_details + self.shipping_address = shipping_address + self.delivery_package = None + self.return_package = None + self.data_import_details = data_import_details + self.data_export_details = data_export_details + self.job_details_type = None # type: Optional[str] + self.preferences = preferences + self.copy_log_details = None + self.reverse_shipment_label_sas_key = None + self.chain_of_custody_sas_key = None + self.key_encryption_key = key_encryption_key + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes + self.actions = None + self.last_mitigation_action_on_job = None + + +class DataBoxDiskJobDetails(JobDetails): + """DataBox Disk Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_05_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_05_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_05_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_05_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_05_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_05_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_05_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_05_01.models.LastMitigationActionOnJob + :param preferred_disks: User preference on what size disks are needed for the job. The map is + from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but + will be checked against an int. + :type preferred_disks: dict[str, int] + :ivar copy_progress: Copy progress per disk. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_05_01.models.DataBoxDiskCopyProgress] + :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being + used for the job. Is returned only after the disks are shipped to the customer. + :vartype disks_and_size_details: dict[str, int] + :param passkey: User entered passkey for DataBox Disk job. + :type passkey: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + 'disks_and_size_details': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, + 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, + 'passkey': {'key': 'passkey', 'type': 'str'}, + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + preferred_disks: Optional[Dict[str, int]] = None, + passkey: Optional[str] = None, + **kwargs + ): + super(DataBoxDiskJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) + self.job_details_type = 'DataBoxDisk' # type: str + self.preferred_disks = preferred_disks + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = passkey + + +class JobSecrets(msrest.serialization.Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataboxJobSecrets, DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_05_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBox': 'DataboxJobSecrets', 'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets'} + } + + def __init__( + self, + **kwargs + ): + super(JobSecrets, self).__init__(**kwargs) + self.job_secrets_type = None # type: Optional[str] + self.dc_access_security_code = None + self.error = None + + +class DataBoxDiskJobSecrets(JobSecrets): + """The secrets related to disk job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_05_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.v2021_05_01.models.DiskSecret] + :ivar pass_key: PassKey for the disk Job. + :vartype pass_key: str + :ivar is_passkey_user_defined: Whether passkey was provided by user. + :vartype is_passkey_user_defined: bool + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'pass_key': {'key': 'passKey', 'type': 'str'}, + 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxDisk' # type: str + self.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + + +class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account for Databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type copy_log_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: list[str] + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when the + LogCollectionLevel is set to verbose. + :vartype copy_verbose_log_link: list[str] + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': '[str]'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxHeavy' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxHeavyJobDetails(JobDetails): + """Databox Heavy Device Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_05_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_05_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_05_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_05_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_05_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_05_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_05_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_05_01.models.LastMitigationActionOnJob + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_05_01.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox Heavy. Should not be passed + for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + device_password: Optional[str] = None, + **kwargs + ): + super(DataBoxHeavyJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) + self.job_details_type = 'DataBoxHeavy' # type: str + self.copy_progress = None + self.device_password = device_password + + +class DataBoxHeavyJobSecrets(JobSecrets): + """The secrets related to a databox heavy job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_05_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. + :vartype cabinet_pod_secrets: list[~azure.mgmt.databox.v2021_05_01.models.DataBoxHeavySecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxHeavy' # type: str + self.cabinet_pod_secrets = None + + +class DataBoxHeavySecret(msrest.serialization.Model): + """The secrets related to a databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_05_01.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_05_01.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavySecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DataBoxJobDetails(JobDetails): + """Databox Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_05_01.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_05_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_05_01.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_05_01.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_05_01.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_details_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_05_01.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_05_01.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_05_01.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_05_01.models.LastMitigationActionOnJob + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_05_01.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox. Should not be passed for + TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password + itself. This will not be returned in Get Call. Password Requirements : Password must be + minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, + one number and one special character. Password cannot have the following characters : IilLoO0 + Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + device_password: Optional[str] = None, + **kwargs + ): + super(DataBoxJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) + self.job_details_type = 'DataBox' # type: str + self.copy_progress = None + self.device_password = device_password + + +class DataboxJobSecrets(JobSecrets): + """The secrets related to a databox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type job_secrets_type: str or ~azure.mgmt.databox.v2021_05_01.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: ~azure.mgmt.databox.v2021_05_01.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.v2021_05_01.models.DataBoxSecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__( + self, + *, + pod_secrets: Optional[List["DataBoxSecret"]] = None, + **kwargs + ): + super(DataboxJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBox' # type: str + self.pod_secrets = pod_secrets + + +class ScheduleAvailabilityRequest(msrest.serialization.Model): + """Request body to get the availability for scheduling orders. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxScheduleAvailabilityRequest, DiskScheduleAvailabilityRequest, HeavyScheduleAvailabilityRequest. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + _subtype_map = { + 'sku_name': {'DataBox': 'DataBoxScheduleAvailabilityRequest', 'DataBoxDisk': 'DiskScheduleAvailabilityRequest', 'DataBoxHeavy': 'HeavyScheduleAvailabilityRequest'} + } + + def __init__( + self, + *, + storage_location: str, + country: Optional[str] = None, + **kwargs + ): + super(ScheduleAvailabilityRequest, self).__init__(**kwargs) + self.storage_location = storage_location + self.sku_name = None # type: Optional[str] + self.country = country + + +class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling data box orders orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_location: str, + country: Optional[str] = None, + **kwargs + ): + super(DataBoxScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBox' # type: str + + +class DataBoxSecret(msrest.serialization.Model): + """The secrets related to a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_05_01.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_05_01.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxSecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DataExportDetails(msrest.serialization.Model): + """Details of the data to be used for exporting data from azure. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration: Required. Configuration for the data transfer. + :type transfer_configuration: ~azure.mgmt.databox.v2021_05_01.models.TransferConfiguration + :param log_collection_level: Level of the logs to be collected. Possible values include: + "Error", "Verbose". Default value: "Error". + :type log_collection_level: str or ~azure.mgmt.databox.v2021_05_01.models.LogCollectionLevel + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_05_01.models.DataAccountDetails + """ + + _validation = { + 'transfer_configuration': {'required': True}, + 'account_details': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration': {'key': 'transferConfiguration', 'type': 'TransferConfiguration'}, + 'log_collection_level': {'key': 'logCollectionLevel', 'type': 'str'}, + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + *, + transfer_configuration: "TransferConfiguration", + account_details: "DataAccountDetails", + log_collection_level: Optional[Union[str, "LogCollectionLevel"]] = "Error", + **kwargs + ): + super(DataExportDetails, self).__init__(**kwargs) + self.transfer_configuration = transfer_configuration + self.log_collection_level = log_collection_level + self.account_details = account_details + + +class DataImportDetails(msrest.serialization.Model): + """Details of the data to be used for importing data to azure. + + All required parameters must be populated in order to send to Azure. + + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_05_01.models.DataAccountDetails + """ + + _validation = { + 'account_details': {'required': True}, + } + + _attribute_map = { + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + *, + account_details: "DataAccountDetails", + **kwargs + ): + super(DataImportDetails, self).__init__(**kwargs) + self.account_details = account_details + + +class DataLocationToServiceLocationMap(msrest.serialization.Model): + """Map of data location to service location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar data_location: Location of the data. + :vartype data_location: str + :ivar service_location: Location of the service. + :vartype service_location: str + """ + + _validation = { + 'data_location': {'readonly': True}, + 'service_location': {'readonly': True}, + } + + _attribute_map = { + 'data_location': {'key': 'dataLocation', 'type': 'str'}, + 'service_location': {'key': 'serviceLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataLocationToServiceLocationMap, self).__init__(**kwargs) + self.data_location = None + self.service_location = None + + +class DataTransferDetailsValidationRequest(ValidationInputRequest): + """Request to validate export and import data details. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :param data_export_details: List of DataTransfer details to be used to export data from azure. + :type data_export_details: list[~azure.mgmt.databox.v2021_05_01.models.DataExportDetails] + :param data_import_details: List of DataTransfer details to be used to import data to azure. + :type data_import_details: list[~azure.mgmt.databox.v2021_05_01.models.DataImportDetails] + :param device_type: Required. Device type. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransferType + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + transfer_type: Union[str, "TransferType"], + data_export_details: Optional[List["DataExportDetails"]] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + **kwargs + ): + super(DataTransferDetailsValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.data_export_details = data_export_details + self.data_import_details = data_import_details + self.device_type = device_type + self.transfer_type = transfer_type + + +class DataTransferDetailsValidationResponseProperties(ValidationInputResponse): + """Properties of data transfer details validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar status: Data transfer details validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTransferDetailsValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.status = None + + +class DcAccessSecurityCode(msrest.serialization.Model): + """Dc access security code. + + :param reverse_dc_access_code: Reverse Dc access security code. + :type reverse_dc_access_code: str + :param forward_dc_access_code: Forward Dc access security code. + :type forward_dc_access_code: str + """ + + _attribute_map = { + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, + } + + def __init__( + self, + *, + reverse_dc_access_code: Optional[str] = None, + forward_dc_access_code: Optional[str] = None, + **kwargs + ): + super(DcAccessSecurityCode, self).__init__(**kwargs) + self.reverse_dc_access_code = reverse_dc_access_code + self.forward_dc_access_code = forward_dc_access_code + + +class Details(msrest.serialization.Model): + """Details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: str, + message: str, + **kwargs + ): + super(Details, self).__init__(**kwargs) + self.code = code + self.message = message + + +class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling disk orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + } + + def __init__( + self, + *, + storage_location: str, + expected_data_size_in_tera_bytes: int, + country: Optional[str] = None, + **kwargs + ): + super(DiskScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBoxDisk' # type: str + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes + + +class DiskSecret(msrest.serialization.Model): + """Contains all the secrets of a Disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar disk_serial_number: Serial number of the assigned disk. + :vartype disk_serial_number: str + :ivar bit_locker_key: Bit Locker key of the disk which can be used to unlock the disk to copy + data. + :vartype bit_locker_key: str + """ + + _validation = { + 'disk_serial_number': {'readonly': True}, + 'bit_locker_key': {'readonly': True}, + } + + _attribute_map = { + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskSecret, self).__init__(**kwargs) + self.disk_serial_number = None + self.bit_locker_key = None + + +class EncryptionPreferences(msrest.serialization.Model): + """Preferences related to the Encryption. + + :param double_encryption: Defines secondary layer of software-based encryption enablement. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type double_encryption: str or ~azure.mgmt.databox.v2021_05_01.models.DoubleEncryption + """ + + _attribute_map = { + 'double_encryption': {'key': 'doubleEncryption', 'type': 'str'}, + } + + def __init__( + self, + *, + double_encryption: Optional[Union[str, "DoubleEncryption"]] = "Disabled", + **kwargs + ): + super(EncryptionPreferences, self).__init__(**kwargs) + self.double_encryption = double_encryption + + +class ErrorDetail(msrest.serialization.Model): + """ErrorDetail. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + :param details: + :type details: list[~azure.mgmt.databox.v2021_05_01.models.Details] + :param target: + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Details]'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + *, + code: str, + message: str, + details: Optional[List["Details"]] = None, + target: Optional[str] = None, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + self.target = target + + +class FilterFileDetails(msrest.serialization.Model): + """Details of the filter files to be used for data transfer. + + All required parameters must be populated in order to send to Azure. + + :param filter_file_type: Required. Type of the filter file. Possible values include: + "AzureBlob", "AzureFile". + :type filter_file_type: str or ~azure.mgmt.databox.v2021_05_01.models.FilterFileType + :param filter_file_path: Required. Path of the file that contains the details of all items to + transfer. + :type filter_file_path: str + """ + + _validation = { + 'filter_file_type': {'required': True}, + 'filter_file_path': {'required': True}, + } + + _attribute_map = { + 'filter_file_type': {'key': 'filterFileType', 'type': 'str'}, + 'filter_file_path': {'key': 'filterFilePath', 'type': 'str'}, + } + + def __init__( + self, + *, + filter_file_type: Union[str, "FilterFileType"], + filter_file_path: str, + **kwargs + ): + super(FilterFileDetails, self).__init__(**kwargs) + self.filter_file_type = filter_file_type + self.filter_file_path = filter_file_path + + +class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling heavy orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_location: str, + country: Optional[str] = None, + **kwargs + ): + super(HeavyScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBoxHeavy' # type: str + + +class IdentityProperties(msrest.serialization.Model): + """Managed identity properties. + + :param type: Managed service identity type. + :type type: str + :param user_assigned: User assigned identity properties. + :type user_assigned: ~azure.mgmt.databox.v2021_05_01.models.UserAssignedProperties + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned': {'key': 'userAssigned', 'type': 'UserAssignedProperties'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + user_assigned: Optional["UserAssignedProperties"] = None, + **kwargs + ): + super(IdentityProperties, self).__init__(**kwargs) + self.type = type + self.user_assigned = user_assigned + + +class JobDeliveryInfo(msrest.serialization.Model): + """Additional delivery info. + + :param scheduled_date_time: Scheduled date time. + :type scheduled_date_time: ~datetime.datetime + """ + + _attribute_map = { + 'scheduled_date_time': {'key': 'scheduledDateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + scheduled_date_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(JobDeliveryInfo, self).__init__(**kwargs) + self.scheduled_date_time = scheduled_date_time + + +class Resource(msrest.serialization.Model): + """Model of the Resource. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_05_01.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_05_01.models.ResourceIdentity + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + } + + def __init__( + self, + *, + location: str, + sku: "Sku", + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceIdentity"] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.sku = sku + self.identity = identity + + +class JobResource(Resource): + """Job Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_05_01.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_05_01.models.ResourceIdentity + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.databox.v2021_05_01.models.SystemData + :param transfer_type: Required. Type of the data transfer. Possible values include: + "ImportToAzure", "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransferType + :ivar is_cancellable: Describes whether the job is cancellable or not. + :vartype is_cancellable: bool + :ivar is_deletable: Describes whether the job is deletable or not. + :vartype is_deletable: bool + :ivar is_shipping_address_editable: Describes whether the shipping address is editable or not. + :vartype is_shipping_address_editable: bool + :ivar is_prepare_to_ship_enabled: Is Prepare To Ship Enabled on this job. + :vartype is_prepare_to_ship_enabled: bool + :ivar status: Name of the stage which is in progress. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :param details: Details of a job run. This field will only be sent for expand details filter. + :type details: ~azure.mgmt.databox.v2021_05_01.models.JobDetails + :ivar cancellation_reason: Reason for cancellation. + :vartype cancellation_reason: str + :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2021_05_01.models.JobDeliveryType + :param delivery_info: Delivery Info of Job. + :type delivery_info: ~azure.mgmt.databox.v2021_05_01.models.JobDeliveryInfo + :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. + :vartype is_cancellable_without_fee: bool + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'transfer_type': {'required': True}, + 'is_cancellable': {'readonly': True}, + 'is_deletable': {'readonly': True}, + 'is_shipping_address_editable': {'readonly': True}, + 'is_prepare_to_ship_enabled': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'error': {'readonly': True}, + 'cancellation_reason': {'readonly': True}, + 'is_cancellable_without_fee': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'transfer_type': {'key': 'properties.transferType', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, + 'is_shipping_address_editable': {'key': 'properties.isShippingAddressEditable', 'type': 'bool'}, + 'is_prepare_to_ship_enabled': {'key': 'properties.isPrepareToShipEnabled', 'type': 'bool'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'details': {'key': 'properties.details', 'type': 'JobDetails'}, + 'cancellation_reason': {'key': 'properties.cancellationReason', 'type': 'str'}, + 'delivery_type': {'key': 'properties.deliveryType', 'type': 'str'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, + 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, + } + + def __init__( + self, + *, + location: str, + sku: "Sku", + transfer_type: Union[str, "TransferType"], + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceIdentity"] = None, + details: Optional["JobDetails"] = None, + delivery_type: Optional[Union[str, "JobDeliveryType"]] = "NonScheduled", + delivery_info: Optional["JobDeliveryInfo"] = None, + **kwargs + ): + super(JobResource, self).__init__(location=location, tags=tags, sku=sku, identity=identity, **kwargs) + self.name = None + self.id = None + self.type = None + self.system_data = None + self.transfer_type = transfer_type + self.is_cancellable = None + self.is_deletable = None + self.is_shipping_address_editable = None + self.is_prepare_to_ship_enabled = None + self.status = None + self.start_time = None + self.error = None + self.details = details + self.cancellation_reason = None + self.delivery_type = delivery_type + self.delivery_info = delivery_info + self.is_cancellable_without_fee = None + + +class JobResourceList(msrest.serialization.Model): + """Job Resource Collection. + + :param value: List of job resources. + :type value: list[~azure.mgmt.databox.v2021_05_01.models.JobResource] + :param next_link: Link for the next set of job resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[JobResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["JobResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(JobResourceList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class JobResourceUpdateParameter(msrest.serialization.Model): + """The JobResourceUpdateParameter. + + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_05_01.models.ResourceIdentity + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.v2021_05_01.models.UpdateJobDetails + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceIdentity"] = None, + details: Optional["UpdateJobDetails"] = None, + **kwargs + ): + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.tags = tags + self.identity = identity + self.details = details + + +class JobStages(msrest.serialization.Model): + """Job stages. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar stage_name: Name of the job stage. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC". + :vartype stage_name: str or ~azure.mgmt.databox.v2021_05_01.models.StageName + :ivar display_name: Display name of the job stage. + :vartype display_name: str + :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", + "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors", + "WaitingForCustomerAction", "SucceededWithWarnings", "WaitingForCustomerActionForKek", + "WaitingForCustomerActionForCleanUp", "CustomerActionPerformedForCleanUp". + :vartype stage_status: str or ~azure.mgmt.databox.v2021_05_01.models.StageStatus + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: ~datetime.datetime + :ivar job_stage_details: Job Stage Details. + :vartype job_stage_details: any + """ + + _validation = { + 'stage_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'stage_status': {'readonly': True}, + 'stage_time': {'readonly': True}, + 'job_stage_details': {'readonly': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'str'}, + 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, + 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(JobStages, self).__init__(**kwargs) + self.stage_name = None + self.display_name = None + self.stage_status = None + self.stage_time = None + self.job_stage_details = None + + +class KeyEncryptionKey(msrest.serialization.Model): + """Encryption key containing details about key to encrypt different keys. + + All required parameters must be populated in order to send to Azure. + + :param kek_type: Required. Type of encryption key used for key encryption. Possible values + include: "MicrosoftManaged", "CustomerManaged". Default value: "MicrosoftManaged". + :type kek_type: str or ~azure.mgmt.databox.v2021_05_01.models.KekType + :param identity_properties: Managed identity properties used for key encryption. + :type identity_properties: ~azure.mgmt.databox.v2021_05_01.models.IdentityProperties + :param kek_url: Key encryption key. It is required in case of Customer managed KekType. + :type kek_url: str + :param kek_vault_resource_id: Kek vault resource id. It is required in case of Customer managed + KekType. + :type kek_vault_resource_id: str + """ + + _validation = { + 'kek_type': {'required': True}, + } + + _attribute_map = { + 'kek_type': {'key': 'kekType', 'type': 'str'}, + 'identity_properties': {'key': 'identityProperties', 'type': 'IdentityProperties'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'kek_vault_resource_id': {'key': 'kekVaultResourceID', 'type': 'str'}, + } + + def __init__( + self, + *, + kek_type: Union[str, "KekType"] = "MicrosoftManaged", + identity_properties: Optional["IdentityProperties"] = None, + kek_url: Optional[str] = None, + kek_vault_resource_id: Optional[str] = None, + **kwargs + ): + super(KeyEncryptionKey, self).__init__(**kwargs) + self.kek_type = kek_type + self.identity_properties = identity_properties + self.kek_url = kek_url + self.kek_vault_resource_id = kek_vault_resource_id + + +class LastMitigationActionOnJob(msrest.serialization.Model): + """Last Mitigation Action Performed On Job. + + :param action_date_time_in_utc: Action performed date time. + :type action_date_time_in_utc: ~datetime.datetime + :param is_performed_by_customer: Action performed by customer, + possibility is that mitigation might happen by customer or service or by ops. + :type is_performed_by_customer: bool + :param customer_resolution: Resolution code provided by customer. Possible values include: + "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution: str or ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode + """ + + _attribute_map = { + 'action_date_time_in_utc': {'key': 'actionDateTimeInUtc', 'type': 'iso-8601'}, + 'is_performed_by_customer': {'key': 'isPerformedByCustomer', 'type': 'bool'}, + 'customer_resolution': {'key': 'customerResolution', 'type': 'str'}, + } + + def __init__( + self, + *, + action_date_time_in_utc: Optional[datetime.datetime] = None, + is_performed_by_customer: Optional[bool] = None, + customer_resolution: Optional[Union[str, "CustomerResolutionCode"]] = None, + **kwargs + ): + super(LastMitigationActionOnJob, self).__init__(**kwargs) + self.action_date_time_in_utc = action_date_time_in_utc + self.is_performed_by_customer = is_performed_by_customer + self.customer_resolution = customer_resolution + + +class ManagedDiskDetails(DataAccountDetails): + """Details of the managed disks. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param resource_group_id: Required. Resource Group Id of the compute disks. + :type resource_group_id: str + :param staging_storage_account_id: Required. Resource Id of the storage account that can be + used to copy the vhd for staging. + :type staging_storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'resource_group_id': {'required': True}, + 'staging_storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + 'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_group_id: str, + staging_storage_account_id: str, + share_password: Optional[str] = None, + **kwargs + ): + super(ManagedDiskDetails, self).__init__(share_password=share_password, **kwargs) + self.data_account_type = 'ManagedDisk' # type: str + self.resource_group_id = resource_group_id + self.staging_storage_account_id = staging_storage_account_id + + +class MitigateJobRequest(msrest.serialization.Model): + """The Mitigate Job captured from request body for Mitigate API. + + All required parameters must be populated in order to send to Azure. + + :param customer_resolution_code: Required. Resolution code for the job. Possible values + include: "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution_code: str or + ~azure.mgmt.databox.v2021_05_01.models.CustomerResolutionCode + """ + + _validation = { + 'customer_resolution_code': {'required': True}, + } + + _attribute_map = { + 'customer_resolution_code': {'key': 'customerResolutionCode', 'type': 'str'}, + } + + def __init__( + self, + *, + customer_resolution_code: Union[str, "CustomerResolutionCode"], + **kwargs + ): + super(MitigateJobRequest, self).__init__(**kwargs) + self.customer_resolution_code = customer_resolution_code + + +class NotificationPreference(msrest.serialization.Model): + """Notification preference for a job stage. + + All required parameters must be populated in order to send to Azure. + + :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", + "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy". + :type stage_name: str or ~azure.mgmt.databox.v2021_05_01.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__( + self, + *, + stage_name: Union[str, "NotificationStageName"], + send_notification: bool = True, + **kwargs + ): + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = stage_name + self.send_notification = send_notification + + +class Operation(msrest.serialization.Model): + """Operation entity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the operation. Format: + {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. + :vartype name: str + :ivar display: Operation display values. + :vartype display: ~azure.mgmt.databox.v2021_05_01.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: any + :ivar origin: Origin of the operation. Can be : user|system|user,system. + :vartype origin: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'properties': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + *, + is_data_action: Optional[bool] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.properties = None + self.origin = None + self.is_data_action = is_data_action + + +class OperationDisplay(msrest.serialization.Model): + """Operation display. + + :param provider: Provider name. + :type provider: str + :param resource: Resource name. + :type resource: str + :param operation: Localized name of the operation for display purpose. + :type operation: str + :param description: Localized description of the operation for display purpose. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationList(msrest.serialization.Model): + """Operation Collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations. + :vartype value: list[~azure.mgmt.databox.v2021_05_01.models.Operation] + :param next_link: Link for the next set of operations. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(OperationList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class PackageShippingDetails(msrest.serialization.Model): + """Shipping details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar carrier_name: Name of the carrier. + :vartype carrier_name: str + :ivar tracking_id: Tracking Id of shipment. + :vartype tracking_id: str + :ivar tracking_url: Url where shipment can be tracked. + :vartype tracking_url: str + """ + + _validation = { + 'carrier_name': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'tracking_url': {'readonly': True}, + } + + _attribute_map = { + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PackageShippingDetails, self).__init__(**kwargs) + self.carrier_name = None + self.tracking_id = None + self.tracking_url = None + + +class Preferences(msrest.serialization.Model): + """Preferences related to the order. + + :param preferred_data_center_region: Preferred data center region. + :type preferred_data_center_region: list[str] + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.v2021_05_01.models.TransportPreferences + :param encryption_preferences: Preferences related to the Encryption. + :type encryption_preferences: ~azure.mgmt.databox.v2021_05_01.models.EncryptionPreferences + """ + + _attribute_map = { + 'preferred_data_center_region': {'key': 'preferredDataCenterRegion', 'type': '[str]'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + 'encryption_preferences': {'key': 'encryptionPreferences', 'type': 'EncryptionPreferences'}, + } + + def __init__( + self, + *, + preferred_data_center_region: Optional[List[str]] = None, + transport_preferences: Optional["TransportPreferences"] = None, + encryption_preferences: Optional["EncryptionPreferences"] = None, + **kwargs + ): + super(Preferences, self).__init__(**kwargs) + self.preferred_data_center_region = preferred_data_center_region + self.transport_preferences = transport_preferences + self.encryption_preferences = encryption_preferences + + +class PreferencesValidationRequest(ValidationInputRequest): + """Request to validate preference of transport and data center. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :param preference: Preference of transport and data center. + :type preference: ~azure.mgmt.databox.v2021_05_01.models.Preferences + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'preference': {'key': 'preference', 'type': 'Preferences'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + preference: Optional["Preferences"] = None, + **kwargs + ): + super(PreferencesValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.preference = preference + self.device_type = device_type + + +class PreferencesValidationResponseProperties(ValidationInputResponse): + """Properties of data center and transport preference validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar status: Validation status of requested data center and transport. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.status = None + + +class RegionConfigurationRequest(msrest.serialization.Model): + """Request body to get the configuration for the region. + + :param schedule_availability_request: Request body to get the availability for scheduling + orders. + :type schedule_availability_request: + ~azure.mgmt.databox.v2021_05_01.models.ScheduleAvailabilityRequest + :param transport_availability_request: Request body to get the transport availability for given + sku. + :type transport_availability_request: + ~azure.mgmt.databox.v2021_05_01.models.TransportAvailabilityRequest + """ + + _attribute_map = { + 'schedule_availability_request': {'key': 'scheduleAvailabilityRequest', 'type': 'ScheduleAvailabilityRequest'}, + 'transport_availability_request': {'key': 'transportAvailabilityRequest', 'type': 'TransportAvailabilityRequest'}, + } + + def __init__( + self, + *, + schedule_availability_request: Optional["ScheduleAvailabilityRequest"] = None, + transport_availability_request: Optional["TransportAvailabilityRequest"] = None, + **kwargs + ): + super(RegionConfigurationRequest, self).__init__(**kwargs) + self.schedule_availability_request = schedule_availability_request + self.transport_availability_request = transport_availability_request + + +class RegionConfigurationResponse(msrest.serialization.Model): + """Configuration response specific to a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar schedule_availability_response: Schedule availability for given sku in a region. + :vartype schedule_availability_response: + ~azure.mgmt.databox.v2021_05_01.models.ScheduleAvailabilityResponse + :ivar transport_availability_response: Transport options available for given sku in a region. + :vartype transport_availability_response: + ~azure.mgmt.databox.v2021_05_01.models.TransportAvailabilityResponse + """ + + _validation = { + 'schedule_availability_response': {'readonly': True}, + 'transport_availability_response': {'readonly': True}, + } + + _attribute_map = { + 'schedule_availability_response': {'key': 'scheduleAvailabilityResponse', 'type': 'ScheduleAvailabilityResponse'}, + 'transport_availability_response': {'key': 'transportAvailabilityResponse', 'type': 'TransportAvailabilityResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(RegionConfigurationResponse, self).__init__(**kwargs) + self.schedule_availability_response = None + self.transport_availability_response = None + + +class ResourceIdentity(msrest.serialization.Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: Identity type. + :type type: str + :ivar principal_id: Service Principal Id backing the Msi. + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id. + :vartype tenant_id: str + :param user_assigned_identities: User Assigned Identities. + :type user_assigned_identities: dict[str, + ~azure.mgmt.databox.v2021_05_01.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + *, + type: Optional[str] = "None", + user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None, + **kwargs + ): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = None + self.tenant_id = None + self.user_assigned_identities = user_assigned_identities + + +class ScheduleAvailabilityResponse(msrest.serialization.Model): + """Schedule availability for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar available_dates: List of dates available to schedule. + :vartype available_dates: list[~datetime.datetime] + """ + + _validation = { + 'available_dates': {'readonly': True}, + } + + _attribute_map = { + 'available_dates': {'key': 'availableDates', 'type': '[iso-8601]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduleAvailabilityResponse, self).__init__(**kwargs) + self.available_dates = None + + +class ShareCredentialDetails(msrest.serialization.Model): + """Credential details of the shares in account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar share_name: Name of the share. + :vartype share_name: str + :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", + "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". + :vartype share_type: str or ~azure.mgmt.databox.v2021_05_01.models.ShareDestinationFormatType + :ivar user_name: User name for the share. + :vartype user_name: str + :ivar password: Password for the share. + :vartype password: str + :ivar supported_access_protocols: Access protocols supported on the device. + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2021_05_01.models.AccessProtocol] + """ + + _validation = { + 'share_name': {'readonly': True}, + 'share_type': {'readonly': True}, + 'user_name': {'readonly': True}, + 'password': {'readonly': True}, + 'supported_access_protocols': {'readonly': True}, + } + + _attribute_map = { + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'share_type': {'key': 'shareType', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareCredentialDetails, self).__init__(**kwargs) + self.share_name = None + self.share_type = None + self.user_name = None + self.password = None + self.supported_access_protocols = None + + +class ShipmentPickUpRequest(msrest.serialization.Model): + """Shipment pick up request details. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. Minimum date after which the pick up should commence, this must be + in local time of pick up area. + :type start_time: ~datetime.datetime + :param end_time: Required. Maximum date before which the pick up should commence, this must be + in local time of pick up area. + :type end_time: ~datetime.datetime + :param shipment_location: Required. Shipment Location in the pickup place. Eg.front desk. + :type shipment_location: str + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + 'shipment_location': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'shipment_location': {'key': 'shipmentLocation', 'type': 'str'}, + } + + def __init__( + self, + *, + start_time: datetime.datetime, + end_time: datetime.datetime, + shipment_location: str, + **kwargs + ): + super(ShipmentPickUpRequest, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.shipment_location = shipment_location + + +class ShipmentPickUpResponse(msrest.serialization.Model): + """Shipment pick up response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar confirmation_number: Confirmation number for the pick up request. + :vartype confirmation_number: str + :ivar ready_by_time: Time by which shipment should be ready for pick up, this is in local time + of pick up area. + :vartype ready_by_time: ~datetime.datetime + """ + + _validation = { + 'confirmation_number': {'readonly': True}, + 'ready_by_time': {'readonly': True}, + } + + _attribute_map = { + 'confirmation_number': {'key': 'confirmationNumber', 'type': 'str'}, + 'ready_by_time': {'key': 'readyByTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ShipmentPickUpResponse, self).__init__(**kwargs) + self.confirmation_number = None + self.ready_by_time = None + + +class ShippingAddress(msrest.serialization.Model): + """Shipping address where customer wishes to receive the device. + + All required parameters must be populated in order to send to Azure. + + :param street_address1: Required. Street Address line 1. + :type street_address1: str + :param street_address2: Street Address line 2. + :type street_address2: str + :param street_address3: Street Address line 3. + :type street_address3: str + :param city: Name of the City. + :type city: str + :param state_or_province: Name of the State or Province. + :type state_or_province: str + :param country: Required. Name of the Country. + :type country: str + :param postal_code: Postal code. + :type postal_code: str + :param zip_extended_code: Extended Zip Code. + :type zip_extended_code: str + :param company_name: Name of the company. + :type company_name: str + :param address_type: Type of address. Possible values include: "None", "Residential", + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2021_05_01.models.AddressType + """ + + _validation = { + 'street_address1': {'required': True}, + 'country': {'required': True}, + } + + _attribute_map = { + 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, + 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, + 'street_address3': {'key': 'streetAddress3', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'zip_extended_code': {'key': 'zipExtendedCode', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'address_type': {'key': 'addressType', 'type': 'str'}, + } + + def __init__( + self, + *, + street_address1: str, + country: str, + street_address2: Optional[str] = None, + street_address3: Optional[str] = None, + city: Optional[str] = None, + state_or_province: Optional[str] = None, + postal_code: Optional[str] = None, + zip_extended_code: Optional[str] = None, + company_name: Optional[str] = None, + address_type: Optional[Union[str, "AddressType"]] = "None", + **kwargs + ): + super(ShippingAddress, self).__init__(**kwargs) + self.street_address1 = street_address1 + self.street_address2 = street_address2 + self.street_address3 = street_address3 + self.city = city + self.state_or_province = state_or_province + self.country = country + self.postal_code = postal_code + self.zip_extended_code = zip_extended_code + self.company_name = company_name + self.address_type = address_type + + +class Sku(msrest.serialization.Model): + """The Sku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param display_name: The display name of the sku. + :type display_name: str + :param family: The sku family. + :type family: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Union[str, "SkuName"], + display_name: Optional[str] = None, + family: Optional[str] = None, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.family = family + + +class SkuAvailabilityValidationRequest(ValidationInputRequest): + """Request to validate sku availability. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + transfer_type: Union[str, "TransferType"], + country: str, + location: str, + **kwargs + ): + super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.device_type = device_type + self.transfer_type = transfer_type + self.country = country + self.location = location + + +class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): + """Properties of sku availability validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", + "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.status = None + + +class SkuCapacity(msrest.serialization.Model): + """Capacity of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar usable: Usable capacity in TB. + :vartype usable: str + :ivar maximum: Maximum capacity in TB. + :vartype maximum: str + """ + + _validation = { + 'usable': {'readonly': True}, + 'maximum': {'readonly': True}, + } + + _attribute_map = { + 'usable': {'key': 'usable', 'type': 'str'}, + 'maximum': {'key': 'maximum', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.usable = None + self.maximum = None + + +class SkuCost(msrest.serialization.Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar meter_id: Meter id of the Sku. + :vartype meter_id: str + :ivar meter_type: The type of the meter. + :vartype meter_type: str + :ivar multiplier: Multiplier specifies the region specific value to be multiplied with 1$ guid. + Eg: Our new regions will be using 1$ shipping guid with appropriate multiplier specific to + region. + :vartype multiplier: float + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'meter_type': {'readonly': True}, + 'multiplier': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_type': {'key': 'meterType', 'type': 'str'}, + 'multiplier': {'key': 'multiplier', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.meter_type = None + self.multiplier = None + + +class SkuInformation(msrest.serialization.Model): + """Information of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.databox.v2021_05_01.models.Sku + :ivar enabled: The sku is enabled or not. + :vartype enabled: bool + :ivar data_location_to_service_location_map: The map of data location to service location. + :vartype data_location_to_service_location_map: + list[~azure.mgmt.databox.v2021_05_01.models.DataLocationToServiceLocationMap] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.v2021_05_01.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.v2021_05_01.models.SkuCost] + :ivar api_versions: Api versions that support this Sku. + :vartype api_versions: list[str] + :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", + "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". + :vartype disabled_reason: str or ~azure.mgmt.databox.v2021_05_01.models.SkuDisabledReason + :ivar disabled_reason_message: Message for why the Sku is disabled. + :vartype disabled_reason_message: str + :ivar required_feature: Required feature to access the sku. + :vartype required_feature: str + """ + + _validation = { + 'sku': {'readonly': True}, + 'enabled': {'readonly': True}, + 'data_location_to_service_location_map': {'readonly': True}, + 'capacity': {'readonly': True}, + 'costs': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'disabled_reason': {'readonly': True}, + 'disabled_reason_message': {'readonly': True}, + 'required_feature': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'data_location_to_service_location_map': {'key': 'properties.dataLocationToServiceLocationMap', 'type': '[DataLocationToServiceLocationMap]'}, + 'capacity': {'key': 'properties.capacity', 'type': 'SkuCapacity'}, + 'costs': {'key': 'properties.costs', 'type': '[SkuCost]'}, + 'api_versions': {'key': 'properties.apiVersions', 'type': '[str]'}, + 'disabled_reason': {'key': 'properties.disabledReason', 'type': 'str'}, + 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, + 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuInformation, self).__init__(**kwargs) + self.sku = None + self.enabled = None + self.data_location_to_service_location_map = None + self.capacity = None + self.costs = None + self.api_versions = None + self.disabled_reason = None + self.disabled_reason_message = None + self.required_feature = None + + +class StorageAccountDetails(DataAccountDetails): + """Details for the storage account. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param storage_account_id: Required. Storage Account Resource Id. + :type storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_account_id: str, + share_password: Optional[str] = None, + **kwargs + ): + super(StorageAccountDetails, self).__init__(share_password=share_password, **kwargs) + self.data_account_type = 'StorageAccount' # type: str + self.storage_account_id = storage_account_id + + +class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): + """Request to validate subscription permission to create jobs. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + + +class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInputResponse): + """Properties of subscription permission to create job validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_05_01.models.CloudError + :ivar status: Validation status of subscription permission to create job. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + self.status = None + + +class SystemData(msrest.serialization.Model): + """Provides details about resource creation and update time. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_by: A string identifier for the identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource: user, application, + managedIdentity. + :vartype created_by_type: str + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: A string identifier for the identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource: user, + application, managedIdentity. + :vartype last_modified_by_type: str + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _validation = { + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + } + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = None + self.created_by_type = None + self.created_at = None + self.last_modified_by = None + self.last_modified_by_type = None + self.last_modified_at = None + + +class TransferAllDetails(msrest.serialization.Model): + """Details to transfer all data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :param transfer_all_blobs: To indicate if all Azure blobs have to be transferred. + :type transfer_all_blobs: bool + :param transfer_all_files: To indicate if all Azure Files have to be transferred. + :type transfer_all_files: bool + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'transfer_all_blobs': {'key': 'transferAllBlobs', 'type': 'bool'}, + 'transfer_all_files': {'key': 'transferAllFiles', 'type': 'bool'}, + } + + def __init__( + self, + *, + data_account_type: Union[str, "DataAccountType"], + transfer_all_blobs: Optional[bool] = None, + transfer_all_files: Optional[bool] = None, + **kwargs + ): + super(TransferAllDetails, self).__init__(**kwargs) + self.data_account_type = data_account_type + self.transfer_all_blobs = transfer_all_blobs + self.transfer_all_files = transfer_all_files + + +class TransferConfiguration(msrest.serialization.Model): + """Configuration for defining the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration_type: Required. Type of the configuration for transfer. Possible + values include: "TransferAll", "TransferUsingFilter". + :type transfer_configuration_type: str or + ~azure.mgmt.databox.v2021_05_01.models.TransferConfigurationType + :param transfer_filter_details: Map of filter type and the details to filter. This field is + required only if the TransferConfigurationType is given as TransferUsingFilter. + :type transfer_filter_details: + ~azure.mgmt.databox.v2021_05_01.models.TransferConfigurationTransferFilterDetails + :param transfer_all_details: Map of filter type and the details to transfer all data. This + field is required only if the TransferConfigurationType is given as TransferAll. + :type transfer_all_details: + ~azure.mgmt.databox.v2021_05_01.models.TransferConfigurationTransferAllDetails + """ + + _validation = { + 'transfer_configuration_type': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration_type': {'key': 'transferConfigurationType', 'type': 'str'}, + 'transfer_filter_details': {'key': 'transferFilterDetails', 'type': 'TransferConfigurationTransferFilterDetails'}, + 'transfer_all_details': {'key': 'transferAllDetails', 'type': 'TransferConfigurationTransferAllDetails'}, + } + + def __init__( + self, + *, + transfer_configuration_type: Union[str, "TransferConfigurationType"], + transfer_filter_details: Optional["TransferConfigurationTransferFilterDetails"] = None, + transfer_all_details: Optional["TransferConfigurationTransferAllDetails"] = None, + **kwargs + ): + super(TransferConfiguration, self).__init__(**kwargs) + self.transfer_configuration_type = transfer_configuration_type + self.transfer_filter_details = transfer_filter_details + self.transfer_all_details = transfer_all_details + + +class TransferConfigurationTransferAllDetails(msrest.serialization.Model): + """Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. + + :param include: Details to transfer all data. + :type include: ~azure.mgmt.databox.v2021_05_01.models.TransferAllDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferAllDetails'}, + } + + def __init__( + self, + *, + include: Optional["TransferAllDetails"] = None, + **kwargs + ): + super(TransferConfigurationTransferAllDetails, self).__init__(**kwargs) + self.include = include + + +class TransferConfigurationTransferFilterDetails(msrest.serialization.Model): + """Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. + + :param include: Details of the filtering the transfer of data. + :type include: ~azure.mgmt.databox.v2021_05_01.models.TransferFilterDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferFilterDetails'}, + } + + def __init__( + self, + *, + include: Optional["TransferFilterDetails"] = None, + **kwargs + ): + super(TransferConfigurationTransferFilterDetails, self).__init__(**kwargs) + self.include = include + + +class TransferFilterDetails(msrest.serialization.Model): + """Details of the filtering the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_05_01.models.DataAccountType + :param blob_filter_details: Filter details to transfer blobs. + :type blob_filter_details: ~azure.mgmt.databox.v2021_05_01.models.BlobFilterDetails + :param azure_file_filter_details: Filter details to transfer Azure files. + :type azure_file_filter_details: ~azure.mgmt.databox.v2021_05_01.models.AzureFileFilterDetails + :param filter_file_details: Details of the filter files to be used for data transfer. + :type filter_file_details: list[~azure.mgmt.databox.v2021_05_01.models.FilterFileDetails] + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'blob_filter_details': {'key': 'blobFilterDetails', 'type': 'BlobFilterDetails'}, + 'azure_file_filter_details': {'key': 'azureFileFilterDetails', 'type': 'AzureFileFilterDetails'}, + 'filter_file_details': {'key': 'filterFileDetails', 'type': '[FilterFileDetails]'}, + } + + def __init__( + self, + *, + data_account_type: Union[str, "DataAccountType"], + blob_filter_details: Optional["BlobFilterDetails"] = None, + azure_file_filter_details: Optional["AzureFileFilterDetails"] = None, + filter_file_details: Optional[List["FilterFileDetails"]] = None, + **kwargs + ): + super(TransferFilterDetails, self).__init__(**kwargs) + self.data_account_type = data_account_type + self.blob_filter_details = blob_filter_details + self.azure_file_filter_details = azure_file_filter_details + self.filter_file_details = filter_file_details + + +class TransportAvailabilityDetails(msrest.serialization.Model): + """Transport options availability details for given region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar shipment_type: Transport Shipment Type supported for given region. Possible values + include: "CustomerManaged", "MicrosoftManaged". + :vartype shipment_type: str or ~azure.mgmt.databox.v2021_05_01.models.TransportShipmentTypes + """ + + _validation = { + 'shipment_type': {'readonly': True}, + } + + _attribute_map = { + 'shipment_type': {'key': 'shipmentType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityDetails, self).__init__(**kwargs) + self.shipment_type = None + + +class TransportAvailabilityRequest(msrest.serialization.Model): + """Request body to get the transport availability for given sku. + + :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy". + :type sku_name: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + """ + + _attribute_map = { + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__( + self, + *, + sku_name: Optional[Union[str, "SkuName"]] = None, + **kwargs + ): + super(TransportAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = sku_name + + +class TransportAvailabilityResponse(msrest.serialization.Model): + """Transport options available for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar transport_availability_details: List of transport availability details for given region. + :vartype transport_availability_details: + list[~azure.mgmt.databox.v2021_05_01.models.TransportAvailabilityDetails] + """ + + _validation = { + 'transport_availability_details': {'readonly': True}, + } + + _attribute_map = { + 'transport_availability_details': {'key': 'transportAvailabilityDetails', 'type': '[TransportAvailabilityDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityResponse, self).__init__(**kwargs) + self.transport_availability_details = None + + +class TransportPreferences(msrest.serialization.Model): + """Preferences related to the shipment logistics of the sku. + + All required parameters must be populated in order to send to Azure. + + :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2021_05_01.models.TransportShipmentTypes + """ + + _validation = { + 'preferred_shipment_type': {'required': True}, + } + + _attribute_map = { + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'str'}, + } + + def __init__( + self, + *, + preferred_shipment_type: Union[str, "TransportShipmentTypes"], + **kwargs + ): + super(TransportPreferences, self).__init__(**kwargs) + self.preferred_shipment_type = preferred_shipment_type + + +class UnencryptedCredentials(msrest.serialization.Model): + """Unencrypted credentials for accessing device. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar job_name: Name of the job. + :vartype job_name: str + :ivar job_secrets: Secrets related to this job. + :vartype job_secrets: ~azure.mgmt.databox.v2021_05_01.models.JobSecrets + """ + + _validation = { + 'job_name': {'readonly': True}, + 'job_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'job_secrets': {'key': 'jobSecrets', 'type': 'JobSecrets'}, + } + + def __init__( + self, + **kwargs + ): + super(UnencryptedCredentials, self).__init__(**kwargs) + self.job_name = None + self.job_secrets = None + + +class UnencryptedCredentialsList(msrest.serialization.Model): + """List of unencrypted credentials for accessing device. + + :param value: List of unencrypted credentials. + :type value: list[~azure.mgmt.databox.v2021_05_01.models.UnencryptedCredentials] + :param next_link: Link for the next set of unencrypted credentials. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UnencryptedCredentials]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["UnencryptedCredentials"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(UnencryptedCredentialsList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class UpdateJobDetails(msrest.serialization.Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_05_01.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :param key_encryption_key: Key encryption key for the job. + :type key_encryption_key: ~azure.mgmt.databox.v2021_05_01.models.KeyEncryptionKey + """ + + _attribute_map = { + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + } + + def __init__( + self, + *, + contact_details: Optional["ContactDetails"] = None, + shipping_address: Optional["ShippingAddress"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + **kwargs + ): + super(UpdateJobDetails, self).__init__(**kwargs) + self.contact_details = contact_details + self.shipping_address = shipping_address + self.key_encryption_key = key_encryption_key + + +class UserAssignedIdentity(msrest.serialization.Model): + """Class defining User assigned identity details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedProperties(msrest.serialization.Model): + """User assigned identity properties. + + :param resource_id: Arm resource id for user assigned identity to be used to fetch MSI token. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + **kwargs + ): + super(UserAssignedProperties, self).__init__(**kwargs) + self.resource_id = resource_id + + +class ValidateAddress(ValidationInputRequest): + """The requirements to validate customer address where the device needs to be shipped. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_05_01.models.ValidationInputDiscriminator + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_05_01.models.ShippingAddress + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy". + :type device_type: str or ~azure.mgmt.databox.v2021_05_01.models.SkuName + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: ~azure.mgmt.databox.v2021_05_01.models.TransportPreferences + """ + + _validation = { + 'validation_type': {'required': True}, + 'shipping_address': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__( + self, + *, + shipping_address: "ShippingAddress", + device_type: Union[str, "SkuName"], + transport_preferences: Optional["TransportPreferences"] = None, + **kwargs + ): + super(ValidateAddress, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.shipping_address = shipping_address + self.device_type = device_type + self.transport_preferences = transport_preferences + + +class ValidationResponse(msrest.serialization.Model): + """Response of pre job creation validations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Overall validation status. Possible values include: "AllValidToProceed", + "InputsRevisitRequired", "CertainInputValidationsSkipped". + :vartype status: str or ~azure.mgmt.databox.v2021_05_01.models.OverallValidationStatus + :ivar individual_response_details: List of response details contain validationType and its + response as key and value respectively. + :vartype individual_response_details: + list[~azure.mgmt.databox.v2021_05_01.models.ValidationInputResponse] + """ + + _validation = { + 'status': {'readonly': True}, + 'individual_response_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'individual_response_details': {'key': 'properties.individualResponseDetails', 'type': '[ValidationInputResponse]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidationResponse, self).__init__(**kwargs) + self.status = None + self.individual_response_details = None diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/__init__.py new file mode 100644 index 0000000000000..bd13cc67afb6e --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/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 ._operations import Operations +from ._jobs_operations import JobsOperations +from ._data_box_management_client_operations import DataBoxManagementClientOperationsMixin +from ._service_operations import ServiceOperations + +__all__ = [ + 'Operations', + 'JobsOperations', + 'DataBoxManagementClientOperationsMixin', + 'ServiceOperations', +] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_data_box_management_client_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_data_box_management_client_operations.py new file mode 100644 index 0000000000000..07df3690cb94d --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_data_box_management_client_operations.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +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 HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +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]] + +class DataBoxManagementClientOperationsMixin(object): + + def mitigate( + self, + job_name, # type: str + resource_group_name, # type: str + mitigate_job_request, # type: "_models.MitigateJobRequest" + **kwargs # type: Any + ): + # type: (...) -> None + """Request to mitigate for a given job. + + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param mitigate_job_request: Mitigation Request. + :type mitigate_job_request: ~azure.mgmt.databox.v2021_05_01.models.MitigateJobRequest + :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', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.mitigate.metadata['url'] # type: ignore + path_format_arguments = { + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(mitigate_job_request, 'MitigateJobRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + mitigate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_jobs_operations.py new file mode 100644 index 0000000000000..45545bb7c6bbc --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_jobs_operations.py @@ -0,0 +1,860 @@ +# 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 +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations(object): + """JobsOperations 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.databox.v2021_05_01.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 + + def list( + self, + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobResourceList"] + """Lists all the jobs available under the subscription. + + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_05_01.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobResourceList"] + """Lists all the jobs available under the given resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_05_01.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def get( + self, + resource_group_name, # type: str + job_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.JobResource" + """Gets information about the specified job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param expand: $expand is supported on details parameter for job, which provides details on the + job stages. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobResource, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource, # type: "_models.JobResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.JobResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource, 'JobResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource, # type: "_models.JobResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.JobResource"] + """Creates a new job with the specified parameters. Existing job cannot be updated with this API + and should instead be updated with the Update job API. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource: Job details from request body. + :type job_resource: ~azure.mgmt.databox.v2021_05_01.models.JobResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2021_05_01.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource_update_parameter, # type: "_models.JobResourceUpdateParameter" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.JobResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource_update_parameter, # type: "_models.JobResourceUpdateParameter" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.JobResource"] + """Updates the properties of an existing job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource_update_parameter: Job update parameters from request body. + :type job_resource_update_parameter: ~azure.mgmt.databox.v2021_05_01.models.JobResourceUpdateParameter + :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag + of the job on the server matches this value. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2021_05_01.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource_update_parameter=job_resource_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def book_shipment_pick_up( + self, + resource_group_name, # type: str + job_name, # type: str + shipment_pick_up_request, # type: "_models.ShipmentPickUpRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ShipmentPickUpResponse" + """Book shipment pick up. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param shipment_pick_up_request: Details of shipment pick up request. + :type shipment_pick_up_request: ~azure.mgmt.databox.v2021_05_01.models.ShipmentPickUpRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShipmentPickUpResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.ShipmentPickUpResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} # type: ignore + + def cancel( + self, + resource_group_name, # type: str + job_name, # type: str + cancellation_reason, # type: "_models.CancellationReason" + **kwargs # type: Any + ): + # type: (...) -> None + """CancelJob. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.databox.v2021_05_01.models.CancellationReason + :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', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} # type: ignore + + def list_credentials( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.UnencryptedCredentialsList"] + """This method gets the unencrypted secrets related to the job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_05_01.models.UnencryptedCredentialsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('UnencryptedCredentialsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_operations.py new file mode 100644 index 0000000000000..8b2896272589f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_operations.py @@ -0,0 +1,110 @@ +# 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 +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations 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.databox.v2021_05_01.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 + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationList"] + """This method gets all the operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_05_01.models.OperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_service_operations.py new file mode 100644 index 0000000000000..8332018aa3a5b --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/operations/_service_operations.py @@ -0,0 +1,466 @@ +# 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 +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServiceOperations(object): + """ServiceOperations 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.databox.v2021_05_01.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 + + def list_available_skus_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + available_sku_request, # type: "_models.AvailableSkuRequest" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AvailableSkusResult"] + """This method provides the list of available skus for the given subscription, resource group and + location. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param available_sku_request: Filters for showing the available skus. + :type available_sku_request: ~azure.mgmt.databox.v2021_05_01.models.AvailableSkuRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_05_01.models.AvailableSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_available_skus_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} # type: ignore + + def validate_address( + self, + location, # type: str + validate_address, # type: "_models.ValidateAddress" + **kwargs # type: Any + ): + # type: (...) -> "_models.AddressValidationOutput" + """[DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer + shipping address and provide alternate addresses if any. + + :param location: The location of the resource. + :type location: str + :param validate_address: Shipping address of the customer. + :type validate_address: ~azure.mgmt.databox.v2021_05_01.models.ValidateAddress + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressValidationOutput, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.AddressValidationOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_address.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_address, 'ValidateAddress') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressValidationOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_address.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} # type: ignore + + def validate_inputs_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + validation_request, # type: "_models.ValidationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidationResponse" + """This method does all necessary pre-job creation validation under resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_05_01.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + def validate_inputs( + self, + location, # type: str + validation_request, # type: "_models.ValidationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidationResponse" + """This method does all necessary pre-job creation validation under subscription. + + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_05_01.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + def region_configuration( + self, + location, # type: str + region_configuration_request, # type: "_models.RegionConfigurationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.RegionConfigurationResponse" + """This API provides configuration details specific to given region/location at Subscription + level. + + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region. + :type region_configuration_request: ~azure.mgmt.databox.v2021_05_01.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore + + def region_configuration_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + region_configuration_request, # type: "_models.RegionConfigurationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.RegionConfigurationResponse" + """This API provides configuration details specific to given region/location at Resource group + level. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region at + resource group level. + :type region_configuration_request: ~azure.mgmt.databox.v2021_05_01.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_05_01.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/py.typed b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_05_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/__init__.py new file mode 100644 index 0000000000000..ae972ed54f84f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/__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 ._data_box_management_client import DataBoxManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['DataBoxManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_configuration.py new file mode 100644 index 0000000000000..1a1a14eaa61e8 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_configuration.py @@ -0,0 +1,71 @@ +# 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 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 DataBoxManagementClientConfiguration(Configuration): + """Configuration for DataBoxManagementClient. + + 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 + :param subscription_id: The Subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataBoxManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-08-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-databox/{}'.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 = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_data_box_management_client.py new file mode 100644 index 0000000000000..a37aeb2f1c7a9 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_data_box_management_client.py @@ -0,0 +1,100 @@ +# 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.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import DataBoxManagementClientOperationsMixin +from .operations import ServiceOperations +from . import models + + +class DataBoxManagementClient(DataBoxManagementClientOperationsMixin): + """The DataBox Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.v2021_08_01_preview.operations.Operations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.databox.v2021_08_01_preview.operations.JobsOperations + :ivar service: ServiceOperations operations + :vartype service: azure.mgmt.databox.v2021_08_01_preview.operations.ServiceOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataBoxManagementClientConfiguration(credential, subscription_id, **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._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> DataBoxManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_metadata.json b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_metadata.json new file mode 100644 index 0000000000000..fd1b1613adab9 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_metadata.json @@ -0,0 +1,123 @@ +{ + "chosen_version": "2021-08-01-preview", + "total_api_version_list": ["2021-08-01-preview"], + "client": { + "name": "DataBoxManagementClient", + "filename": "_data_box_management_client", + "description": "The DataBox Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"], \"._operations_mixin\": [\"DataBoxManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataBoxManagementClientConfiguration\"], \"._operations_mixin\": [\"DataBoxManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The Subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The Subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "operations": "Operations", + "jobs": "JobsOperations", + "service": "ServiceOperations" + }, + "operation_mixins": { + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "operations": { + "mitigate" : { + "sync": { + "signature": "def mitigate(\n self,\n job_name, # type: str\n resource_group_name, # type: str\n mitigate_job_request, # type: \"_models.MitigateJobRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Request to mitigate for a given job.\n\n:param job_name: The name of the job Resource within the specified resource group. job names\n must be between 3 and 24 characters in length and use any alphanumeric and underscore only.\n:type job_name: str\n:param resource_group_name: The Resource Group Name.\n:type resource_group_name: str\n:param mitigate_job_request: Mitigation Request.\n:type mitigate_job_request: ~azure.mgmt.databox.v2021_08_01_preview.models.MitigateJobRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def mitigate(\n self,\n job_name: str,\n resource_group_name: str,\n mitigate_job_request: \"_models.MitigateJobRequest\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Request to mitigate for a given job.\n\n:param job_name: The name of the job Resource within the specified resource group. job names\n must be between 3 and 24 characters in length and use any alphanumeric and underscore only.\n:type job_name: str\n:param resource_group_name: The Resource Group Name.\n:type resource_group_name: str\n:param mitigate_job_request: Mitigation Request.\n:type mitigate_job_request: ~azure.mgmt.databox.v2021_08_01_preview.models.MitigateJobRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "job_name, resource_group_name, mitigate_job_request" + } + } + } +} \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_version.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_version.py new file mode 100644 index 0000000000000..e5754a47ce68f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/_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 = "1.0.0b1" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/__init__.py new file mode 100644 index 0000000000000..bb6b75a72db8d --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/__init__.py @@ -0,0 +1,10 @@ +# 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 ._data_box_management_client import DataBoxManagementClient +__all__ = ['DataBoxManagementClient'] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/_configuration.py new file mode 100644 index 0000000000000..a30ff50c73db8 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/_configuration.py @@ -0,0 +1,67 @@ +# 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 + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class DataBoxManagementClientConfiguration(Configuration): + """Configuration for DataBoxManagementClient. + + 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 + :param subscription_id: The Subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataBoxManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-08-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-databox/{}'.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 = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/_data_box_management_client.py new file mode 100644 index 0000000000000..fd9390e13eba2 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/_data_box_management_client.py @@ -0,0 +1,93 @@ +# 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, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import DataBoxManagementClientOperationsMixin +from .operations import ServiceOperations +from .. import models + + +class DataBoxManagementClient(DataBoxManagementClientOperationsMixin): + """The DataBox Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.v2021_08_01_preview.aio.operations.Operations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.databox.v2021_08_01_preview.aio.operations.JobsOperations + :ivar service: ServiceOperations operations + :vartype service: azure.mgmt.databox.v2021_08_01_preview.aio.operations.ServiceOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataBoxManagementClientConfiguration(credential, subscription_id, **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._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DataBoxManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/__init__.py new file mode 100644 index 0000000000000..bd13cc67afb6e --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/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 ._operations import Operations +from ._jobs_operations import JobsOperations +from ._data_box_management_client_operations import DataBoxManagementClientOperationsMixin +from ._service_operations import ServiceOperations + +__all__ = [ + 'Operations', + 'JobsOperations', + 'DataBoxManagementClientOperationsMixin', + 'ServiceOperations', +] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_data_box_management_client_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_data_box_management_client_operations.py new file mode 100644 index 0000000000000..fd90622be6460 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_data_box_management_client_operations.py @@ -0,0 +1,86 @@ +# 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, 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, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataBoxManagementClientOperationsMixin: + + async def mitigate( + self, + job_name: str, + resource_group_name: str, + mitigate_job_request: "_models.MitigateJobRequest", + **kwargs: Any + ) -> None: + """Request to mitigate for a given job. + + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param mitigate_job_request: Mitigation Request. + :type mitigate_job_request: ~azure.mgmt.databox.v2021_08_01_preview.models.MitigateJobRequest + :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', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.mitigate.metadata['url'] # type: ignore + path_format_arguments = { + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(mitigate_job_request, 'MitigateJobRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + mitigate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_jobs_operations.py new file mode 100644 index 0000000000000..d466c2a7419cd --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_jobs_operations.py @@ -0,0 +1,909 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations: + """JobsOperations 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.databox.v2021_08_01_preview.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 + + def list( + self, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.JobResourceList"]: + """Lists all the jobs available under the subscription. + + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_08_01_preview.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} # type: ignore + + async def mark_devices_shipped( + self, + job_name: str, + resource_group_name: str, + mark_devices_shipped_request: "_models.MarkDevicesShippedRequest", + **kwargs: Any + ) -> None: + """Request to mark devices for a given job as shipped. + + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param mark_devices_shipped_request: Mark Devices Shipped Request. + :type mark_devices_shipped_request: ~azure.mgmt.databox.v2021_08_01_preview.models.MarkDevicesShippedRequest + :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', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.mark_devices_shipped.metadata['url'] # type: ignore + path_format_arguments = { + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(mark_devices_shipped_request, 'MarkDevicesShippedRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + mark_devices_shipped.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/markDevicesShipped'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.JobResourceList"]: + """Lists all the jobs available under the given resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_08_01_preview.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} # type: ignore + + async def get( + self, + resource_group_name: str, + job_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.JobResource": + """Gets information about the specified job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param expand: $expand is supported on details parameter for job, which provides details on the + job stages. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobResource, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + job_name: str, + job_resource: "_models.JobResource", + **kwargs: Any + ) -> Optional["_models.JobResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource, 'JobResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + job_name: str, + job_resource: "_models.JobResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.JobResource"]: + """Creates a new job with the specified parameters. Existing job cannot be updated with this API + and should instead be updated with the Update job API. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource: Job details from request body. + :type job_resource: ~azure.mgmt.databox.v2021_08_01_preview.models.JobResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2021_08_01_preview.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + job_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + job_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + job_name: str, + job_resource_update_parameter: "_models.JobResourceUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.JobResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + job_name: str, + job_resource_update_parameter: "_models.JobResourceUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.JobResource"]: + """Updates the properties of an existing job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource_update_parameter: Job update parameters from request body. + :type job_resource_update_parameter: ~azure.mgmt.databox.v2021_08_01_preview.models.JobResourceUpdateParameter + :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag + of the job on the server matches this value. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databox.v2021_08_01_preview.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource_update_parameter=job_resource_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + async def book_shipment_pick_up( + self, + resource_group_name: str, + job_name: str, + shipment_pick_up_request: "_models.ShipmentPickUpRequest", + **kwargs: Any + ) -> "_models.ShipmentPickUpResponse": + """Book shipment pick up. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param shipment_pick_up_request: Details of shipment pick up request. + :type shipment_pick_up_request: ~azure.mgmt.databox.v2021_08_01_preview.models.ShipmentPickUpRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShipmentPickUpResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.ShipmentPickUpResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} # type: ignore + + async def cancel( + self, + resource_group_name: str, + job_name: str, + cancellation_reason: "_models.CancellationReason", + **kwargs: Any + ) -> None: + """CancelJob. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.databox.v2021_08_01_preview.models.CancellationReason + :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', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} # type: ignore + + def list_credentials( + self, + resource_group_name: str, + job_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.UnencryptedCredentialsList"]: + """This method gets the unencrypted secrets related to the job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_08_01_preview.models.UnencryptedCredentialsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('UnencryptedCredentialsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_operations.py new file mode 100644 index 0000000000000..a5db6738864cb --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_operations.py @@ -0,0 +1,105 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations 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.databox.v2021_08_01_preview.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 + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationList"]: + """This method gets all the operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_08_01_preview.models.OperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_service_operations.py new file mode 100644 index 0000000000000..09cb249ab235e --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/aio/operations/_service_operations.py @@ -0,0 +1,456 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceOperations: + """ServiceOperations 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.databox.v2021_08_01_preview.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 + + def list_available_skus_by_resource_group( + self, + resource_group_name: str, + location: str, + available_sku_request: "_models.AvailableSkuRequest", + **kwargs: Any + ) -> AsyncIterable["_models.AvailableSkusResult"]: + """This method provides the list of available skus for the given subscription, resource group and + location. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param available_sku_request: Filters for showing the available skus. + :type available_sku_request: ~azure.mgmt.databox.v2021_08_01_preview.models.AvailableSkuRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databox.v2021_08_01_preview.models.AvailableSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_available_skus_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} # type: ignore + + async def validate_address( + self, + location: str, + validate_address: "_models.ValidateAddress", + **kwargs: Any + ) -> "_models.AddressValidationOutput": + """[DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer + shipping address and provide alternate addresses if any. + + :param location: The location of the resource. + :type location: str + :param validate_address: Shipping address of the customer. + :type validate_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ValidateAddress + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressValidationOutput, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.AddressValidationOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_address.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_address, 'ValidateAddress') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressValidationOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_address.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} # type: ignore + + async def validate_inputs_by_resource_group( + self, + resource_group_name: str, + location: str, + validation_request: "_models.ValidationRequest", + **kwargs: Any + ) -> "_models.ValidationResponse": + """This method does all necessary pre-job creation validation under resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + async def validate_inputs( + self, + location: str, + validation_request: "_models.ValidationRequest", + **kwargs: Any + ) -> "_models.ValidationResponse": + """This method does all necessary pre-job creation validation under subscription. + + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + async def region_configuration( + self, + location: str, + region_configuration_request: "_models.RegionConfigurationRequest", + **kwargs: Any + ) -> "_models.RegionConfigurationResponse": + """This API provides configuration details specific to given region/location at Subscription + level. + + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region. + :type region_configuration_request: ~azure.mgmt.databox.v2021_08_01_preview.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore + + async def region_configuration_by_resource_group( + self, + resource_group_name: str, + location: str, + region_configuration_request: "_models.RegionConfigurationRequest", + **kwargs: Any + ) -> "_models.RegionConfigurationResponse": + """This API provides configuration details specific to given region/location at Resource group + level. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region at + resource group level. + :type region_configuration_request: ~azure.mgmt.databox.v2021_08_01_preview.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/__init__.py new file mode 100644 index 0000000000000..4bccb9a5dd695 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/__init__.py @@ -0,0 +1,422 @@ +# 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 AccountCredentialDetails + from ._models_py3 import AdditionalErrorInfo + from ._models_py3 import AddressValidationOutput + from ._models_py3 import AddressValidationProperties + from ._models_py3 import ApiError + from ._models_py3 import ApplianceNetworkConfiguration + from ._models_py3 import ArmBaseObject + from ._models_py3 import AvailableSkuRequest + from ._models_py3 import AvailableSkusResult + from ._models_py3 import AzureFileFilterDetails + from ._models_py3 import BlobFilterDetails + from ._models_py3 import CancellationReason + from ._models_py3 import CloudError + from ._models_py3 import ContactDetails + from ._models_py3 import CopyLogDetails + from ._models_py3 import CopyProgress + from ._models_py3 import CreateJobValidations + from ._models_py3 import CreateOrderLimitForSubscriptionValidationRequest + from ._models_py3 import CreateOrderLimitForSubscriptionValidationResponseProperties + from ._models_py3 import CustomerDiskJobSecrets + from ._models_py3 import DataAccountDetails + from ._models_py3 import DataBoxAccountCopyLogDetails + from ._models_py3 import DataBoxCustomerDiskCopyLogDetails + from ._models_py3 import DataBoxCustomerDiskCopyProgress + from ._models_py3 import DataBoxCustomerDiskJobDetails + from ._models_py3 import DataBoxDiskCopyLogDetails + from ._models_py3 import DataBoxDiskCopyProgress + from ._models_py3 import DataBoxDiskJobDetails + from ._models_py3 import DataBoxDiskJobSecrets + from ._models_py3 import DataBoxHeavyAccountCopyLogDetails + from ._models_py3 import DataBoxHeavyJobDetails + from ._models_py3 import DataBoxHeavyJobSecrets + from ._models_py3 import DataBoxHeavySecret + from ._models_py3 import DataBoxJobDetails + from ._models_py3 import DataBoxScheduleAvailabilityRequest + from ._models_py3 import DataBoxSecret + from ._models_py3 import DataExportDetails + from ._models_py3 import DataImportDetails + from ._models_py3 import DataLocationToServiceLocationMap + from ._models_py3 import DataTransferDetailsValidationRequest + from ._models_py3 import DataTransferDetailsValidationResponseProperties + from ._models_py3 import DataboxJobSecrets + from ._models_py3 import DatacenterAddressInstructionResponse + from ._models_py3 import DatacenterAddressLocationResponse + from ._models_py3 import DatacenterAddressRequest + from ._models_py3 import DatacenterAddressResponse + from ._models_py3 import DcAccessSecurityCode + from ._models_py3 import Details + from ._models_py3 import DiskScheduleAvailabilityRequest + from ._models_py3 import DiskSecret + from ._models_py3 import EncryptionPreferences + from ._models_py3 import ErrorDetail + from ._models_py3 import ExportDiskDetails + from ._models_py3 import FilterFileDetails + from ._models_py3 import HeavyScheduleAvailabilityRequest + from ._models_py3 import IdentityProperties + from ._models_py3 import ImportDiskDetails + from ._models_py3 import JobDeliveryInfo + from ._models_py3 import JobDetails + from ._models_py3 import JobResource + from ._models_py3 import JobResourceList + from ._models_py3 import JobResourceUpdateParameter + from ._models_py3 import JobSecrets + from ._models_py3 import JobStages + from ._models_py3 import KeyEncryptionKey + from ._models_py3 import LastMitigationActionOnJob + from ._models_py3 import ManagedDiskDetails + from ._models_py3 import MarkDevicesShippedRequest + from ._models_py3 import MitigateJobRequest + from ._models_py3 import NotificationPreference + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationList + from ._models_py3 import PackageCarrierDetails + from ._models_py3 import PackageCarrierInfo + from ._models_py3 import PackageShippingDetails + from ._models_py3 import Preferences + from ._models_py3 import PreferencesValidationRequest + from ._models_py3 import PreferencesValidationResponseProperties + from ._models_py3 import RegionConfigurationRequest + from ._models_py3 import RegionConfigurationResponse + from ._models_py3 import Resource + from ._models_py3 import ResourceIdentity + from ._models_py3 import ScheduleAvailabilityRequest + from ._models_py3 import ScheduleAvailabilityResponse + from ._models_py3 import ShareCredentialDetails + from ._models_py3 import ShipmentPickUpRequest + from ._models_py3 import ShipmentPickUpResponse + from ._models_py3 import ShippingAddress + from ._models_py3 import Sku + from ._models_py3 import SkuAvailabilityValidationRequest + from ._models_py3 import SkuAvailabilityValidationResponseProperties + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuCost + from ._models_py3 import SkuInformation + from ._models_py3 import StorageAccountDetails + from ._models_py3 import SubscriptionIsAllowedToCreateJobValidationRequest + from ._models_py3 import SubscriptionIsAllowedToCreateJobValidationResponseProperties + from ._models_py3 import SystemData + from ._models_py3 import TransferAllDetails + from ._models_py3 import TransferConfiguration + from ._models_py3 import TransferConfigurationTransferAllDetails + from ._models_py3 import TransferConfigurationTransferFilterDetails + from ._models_py3 import TransferFilterDetails + from ._models_py3 import TransportAvailabilityDetails + from ._models_py3 import TransportAvailabilityRequest + from ._models_py3 import TransportAvailabilityResponse + from ._models_py3 import TransportPreferences + from ._models_py3 import UnencryptedCredentials + from ._models_py3 import UnencryptedCredentialsList + from ._models_py3 import UpdateJobDetails + from ._models_py3 import UserAssignedIdentity + from ._models_py3 import UserAssignedProperties + from ._models_py3 import ValidateAddress + from ._models_py3 import ValidationInputRequest + from ._models_py3 import ValidationInputResponse + from ._models_py3 import ValidationRequest + from ._models_py3 import ValidationResponse +except (SyntaxError, ImportError): + from ._models import AccountCredentialDetails # type: ignore + from ._models import AdditionalErrorInfo # type: ignore + from ._models import AddressValidationOutput # type: ignore + from ._models import AddressValidationProperties # type: ignore + from ._models import ApiError # type: ignore + from ._models import ApplianceNetworkConfiguration # type: ignore + from ._models import ArmBaseObject # type: ignore + from ._models import AvailableSkuRequest # type: ignore + from ._models import AvailableSkusResult # type: ignore + from ._models import AzureFileFilterDetails # type: ignore + from ._models import BlobFilterDetails # type: ignore + from ._models import CancellationReason # type: ignore + from ._models import CloudError # type: ignore + from ._models import ContactDetails # type: ignore + from ._models import CopyLogDetails # type: ignore + from ._models import CopyProgress # type: ignore + from ._models import CreateJobValidations # type: ignore + from ._models import CreateOrderLimitForSubscriptionValidationRequest # type: ignore + from ._models import CreateOrderLimitForSubscriptionValidationResponseProperties # type: ignore + from ._models import CustomerDiskJobSecrets # type: ignore + from ._models import DataAccountDetails # type: ignore + from ._models import DataBoxAccountCopyLogDetails # type: ignore + from ._models import DataBoxCustomerDiskCopyLogDetails # type: ignore + from ._models import DataBoxCustomerDiskCopyProgress # type: ignore + from ._models import DataBoxCustomerDiskJobDetails # type: ignore + from ._models import DataBoxDiskCopyLogDetails # type: ignore + from ._models import DataBoxDiskCopyProgress # type: ignore + from ._models import DataBoxDiskJobDetails # type: ignore + from ._models import DataBoxDiskJobSecrets # type: ignore + from ._models import DataBoxHeavyAccountCopyLogDetails # type: ignore + from ._models import DataBoxHeavyJobDetails # type: ignore + from ._models import DataBoxHeavyJobSecrets # type: ignore + from ._models import DataBoxHeavySecret # type: ignore + from ._models import DataBoxJobDetails # type: ignore + from ._models import DataBoxScheduleAvailabilityRequest # type: ignore + from ._models import DataBoxSecret # type: ignore + from ._models import DataExportDetails # type: ignore + from ._models import DataImportDetails # type: ignore + from ._models import DataLocationToServiceLocationMap # type: ignore + from ._models import DataTransferDetailsValidationRequest # type: ignore + from ._models import DataTransferDetailsValidationResponseProperties # type: ignore + from ._models import DataboxJobSecrets # type: ignore + from ._models import DatacenterAddressInstructionResponse # type: ignore + from ._models import DatacenterAddressLocationResponse # type: ignore + from ._models import DatacenterAddressRequest # type: ignore + from ._models import DatacenterAddressResponse # type: ignore + from ._models import DcAccessSecurityCode # type: ignore + from ._models import Details # type: ignore + from ._models import DiskScheduleAvailabilityRequest # type: ignore + from ._models import DiskSecret # type: ignore + from ._models import EncryptionPreferences # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import ExportDiskDetails # type: ignore + from ._models import FilterFileDetails # type: ignore + from ._models import HeavyScheduleAvailabilityRequest # type: ignore + from ._models import IdentityProperties # type: ignore + from ._models import ImportDiskDetails # type: ignore + from ._models import JobDeliveryInfo # type: ignore + from ._models import JobDetails # type: ignore + from ._models import JobResource # type: ignore + from ._models import JobResourceList # type: ignore + from ._models import JobResourceUpdateParameter # type: ignore + from ._models import JobSecrets # type: ignore + from ._models import JobStages # type: ignore + from ._models import KeyEncryptionKey # type: ignore + from ._models import LastMitigationActionOnJob # type: ignore + from ._models import ManagedDiskDetails # type: ignore + from ._models import MarkDevicesShippedRequest # type: ignore + from ._models import MitigateJobRequest # type: ignore + from ._models import NotificationPreference # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationList # type: ignore + from ._models import PackageCarrierDetails # type: ignore + from ._models import PackageCarrierInfo # type: ignore + from ._models import PackageShippingDetails # type: ignore + from ._models import Preferences # type: ignore + from ._models import PreferencesValidationRequest # type: ignore + from ._models import PreferencesValidationResponseProperties # type: ignore + from ._models import RegionConfigurationRequest # type: ignore + from ._models import RegionConfigurationResponse # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceIdentity # type: ignore + from ._models import ScheduleAvailabilityRequest # type: ignore + from ._models import ScheduleAvailabilityResponse # type: ignore + from ._models import ShareCredentialDetails # type: ignore + from ._models import ShipmentPickUpRequest # type: ignore + from ._models import ShipmentPickUpResponse # type: ignore + from ._models import ShippingAddress # type: ignore + from ._models import Sku # type: ignore + from ._models import SkuAvailabilityValidationRequest # type: ignore + from ._models import SkuAvailabilityValidationResponseProperties # type: ignore + from ._models import SkuCapacity # type: ignore + from ._models import SkuCost # type: ignore + from ._models import SkuInformation # type: ignore + from ._models import StorageAccountDetails # type: ignore + from ._models import SubscriptionIsAllowedToCreateJobValidationRequest # type: ignore + from ._models import SubscriptionIsAllowedToCreateJobValidationResponseProperties # type: ignore + from ._models import SystemData # type: ignore + from ._models import TransferAllDetails # type: ignore + from ._models import TransferConfiguration # type: ignore + from ._models import TransferConfigurationTransferAllDetails # type: ignore + from ._models import TransferConfigurationTransferFilterDetails # type: ignore + from ._models import TransferFilterDetails # type: ignore + from ._models import TransportAvailabilityDetails # type: ignore + from ._models import TransportAvailabilityRequest # type: ignore + from ._models import TransportAvailabilityResponse # type: ignore + from ._models import TransportPreferences # type: ignore + from ._models import UnencryptedCredentials # type: ignore + from ._models import UnencryptedCredentialsList # type: ignore + from ._models import UpdateJobDetails # type: ignore + from ._models import UserAssignedIdentity # type: ignore + from ._models import UserAssignedProperties # type: ignore + from ._models import ValidateAddress # type: ignore + from ._models import ValidationInputRequest # type: ignore + from ._models import ValidationInputResponse # type: ignore + from ._models import ValidationRequest # type: ignore + from ._models import ValidationResponse # type: ignore + +from ._data_box_management_client_enums import ( + AccessProtocol, + AddressType, + AddressValidationStatus, + ClassDiscriminator, + CopyStatus, + CustomerResolutionCode, + DataAccountType, + DataCenterCode, + DatacenterAddressType, + DoubleEncryption, + FilterFileType, + JobDeliveryType, + KekType, + LogCollectionLevel, + NotificationStageName, + OverallValidationStatus, + ShareDestinationFormatType, + SkuDisabledReason, + SkuName, + StageName, + StageStatus, + TransferConfigurationType, + TransferType, + TransportShipmentTypes, + ValidationInputDiscriminator, + ValidationStatus, +) + +__all__ = [ + 'AccountCredentialDetails', + 'AdditionalErrorInfo', + 'AddressValidationOutput', + 'AddressValidationProperties', + 'ApiError', + 'ApplianceNetworkConfiguration', + 'ArmBaseObject', + 'AvailableSkuRequest', + 'AvailableSkusResult', + 'AzureFileFilterDetails', + 'BlobFilterDetails', + 'CancellationReason', + 'CloudError', + 'ContactDetails', + 'CopyLogDetails', + 'CopyProgress', + 'CreateJobValidations', + 'CreateOrderLimitForSubscriptionValidationRequest', + 'CreateOrderLimitForSubscriptionValidationResponseProperties', + 'CustomerDiskJobSecrets', + 'DataAccountDetails', + 'DataBoxAccountCopyLogDetails', + 'DataBoxCustomerDiskCopyLogDetails', + 'DataBoxCustomerDiskCopyProgress', + 'DataBoxCustomerDiskJobDetails', + 'DataBoxDiskCopyLogDetails', + 'DataBoxDiskCopyProgress', + 'DataBoxDiskJobDetails', + 'DataBoxDiskJobSecrets', + 'DataBoxHeavyAccountCopyLogDetails', + 'DataBoxHeavyJobDetails', + 'DataBoxHeavyJobSecrets', + 'DataBoxHeavySecret', + 'DataBoxJobDetails', + 'DataBoxScheduleAvailabilityRequest', + 'DataBoxSecret', + 'DataExportDetails', + 'DataImportDetails', + 'DataLocationToServiceLocationMap', + 'DataTransferDetailsValidationRequest', + 'DataTransferDetailsValidationResponseProperties', + 'DataboxJobSecrets', + 'DatacenterAddressInstructionResponse', + 'DatacenterAddressLocationResponse', + 'DatacenterAddressRequest', + 'DatacenterAddressResponse', + 'DcAccessSecurityCode', + 'Details', + 'DiskScheduleAvailabilityRequest', + 'DiskSecret', + 'EncryptionPreferences', + 'ErrorDetail', + 'ExportDiskDetails', + 'FilterFileDetails', + 'HeavyScheduleAvailabilityRequest', + 'IdentityProperties', + 'ImportDiskDetails', + 'JobDeliveryInfo', + 'JobDetails', + 'JobResource', + 'JobResourceList', + 'JobResourceUpdateParameter', + 'JobSecrets', + 'JobStages', + 'KeyEncryptionKey', + 'LastMitigationActionOnJob', + 'ManagedDiskDetails', + 'MarkDevicesShippedRequest', + 'MitigateJobRequest', + 'NotificationPreference', + 'Operation', + 'OperationDisplay', + 'OperationList', + 'PackageCarrierDetails', + 'PackageCarrierInfo', + 'PackageShippingDetails', + 'Preferences', + 'PreferencesValidationRequest', + 'PreferencesValidationResponseProperties', + 'RegionConfigurationRequest', + 'RegionConfigurationResponse', + 'Resource', + 'ResourceIdentity', + 'ScheduleAvailabilityRequest', + 'ScheduleAvailabilityResponse', + 'ShareCredentialDetails', + 'ShipmentPickUpRequest', + 'ShipmentPickUpResponse', + 'ShippingAddress', + 'Sku', + 'SkuAvailabilityValidationRequest', + 'SkuAvailabilityValidationResponseProperties', + 'SkuCapacity', + 'SkuCost', + 'SkuInformation', + 'StorageAccountDetails', + 'SubscriptionIsAllowedToCreateJobValidationRequest', + 'SubscriptionIsAllowedToCreateJobValidationResponseProperties', + 'SystemData', + 'TransferAllDetails', + 'TransferConfiguration', + 'TransferConfigurationTransferAllDetails', + 'TransferConfigurationTransferFilterDetails', + 'TransferFilterDetails', + 'TransportAvailabilityDetails', + 'TransportAvailabilityRequest', + 'TransportAvailabilityResponse', + 'TransportPreferences', + 'UnencryptedCredentials', + 'UnencryptedCredentialsList', + 'UpdateJobDetails', + 'UserAssignedIdentity', + 'UserAssignedProperties', + 'ValidateAddress', + 'ValidationInputRequest', + 'ValidationInputResponse', + 'ValidationRequest', + 'ValidationResponse', + 'AccessProtocol', + 'AddressType', + 'AddressValidationStatus', + 'ClassDiscriminator', + 'CopyStatus', + 'CustomerResolutionCode', + 'DataAccountType', + 'DataCenterCode', + 'DatacenterAddressType', + 'DoubleEncryption', + 'FilterFileType', + 'JobDeliveryType', + 'KekType', + 'LogCollectionLevel', + 'NotificationStageName', + 'OverallValidationStatus', + 'ShareDestinationFormatType', + 'SkuDisabledReason', + 'SkuName', + 'StageName', + 'StageStatus', + 'TransferConfigurationType', + 'TransferType', + 'TransportShipmentTypes', + 'ValidationInputDiscriminator', + 'ValidationStatus', +] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/_data_box_management_client_enums.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/_data_box_management_client_enums.py new file mode 100644 index 0000000000000..6269a2a11d7cf --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/_data_box_management_client_enums.py @@ -0,0 +1,446 @@ +# 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, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + #: Server Message Block protocol(SMB). + SMB = "SMB" + #: Network File System protocol(NFS). + NFS = "NFS" + +class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of address. + """ + + #: Address type not known. + NONE = "None" + #: Residential Address. + RESIDENTIAL = "Residential" + #: Commercial Address. + COMMERCIAL = "Commercial" + +class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The address validation status. + """ + + #: Address provided is valid. + VALID = "Valid" + #: Address provided is invalid or not supported. + INVALID = "Invalid" + #: Address provided is ambiguous, please choose one of the alternate addresses returned. + AMBIGUOUS = "Ambiguous" + +class ClassDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates the type of job details. + """ + + #: Data Box orders. + DATA_BOX = "DataBox" + #: Data Box Disk orders. + DATA_BOX_DISK = "DataBoxDisk" + #: Data Box Heavy orders. + DATA_BOX_HEAVY = "DataBoxHeavy" + #: Data Box Customer Disk orders. + DATA_BOX_CUSTOMER_DISK = "DataBoxCustomerDisk" + +class CopyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Status of the copy + """ + + #: Data copy hasn't started yet. + NOT_STARTED = "NotStarted" + #: Data copy is in progress. + IN_PROGRESS = "InProgress" + #: Data copy completed. + COMPLETED = "Completed" + #: Data copy completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Data copy failed. No data was copied. + FAILED = "Failed" + #: No copy triggered as device was not returned. + NOT_RETURNED = "NotReturned" + #: The Device has hit hardware issues. + HARDWARE_ERROR = "HardwareError" + #: Data copy failed. The Device was formatted by user. + DEVICE_FORMATTED = "DeviceFormatted" + #: Data copy failed. Device metadata was modified by user. + DEVICE_METADATA_MODIFIED = "DeviceMetadataModified" + #: Data copy failed. Storage Account was not accessible during copy. + STORAGE_ACCOUNT_NOT_ACCESSIBLE = "StorageAccountNotAccessible" + #: Data copy failed. The Device data content is not supported. + UNSUPPORTED_DATA = "UnsupportedData" + #: No copy triggered as device was not received. + DRIVE_NOT_RECEIVED = "DriveNotReceived" + #: No copy triggered as device type is not supported. + UNSUPPORTED_DRIVE = "UnsupportedDrive" + #: Copy failed due to service error. + OTHER_SERVICE_ERROR = "OtherServiceError" + #: Copy failed due to user error. + OTHER_USER_ERROR = "OtherUserError" + #: Copy failed due to disk detection error. + DRIVE_NOT_DETECTED = "DriveNotDetected" + #: Copy failed due to corrupted drive. + DRIVE_CORRUPTED = "DriveCorrupted" + #: Copy failed due to modified or removed metadata files. + METADATA_FILES_MODIFIED_OR_REMOVED = "MetadataFilesModifiedOrRemoved" + +class CustomerResolutionCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + #: No Resolution Yet. + NONE = "None" + #: Clean the device. + MOVE_TO_CLEAN_UP_DEVICE = "MoveToCleanUpDevice" + #: Resume the job to same stage. + RESUME = "Resume" + +class DataAccountType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the account. + """ + + #: Storage Accounts . + STORAGE_ACCOUNT = "StorageAccount" + #: Azure Managed disk storage. + MANAGED_DISK = "ManagedDisk" + +class DatacenterAddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Data center address type + """ + + #: Data center address location. + DATACENTER_ADDRESS_LOCATION = "DatacenterAddressLocation" + #: Data center address instruction. + DATACENTER_ADDRESS_INSTRUCTION = "DatacenterAddressInstruction" + +class DataCenterCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """DataCenter code. + """ + + INVALID = "Invalid" + BY2 = "BY2" + BY1 = "BY1" + ORK70 = "ORK70" + AM2 = "AM2" + AMS20 = "AMS20" + BY21 = "BY21" + BY24 = "BY24" + MWH01 = "MWH01" + AMS06 = "AMS06" + SSE90 = "SSE90" + SYD03 = "SYD03" + SYD23 = "SYD23" + CBR20 = "CBR20" + YTO20 = "YTO20" + CWL20 = "CWL20" + LON24 = "LON24" + BOM01 = "BOM01" + BL20 = "BL20" + BL7 = "BL7" + SEL20 = "SEL20" + TYO01 = "TYO01" + BN1 = "BN1" + SN5 = "SN5" + CYS04 = "CYS04" + TYO22 = "TYO22" + YTO21 = "YTO21" + YQB20 = "YQB20" + FRA22 = "FRA22" + MAA01 = "MAA01" + CPQ02 = "CPQ02" + CPQ20 = "CPQ20" + SIN20 = "SIN20" + HKG20 = "HKG20" + SG2 = "SG2" + MEL23 = "MEL23" + SEL21 = "SEL21" + OSA20 = "OSA20" + SHA03 = "SHA03" + BJB = "BJB" + JNB22 = "JNB22" + JNB21 = "JNB21" + MNZ21 = "MNZ21" + SN8 = "SN8" + AUH20 = "AUH20" + ZRH20 = "ZRH20" + PUS20 = "PUS20" + AD_HOC = "AdHoc" + CH1 = "CH1" + DSM05 = "DSM05" + +class DoubleEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Defines secondary layer of software-based encryption enablement. + """ + + #: Software-based encryption is enabled. + ENABLED = "Enabled" + #: Software-based encryption is disabled. + DISABLED = "Disabled" + +class FilterFileType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the filter file. + """ + + #: Filter file is of the type AzureBlob. + AZURE_BLOB = "AzureBlob" + #: Filter file is of the type AzureFiles. + AZURE_FILE = "AzureFile" + +class JobDeliveryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Delivery type of Job. + """ + + #: Non Scheduled job. + NON_SCHEDULED = "NonScheduled" + #: Scheduled job. + SCHEDULED = "Scheduled" + +class KekType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of encryption key used for key encryption. + """ + + #: Key encryption key is managed by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" + #: Key encryption key is managed by the Customer. + CUSTOMER_MANAGED = "CustomerManaged" + +class LogCollectionLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Level of the logs to be collected. + """ + + #: Only Errors will be collected in the logs. + ERROR = "Error" + #: Verbose logging (includes Errors, CRC, size information and others). + VERBOSE = "Verbose" + +class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the stage. + """ + + #: Notification at device prepared stage. + DEVICE_PREPARED = "DevicePrepared" + #: Notification at device dispatched stage. + DISPATCHED = "Dispatched" + #: Notification at device delivered stage. + DELIVERED = "Delivered" + #: Notification at device picked up from user stage. + PICKED_UP = "PickedUp" + #: Notification at device received at Azure datacenter stage. + AT_AZURE_DC = "AtAzureDC" + #: Notification at data copy started stage. + DATA_COPY = "DataCopy" + #: Notification at job created stage. + CREATED = "Created" + #: Notification at shipped devices to customer stage. + SHIPPED_TO_CUSTOMER = "ShippedToCustomer" + +class OverallValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Overall validation status. + """ + + #: Every input request is valid. + ALL_VALID_TO_PROCEED = "AllValidToProceed" + #: Some input requests are not valid. + INPUTS_REVISIT_REQUIRED = "InputsRevisitRequired" + #: Certain input validations skipped. + CERTAIN_INPUT_VALIDATIONS_SKIPPED = "CertainInputValidationsSkipped" + +class ShareDestinationFormatType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the share. + """ + + #: Unknown format. + UNKNOWN_TYPE = "UnknownType" + #: Storsimple data format. + HCS = "HCS" + #: Azure storage block blob format. + BLOCK_BLOB = "BlockBlob" + #: Azure storage page blob format. + PAGE_BLOB = "PageBlob" + #: Azure storage file format. + AZURE_FILE = "AzureFile" + #: Azure Compute Disk. + MANAGED_DISK = "ManagedDisk" + +class SkuDisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Reason why the Sku is disabled. + """ + + #: SKU is not disabled. + NONE = "None" + #: SKU is not available in the requested country. + COUNTRY = "Country" + #: SKU is not available to push data to the requested Azure region. + REGION = "Region" + #: Required features are not enabled for the SKU. + FEATURE = "Feature" + #: Subscription does not have required offer types for the SKU. + OFFER_TYPE = "OfferType" + #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription + #: notification. + NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + #: Data Box. + DATA_BOX = "DataBox" + #: Data Box Disk. + DATA_BOX_DISK = "DataBoxDisk" + #: Data Box Heavy. + DATA_BOX_HEAVY = "DataBoxHeavy" + #: Data Box Customer Disk. + DATA_BOX_CUSTOMER_DISK = "DataBoxCustomerDisk" + +class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the stage which is in progress. + """ + + #: An order has been created. + DEVICE_ORDERED = "DeviceOrdered" + #: A device has been prepared for the order. + DEVICE_PREPARED = "DevicePrepared" + #: Device has been dispatched to the user of the order. + DISPATCHED = "Dispatched" + #: Device has been delivered to the user of the order. + DELIVERED = "Delivered" + #: Device has been picked up from user and in transit to Azure datacenter. + PICKED_UP = "PickedUp" + #: Device has been received at Azure datacenter from the user. + AT_AZURE_DC = "AtAzureDC" + #: Data copy from the device at Azure datacenter. + DATA_COPY = "DataCopy" + #: Order has completed. + COMPLETED = "Completed" + #: Order has completed with errors. + COMPLETED_WITH_ERRORS = "CompletedWithErrors" + #: Order has been cancelled. + CANCELLED = "Cancelled" + #: Order has failed due to issue reported by user. + FAILED_ISSUE_REPORTED_AT_CUSTOMER = "Failed_IssueReportedAtCustomer" + #: Order has failed due to issue detected at Azure datacenter. + FAILED_ISSUE_DETECTED_AT_AZURE_DC = "Failed_IssueDetectedAtAzureDC" + #: Order has been aborted. + ABORTED = "Aborted" + #: Order has completed with warnings. + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" + #: Device is ready to be handed to customer from Azure DC. + READY_TO_DISPATCH_FROM_AZURE_DC = "ReadyToDispatchFromAzureDC" + #: Device can be dropped off at Azure DC. + READY_TO_RECEIVE_AT_AZURE_DC = "ReadyToReceiveAtAzureDC" + #: Job created by the customer. + CREATED = "Created" + #: User shipped the device to AzureDC. + SHIPPED_TO_AZURE_DC = "ShippedToAzureDC" + #: Awaiting shipment details of device from customer. + AWAITING_SHIPMENT_DETAILS = "AwaitingShipmentDetails" + #: Preparing the device to ship to customer. + PREPARING_TO_SHIP_FROM_AZURE_DC = "PreparingToShipFromAzureDC" + #: Shipped the device to customer. + SHIPPED_TO_CUSTOMER = "ShippedToCustomer" + +class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of the job stage. + """ + + #: No status available yet. + NONE = "None" + #: Stage is in progress. + IN_PROGRESS = "InProgress" + #: Stage has succeeded. + SUCCEEDED = "Succeeded" + #: Stage has failed. + FAILED = "Failed" + #: Stage has been cancelled. + CANCELLED = "Cancelled" + #: Stage is cancelling. + CANCELLING = "Cancelling" + #: Stage has succeeded with errors. + SUCCEEDED_WITH_ERRORS = "SucceededWithErrors" + #: Stage is stuck until customer takes some action. + WAITING_FOR_CUSTOMER_ACTION = "WaitingForCustomerAction" + #: Stage has succeeded with warnings. + SUCCEEDED_WITH_WARNINGS = "SucceededWithWarnings" + #: Stage is waiting for customer action for kek action items. + WAITING_FOR_CUSTOMER_ACTION_FOR_KEK = "WaitingForCustomerActionForKek" + #: Stage is waiting for customer action for clean up. + WAITING_FOR_CUSTOMER_ACTION_FOR_CLEAN_UP = "WaitingForCustomerActionForCleanUp" + #: Stage has performed customer action for clean up. + CUSTOMER_ACTION_PERFORMED_FOR_CLEAN_UP = "CustomerActionPerformedForCleanUp" + +class TransferConfigurationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the configuration for transfer. + """ + + #: Transfer all the data. + TRANSFER_ALL = "TransferAll" + #: Transfer using filter. + TRANSFER_USING_FILTER = "TransferUsingFilter" + +class TransferType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the transfer. + """ + + #: Import data to azure. + IMPORT_TO_AZURE = "ImportToAzure" + #: Export data from azure. + EXPORT_FROM_AZURE = "ExportFromAzure" + +class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Transport Shipment Type supported for given region. + """ + + #: Shipment Logistics is handled by the customer. + CUSTOMER_MANAGED = "CustomerManaged" + #: Shipment Logistics is handled by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" + +class ValidationInputDiscriminator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Identifies the type of validation request. + """ + + #: Identify request and response of address validation. + VALIDATE_ADDRESS = "ValidateAddress" + #: Identify request and response for validation of subscription permission to create job. + VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB = "ValidateSubscriptionIsAllowedToCreateJob" + #: Identify request and response of preference validation. + VALIDATE_PREFERENCES = "ValidatePreferences" + #: Identify request and response of create order limit for subscription validation. + VALIDATE_CREATE_ORDER_LIMIT = "ValidateCreateOrderLimit" + #: Identify request and response of active job limit for sku availability. + VALIDATE_SKU_AVAILABILITY = "ValidateSkuAvailability" + #: Identify request and response of data transfer details validation. + VALIDATE_DATA_TRANSFER_DETAILS = "ValidateDataTransferDetails" + +class ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Create order limit validation status. + """ + + #: Validation is successful. + VALID = "Valid" + #: Validation is not successful. + INVALID = "Invalid" + #: Validation is skipped. + SKIPPED = "Skipped" diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/_models.py new file mode 100644 index 0000000000000..3f542caefce19 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/_models.py @@ -0,0 +1,5030 @@ +# 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.core.exceptions import HttpResponseError +import msrest.serialization + + +class AccountCredentialDetails(msrest.serialization.Model): + """Credential details of the account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar account_name: Name of the account. + :vartype account_name: str + :ivar data_account_type: Type of the account. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :ivar account_connection_string: Connection string of the account endpoint to use the account + as a storage endpoint on the device. + :vartype account_connection_string: str + :ivar share_credential_details: Per share level unencrypted access credentials. + :vartype share_credential_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ShareCredentialDetails] + """ + + _validation = { + 'account_name': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_connection_string': {'readonly': True}, + 'share_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, + 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountCredentialDetails, self).__init__(**kwargs) + self.account_name = None + self.data_account_type = None + self.account_connection_string = None + self.share_credential_details = None + + +class AdditionalErrorInfo(msrest.serialization.Model): + """Additional error info. + + :param type: Additional error type. + :type type: str + :param info: Additional error info. + :type info: any + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(AdditionalErrorInfo, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.info = kwargs.get('info', None) + + +class AddressValidationOutput(msrest.serialization.Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param validation_type: Identifies the type of validation response.Constant filled by server. + Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", + "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", + "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress] + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'properties.validationType', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationOutput, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ValidationInputResponse(msrest.serialization.Model): + """Minimum properties that should be present in each individual validation response. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddressValidationProperties, CreateOrderLimitForSubscriptionValidationResponseProperties, DataTransferDetailsValidationResponseProperties, PreferencesValidationResponseProperties, SkuAvailabilityValidationResponseProperties, SubscriptionIsAllowedToCreateJobValidationResponseProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'AddressValidationProperties', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputResponse, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + + +class AddressValidationProperties(ValidationInputResponse): + """The address validation output. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress] + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_status': {'key': 'validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.validation_status = None + self.alternate_addresses = None + + +class ApiError(msrest.serialization.Model): + """ApiError. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. + :type error: ~azure.mgmt.databox.v2021_08_01_preview.models.ErrorDetail + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ApiError, self).__init__(**kwargs) + self.error = kwargs['error'] + + +class ApplianceNetworkConfiguration(msrest.serialization.Model): + """The Network Adapter configuration of a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the network. + :vartype name: str + :ivar mac_address: Mac Address. + :vartype mac_address: str + """ + + _validation = { + 'name': {'readonly': True}, + 'mac_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceNetworkConfiguration, self).__init__(**kwargs) + self.name = None + self.mac_address = None + + +class ArmBaseObject(msrest.serialization.Model): + """Base class for all objects under resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmBaseObject, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + + +class AvailableSkuRequest(msrest.serialization.Model): + """The filters for showing the available skus. + + All required parameters must be populated in order to send to Azure. + + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + :param sku_names: Sku Names to filter for available skus. + :type sku_names: list[str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku_names': {'key': 'skuNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableSkuRequest, self).__init__(**kwargs) + self.transfer_type = kwargs['transfer_type'] + self.country = kwargs['country'] + self.location = kwargs['location'] + self.sku_names = kwargs.get('sku_names', None) + + +class AvailableSkusResult(msrest.serialization.Model): + """The available skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of available skus. + :vartype value: list[~azure.mgmt.databox.v2021_08_01_preview.models.SkuInformation] + :param next_link: Link for the next set of skus. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SkuInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableSkusResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class AzureFileFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure files. + + :param file_prefix_list: Prefix list of the Azure files to be transferred. + :type file_prefix_list: list[str] + :param file_path_list: List of full path of the files to be transferred. + :type file_path_list: list[str] + :param file_share_list: List of file shares to be transferred. + :type file_share_list: list[str] + """ + + _attribute_map = { + 'file_prefix_list': {'key': 'filePrefixList', 'type': '[str]'}, + 'file_path_list': {'key': 'filePathList', 'type': '[str]'}, + 'file_share_list': {'key': 'fileShareList', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFileFilterDetails, self).__init__(**kwargs) + self.file_prefix_list = kwargs.get('file_prefix_list', None) + self.file_path_list = kwargs.get('file_path_list', None) + self.file_share_list = kwargs.get('file_share_list', None) + + +class BlobFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure Blobs. + + :param blob_prefix_list: Prefix list of the Azure blobs to be transferred. + :type blob_prefix_list: list[str] + :param blob_path_list: List of full path of the blobs to be transferred. + :type blob_path_list: list[str] + :param container_list: List of blob containers to be transferred. + :type container_list: list[str] + """ + + _attribute_map = { + 'blob_prefix_list': {'key': 'blobPrefixList', 'type': '[str]'}, + 'blob_path_list': {'key': 'blobPathList', 'type': '[str]'}, + 'container_list': {'key': 'containerList', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobFilterDetails, self).__init__(**kwargs) + self.blob_prefix_list = kwargs.get('blob_prefix_list', None) + self.blob_path_list = kwargs.get('blob_path_list', None) + self.container_list = kwargs.get('container_list', None) + + +class CancellationReason(msrest.serialization.Model): + """Reason for cancellation. + + All required parameters must be populated in order to send to Azure. + + :param reason: Required. Reason for cancellation. + :type reason: str + """ + + _validation = { + 'reason': {'required': True}, + } + + _attribute_map = { + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CancellationReason, self).__init__(**kwargs) + self.reason = kwargs['reason'] + + +class CloudError(msrest.serialization.Model): + """Cloud error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param code: Cloud error code. + :type code: str + :param message: Cloud error message. + :type message: str + :param target: Cloud error target. + :type target: str + :ivar details: Cloud error details. + :vartype details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CloudError] + :ivar additional_info: Cloud error additional info. + :vartype additional_info: + list[~azure.mgmt.databox.v2021_08_01_preview.models.AdditionalErrorInfo] + """ + + _validation = { + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudError]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[AdditionalErrorInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = None + self.additional_info = None + + +class ContactDetails(msrest.serialization.Model): + """Contact Details. + + All required parameters must be populated in order to send to Azure. + + :param contact_name: Required. Contact name of the person. + :type contact_name: str + :param phone: Required. Phone number of the contact person. + :type phone: str + :param phone_extension: Phone extension number of the contact person. + :type phone_extension: str + :param mobile: Mobile number of the contact person. + :type mobile: str + :param email_list: Required. List of Email-ids to be notified about job progress. + :type email_list: list[str] + :param notification_preference: Notification preference for a job stage. + :type notification_preference: + list[~azure.mgmt.databox.v2021_08_01_preview.models.NotificationPreference] + """ + + _validation = { + 'contact_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_name': {'key': 'contactName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'phone_extension': {'key': 'phoneExtension', 'type': 'str'}, + 'mobile': {'key': 'mobile', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + 'notification_preference': {'key': 'notificationPreference', 'type': '[NotificationPreference]'}, + } + + def __init__( + self, + **kwargs + ): + super(ContactDetails, self).__init__(**kwargs) + self.contact_name = kwargs['contact_name'] + self.phone = kwargs['phone'] + self.phone_extension = kwargs.get('phone_extension', None) + self.mobile = kwargs.get('mobile', None) + self.email_list = kwargs['email_list'] + self.notification_preference = kwargs.get('notification_preference', None) + + +class CopyLogDetails(msrest.serialization.Model): + """Details for log generated during copy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxAccountCopyLogDetails, DataBoxCustomerDiskCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxHeavyAccountCopyLogDetails. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type copy_log_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'copy_log_details_type': {'DataBox': 'DataBoxAccountCopyLogDetails', 'DataBoxCustomerDisk': 'DataBoxCustomerDiskCopyLogDetails', 'DataBoxDisk': 'DataBoxDiskCopyLogDetails', 'DataBoxHeavy': 'DataBoxHeavyAccountCopyLogDetails'} + } + + def __init__( + self, + **kwargs + ): + super(CopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = None # type: Optional[str] + + +class CopyProgress(msrest.serialization.Model): + """Copy progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar storage_account_name: Name of the storage account. This will be empty for data account + types other than storage account. + :vartype storage_account_name: str + :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", + "ExportFromAzure". + :vartype transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :ivar account_id: Id of the account where the data needs to be uploaded. + :vartype account_id: str + :ivar bytes_processed: To indicate bytes transferred. + :vartype bytes_processed: long + :ivar total_bytes_to_process: Total amount of data to be processed by the job. + :vartype total_bytes_to_process: long + :ivar files_processed: Number of files processed. + :vartype files_processed: long + :ivar total_files_to_process: Total files to process. + :vartype total_files_to_process: long + :ivar invalid_files_processed: Number of files not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype invalid_files_processed: long + :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to azure naming + conventions which were processed by automatic renaming. + :vartype invalid_file_bytes_uploaded: long + :ivar renamed_container_count: Number of folders not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype renamed_container_count: long + :ivar files_errored_out: Number of files which could not be copied. + :vartype files_errored_out: long + :ivar directories_errored_out: To indicate directories errored out in the job. + :vartype directories_errored_out: long + :ivar invalid_directories_processed: To indicate directories renamed. + :vartype invalid_directories_processed: long + :ivar is_enumeration_in_progress: To indicate if enumeration of data is in progress. + Until this is true, the TotalBytesToProcess may not be valid. + :vartype is_enumeration_in_progress: bool + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'transfer_type': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_processed': {'readonly': True}, + 'total_bytes_to_process': {'readonly': True}, + 'files_processed': {'readonly': True}, + 'total_files_to_process': {'readonly': True}, + 'invalid_files_processed': {'readonly': True}, + 'invalid_file_bytes_uploaded': {'readonly': True}, + 'renamed_container_count': {'readonly': True}, + 'files_errored_out': {'readonly': True}, + 'directories_errored_out': {'readonly': True}, + 'invalid_directories_processed': {'readonly': True}, + 'is_enumeration_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'bytes_processed': {'key': 'bytesProcessed', 'type': 'long'}, + 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, + 'files_processed': {'key': 'filesProcessed', 'type': 'long'}, + 'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'}, + 'invalid_files_processed': {'key': 'invalidFilesProcessed', 'type': 'long'}, + 'invalid_file_bytes_uploaded': {'key': 'invalidFileBytesUploaded', 'type': 'long'}, + 'renamed_container_count': {'key': 'renamedContainerCount', 'type': 'long'}, + 'files_errored_out': {'key': 'filesErroredOut', 'type': 'long'}, + 'directories_errored_out': {'key': 'directoriesErroredOut', 'type': 'long'}, + 'invalid_directories_processed': {'key': 'invalidDirectoriesProcessed', 'type': 'long'}, + 'is_enumeration_in_progress': {'key': 'isEnumerationInProgress', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CopyProgress, self).__init__(**kwargs) + self.storage_account_name = None + self.transfer_type = None + self.data_account_type = None + self.account_id = None + self.bytes_processed = None + self.total_bytes_to_process = None + self.files_processed = None + self.total_files_to_process = None + self.invalid_files_processed = None + self.invalid_file_bytes_uploaded = None + self.renamed_container_count = None + self.files_errored_out = None + self.directories_errored_out = None + self.invalid_directories_processed = None + self.is_enumeration_in_progress = None + + +class ValidationRequest(msrest.serialization.Model): + """Minimum request requirement of any validation category. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CreateJobValidations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + _subtype_map = { + 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationRequest, self).__init__(**kwargs) + self.validation_category = None # type: Optional[str] + self.individual_request_details = kwargs['individual_request_details'] + + +class CreateJobValidations(ValidationRequest): + """It does all pre-job creation validations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateJobValidations, self).__init__(**kwargs) + self.validation_category = 'JobCreationValidation' # type: str + + +class ValidationInputRequest(msrest.serialization.Model): + """Minimum fields that must be present in any type of validation request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ValidateAddress, CreateOrderLimitForSubscriptionValidationRequest, DataTransferDetailsValidationRequest, PreferencesValidationRequest, SkuAvailabilityValidationRequest, SubscriptionIsAllowedToCreateJobValidationRequest. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'ValidateAddress', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputRequest, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + + +class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): + """Request to validate create order limit for current subscription. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type device_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.device_type = kwargs['device_type'] + + +class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInputResponse): + """Properties of create order limit for subscription validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar status: Create order limit validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.status = None + + +class JobSecrets(msrest.serialization.Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataboxJobSecrets, CustomerDiskJobSecrets, DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type job_secrets_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: + ~azure.mgmt.databox.v2021_08_01_preview.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBox': 'DataboxJobSecrets', 'DataBoxCustomerDisk': 'CustomerDiskJobSecrets', 'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets'} + } + + def __init__( + self, + **kwargs + ): + super(JobSecrets, self).__init__(**kwargs) + self.job_secrets_type = None # type: Optional[str] + self.dc_access_security_code = None + self.error = None + + +class CustomerDiskJobSecrets(JobSecrets): + """The secrets related to customer disk job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type job_secrets_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: + ~azure.mgmt.databox.v2021_08_01_preview.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.v2021_08_01_preview.models.DiskSecret] + :ivar carrier_account_number: Carrier Account Number of the customer. + :vartype carrier_account_number: str + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'disk_secrets': {'readonly': True}, + 'carrier_account_number': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'carrier_account_number': {'key': 'carrierAccountNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomerDiskJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxCustomerDisk' # type: str + self.disk_secrets = None + self.carrier_account_number = None + + +class DataAccountDetails(msrest.serialization.Model): + """Account details of the data to be transferred. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedDiskDetails, StorageAccountDetails. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + } + + _subtype_map = { + 'data_account_type': {'ManagedDisk': 'ManagedDiskDetails', 'StorageAccount': 'StorageAccountDetails'} + } + + def __init__( + self, + **kwargs + ): + super(DataAccountDetails, self).__init__(**kwargs) + self.data_account_type = None # type: Optional[str] + self.share_password = kwargs.get('share_password', None) + + +class DataBoxAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account of a DataBox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type copy_log_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: str + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when + LogCollectionLevel is set to Verbose. + :vartype copy_verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': 'str'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBox' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxCustomerDiskCopyLogDetails(CopyLogDetails): + """Copy Log Details for customer disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type copy_log_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar serial_number: Disk Serial Number. + :vartype serial_number: str + :ivar error_log_link: Link for copy error logs. + :vartype error_log_link: str + :ivar verbose_log_link: Link for copy verbose logs. + :vartype verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'serial_number': {'readonly': True}, + 'error_log_link': {'readonly': True}, + 'verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'error_log_link': {'key': 'errorLogLink', 'type': 'str'}, + 'verbose_log_link': {'key': 'verboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxCustomerDiskCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxCustomerDisk' # type: str + self.serial_number = None + self.error_log_link = None + self.verbose_log_link = None + + +class DataBoxCustomerDiskCopyProgress(CopyProgress): + """DataBox CustomerDisk Copy Progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar storage_account_name: Name of the storage account. This will be empty for data account + types other than storage account. + :vartype storage_account_name: str + :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", + "ExportFromAzure". + :vartype transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :ivar account_id: Id of the account where the data needs to be uploaded. + :vartype account_id: str + :ivar bytes_processed: To indicate bytes transferred. + :vartype bytes_processed: long + :ivar total_bytes_to_process: Total amount of data to be processed by the job. + :vartype total_bytes_to_process: long + :ivar files_processed: Number of files processed. + :vartype files_processed: long + :ivar total_files_to_process: Total files to process. + :vartype total_files_to_process: long + :ivar invalid_files_processed: Number of files not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype invalid_files_processed: long + :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to azure naming + conventions which were processed by automatic renaming. + :vartype invalid_file_bytes_uploaded: long + :ivar renamed_container_count: Number of folders not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype renamed_container_count: long + :ivar files_errored_out: Number of files which could not be copied. + :vartype files_errored_out: long + :ivar directories_errored_out: To indicate directories errored out in the job. + :vartype directories_errored_out: long + :ivar invalid_directories_processed: To indicate directories renamed. + :vartype invalid_directories_processed: long + :ivar is_enumeration_in_progress: To indicate if enumeration of data is in progress. + Until this is true, the TotalBytesToProcess may not be valid. + :vartype is_enumeration_in_progress: bool + :ivar serial_number: Disk Serial Number. + :vartype serial_number: str + :ivar copy_status: The Status of the copy. Possible values include: "NotStarted", "InProgress", + "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", + "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData", + "DriveNotReceived", "UnsupportedDrive", "OtherServiceError", "OtherUserError", + "DriveNotDetected", "DriveCorrupted", "MetadataFilesModifiedOrRemoved". + :vartype copy_status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.CopyStatus + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'transfer_type': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_processed': {'readonly': True}, + 'total_bytes_to_process': {'readonly': True}, + 'files_processed': {'readonly': True}, + 'total_files_to_process': {'readonly': True}, + 'invalid_files_processed': {'readonly': True}, + 'invalid_file_bytes_uploaded': {'readonly': True}, + 'renamed_container_count': {'readonly': True}, + 'files_errored_out': {'readonly': True}, + 'directories_errored_out': {'readonly': True}, + 'invalid_directories_processed': {'readonly': True}, + 'is_enumeration_in_progress': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'copy_status': {'readonly': True}, + } + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'bytes_processed': {'key': 'bytesProcessed', 'type': 'long'}, + 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, + 'files_processed': {'key': 'filesProcessed', 'type': 'long'}, + 'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'}, + 'invalid_files_processed': {'key': 'invalidFilesProcessed', 'type': 'long'}, + 'invalid_file_bytes_uploaded': {'key': 'invalidFileBytesUploaded', 'type': 'long'}, + 'renamed_container_count': {'key': 'renamedContainerCount', 'type': 'long'}, + 'files_errored_out': {'key': 'filesErroredOut', 'type': 'long'}, + 'directories_errored_out': {'key': 'directoriesErroredOut', 'type': 'long'}, + 'invalid_directories_processed': {'key': 'invalidDirectoriesProcessed', 'type': 'long'}, + 'is_enumeration_in_progress': {'key': 'isEnumerationInProgress', 'type': 'bool'}, + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'copy_status': {'key': 'copyStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxCustomerDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.copy_status = None + + +class JobDetails(msrest.serialization.Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxJobDetails, DataBoxCustomerDiskJobDetails, DataBoxDiskJobDetails, DataBoxHeavyJobDetails. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type job_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_08_01_preview.models.LastMitigationActionOnJob + :ivar datacenter_address: Datacenter address to ship to, for the given sku and storage + location. + :vartype datacenter_address: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + :ivar data_center_code: DataCenter code. Possible values include: "Invalid", "BY2", "BY1", + "ORK70", "AM2", "AMS20", "BY21", "BY24", "MWH01", "AMS06", "SSE90", "SYD03", "SYD23", "CBR20", + "YTO20", "CWL20", "LON24", "BOM01", "BL20", "BL7", "SEL20", "TYO01", "BN1", "SN5", "CYS04", + "TYO22", "YTO21", "YQB20", "FRA22", "MAA01", "CPQ02", "CPQ20", "SIN20", "HKG20", "SG2", + "MEL23", "SEL21", "OSA20", "SHA03", "BJB", "JNB22", "JNB21", "MNZ21", "SN8", "AUH20", "ZRH20", + "PUS20", "AdHoc", "CH1", "DSM05". + :vartype data_center_code: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataCenterCode + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'datacenter_address': {'readonly': True}, + 'data_center_code': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'datacenter_address': {'key': 'datacenterAddress', 'type': 'DatacenterAddressResponse'}, + 'data_center_code': {'key': 'dataCenterCode', 'type': 'str'}, + } + + _subtype_map = { + 'job_details_type': {'DataBox': 'DataBoxJobDetails', 'DataBoxCustomerDisk': 'DataBoxCustomerDiskJobDetails', 'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails'} + } + + def __init__( + self, + **kwargs + ): + super(JobDetails, self).__init__(**kwargs) + self.job_stages = None + self.contact_details = kwargs['contact_details'] + self.shipping_address = kwargs.get('shipping_address', None) + self.delivery_package = None + self.return_package = None + self.data_import_details = kwargs.get('data_import_details', None) + self.data_export_details = kwargs.get('data_export_details', None) + self.job_details_type = None # type: Optional[str] + self.preferences = kwargs.get('preferences', None) + self.copy_log_details = None + self.reverse_shipment_label_sas_key = None + self.chain_of_custody_sas_key = None + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.expected_data_size_in_tera_bytes = kwargs.get('expected_data_size_in_tera_bytes', None) + self.actions = None + self.last_mitigation_action_on_job = None + self.datacenter_address = None + self.data_center_code = None + + +class DataBoxCustomerDiskJobDetails(JobDetails): + """Customer disk job details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type job_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_08_01_preview.models.LastMitigationActionOnJob + :ivar datacenter_address: Datacenter address to ship to, for the given sku and storage + location. + :vartype datacenter_address: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + :ivar data_center_code: DataCenter code. Possible values include: "Invalid", "BY2", "BY1", + "ORK70", "AM2", "AMS20", "BY21", "BY24", "MWH01", "AMS06", "SSE90", "SYD03", "SYD23", "CBR20", + "YTO20", "CWL20", "LON24", "BOM01", "BL20", "BL7", "SEL20", "TYO01", "BN1", "SN5", "CYS04", + "TYO22", "YTO21", "YQB20", "FRA22", "MAA01", "CPQ02", "CPQ20", "SIN20", "HKG20", "SG2", + "MEL23", "SEL21", "OSA20", "SHA03", "BJB", "JNB22", "JNB21", "MNZ21", "SN8", "AUH20", "ZRH20", + "PUS20", "AdHoc", "CH1", "DSM05". + :vartype data_center_code: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataCenterCode + :param import_disk_details_collection: Contains the map of disk serial number to the disk + details for import jobs. + :type import_disk_details_collection: dict[str, + ~azure.mgmt.databox.v2021_08_01_preview.models.ImportDiskDetails] + :ivar export_disk_details_collection: Contains the map of disk serial number to the disk + details for export jobs. + :vartype export_disk_details_collection: dict[str, + ~azure.mgmt.databox.v2021_08_01_preview.models.ExportDiskDetails] + :ivar copy_progress: Copy progress per disk. + :vartype copy_progress: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataBoxCustomerDiskCopyProgress] + :ivar deliver_to_dc_package_details: Delivery package shipping details. + :vartype deliver_to_dc_package_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageCarrierInfo + :param return_to_customer_package_details: Required. Return package shipping details. + :type return_to_customer_package_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageCarrierDetails + :param enable_manifest_backup: Flag to indicate if disk manifest should be backed-up in the + Storage Account. + :type enable_manifest_backup: bool + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'datacenter_address': {'readonly': True}, + 'data_center_code': {'readonly': True}, + 'export_disk_details_collection': {'readonly': True}, + 'copy_progress': {'readonly': True}, + 'deliver_to_dc_package_details': {'readonly': True}, + 'return_to_customer_package_details': {'required': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'datacenter_address': {'key': 'datacenterAddress', 'type': 'DatacenterAddressResponse'}, + 'data_center_code': {'key': 'dataCenterCode', 'type': 'str'}, + 'import_disk_details_collection': {'key': 'importDiskDetailsCollection', 'type': '{ImportDiskDetails}'}, + 'export_disk_details_collection': {'key': 'exportDiskDetailsCollection', 'type': '{ExportDiskDetails}'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxCustomerDiskCopyProgress]'}, + 'deliver_to_dc_package_details': {'key': 'deliverToDcPackageDetails', 'type': 'PackageCarrierInfo'}, + 'return_to_customer_package_details': {'key': 'returnToCustomerPackageDetails', 'type': 'PackageCarrierDetails'}, + 'enable_manifest_backup': {'key': 'enableManifestBackup', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxCustomerDiskJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBoxCustomerDisk' # type: str + self.import_disk_details_collection = kwargs.get('import_disk_details_collection', None) + self.export_disk_details_collection = None + self.copy_progress = None + self.deliver_to_dc_package_details = None + self.return_to_customer_package_details = kwargs['return_to_customer_package_details'] + self.enable_manifest_backup = kwargs.get('enable_manifest_backup', False) + + +class DataBoxDiskCopyLogDetails(CopyLogDetails): + """Copy Log Details for a disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type copy_log_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar disk_serial_number: Disk Serial Number. + :vartype disk_serial_number: str + :ivar error_log_link: Link for copy error logs. + :vartype error_log_link: str + :ivar verbose_log_link: Link for copy verbose logs. + :vartype verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'disk_serial_number': {'readonly': True}, + 'error_log_link': {'readonly': True}, + 'verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'error_log_link': {'key': 'errorLogLink', 'type': 'str'}, + 'verbose_log_link': {'key': 'verboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxDisk' # type: str + self.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + + +class DataBoxDiskCopyProgress(msrest.serialization.Model): + """DataBox Disk Copy Progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar serial_number: The serial number of the disk. + :vartype serial_number: str + :ivar bytes_copied: Bytes copied during the copy of disk. + :vartype bytes_copied: long + :ivar percent_complete: Indicates the percentage completed for the copy of the disk. + :vartype percent_complete: int + :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", + "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", + "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData", + "DriveNotReceived", "UnsupportedDrive", "OtherServiceError", "OtherUserError", + "DriveNotDetected", "DriveCorrupted", "MetadataFilesModifiedOrRemoved". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.CopyStatus + """ + + _validation = { + 'serial_number': {'readonly': True}, + 'bytes_copied': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.bytes_copied = None + self.percent_complete = None + self.status = None + + +class DataBoxDiskJobDetails(JobDetails): + """DataBox Disk Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type job_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_08_01_preview.models.LastMitigationActionOnJob + :ivar datacenter_address: Datacenter address to ship to, for the given sku and storage + location. + :vartype datacenter_address: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + :ivar data_center_code: DataCenter code. Possible values include: "Invalid", "BY2", "BY1", + "ORK70", "AM2", "AMS20", "BY21", "BY24", "MWH01", "AMS06", "SSE90", "SYD03", "SYD23", "CBR20", + "YTO20", "CWL20", "LON24", "BOM01", "BL20", "BL7", "SEL20", "TYO01", "BN1", "SN5", "CYS04", + "TYO22", "YTO21", "YQB20", "FRA22", "MAA01", "CPQ02", "CPQ20", "SIN20", "HKG20", "SG2", + "MEL23", "SEL21", "OSA20", "SHA03", "BJB", "JNB22", "JNB21", "MNZ21", "SN8", "AUH20", "ZRH20", + "PUS20", "AdHoc", "CH1", "DSM05". + :vartype data_center_code: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataCenterCode + :param preferred_disks: User preference on what size disks are needed for the job. The map is + from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but + will be checked against an int. + :type preferred_disks: dict[str, int] + :ivar copy_progress: Copy progress per disk. + :vartype copy_progress: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataBoxDiskCopyProgress] + :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being + used for the job. Is returned only after the disks are shipped to the customer. + :vartype disks_and_size_details: dict[str, int] + :param passkey: User entered passkey for DataBox Disk job. + :type passkey: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'datacenter_address': {'readonly': True}, + 'data_center_code': {'readonly': True}, + 'copy_progress': {'readonly': True}, + 'disks_and_size_details': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'datacenter_address': {'key': 'datacenterAddress', 'type': 'DatacenterAddressResponse'}, + 'data_center_code': {'key': 'dataCenterCode', 'type': 'str'}, + 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, + 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, + 'passkey': {'key': 'passkey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBoxDisk' # type: str + self.preferred_disks = kwargs.get('preferred_disks', None) + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = kwargs.get('passkey', None) + + +class DataBoxDiskJobSecrets(JobSecrets): + """The secrets related to disk job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type job_secrets_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: + ~azure.mgmt.databox.v2021_08_01_preview.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.v2021_08_01_preview.models.DiskSecret] + :ivar pass_key: PassKey for the disk Job. + :vartype pass_key: str + :ivar is_passkey_user_defined: Whether passkey was provided by user. + :vartype is_passkey_user_defined: bool + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'pass_key': {'key': 'passKey', 'type': 'str'}, + 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxDisk' # type: str + self.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + + +class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account for Databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type copy_log_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: list[str] + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when the + LogCollectionLevel is set to verbose. + :vartype copy_verbose_log_link: list[str] + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': '[str]'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxHeavy' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxHeavyJobDetails(JobDetails): + """Databox Heavy Device Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type job_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_08_01_preview.models.LastMitigationActionOnJob + :ivar datacenter_address: Datacenter address to ship to, for the given sku and storage + location. + :vartype datacenter_address: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + :ivar data_center_code: DataCenter code. Possible values include: "Invalid", "BY2", "BY1", + "ORK70", "AM2", "AMS20", "BY21", "BY24", "MWH01", "AMS06", "SSE90", "SYD03", "SYD23", "CBR20", + "YTO20", "CWL20", "LON24", "BOM01", "BL20", "BL7", "SEL20", "TYO01", "BN1", "SN5", "CYS04", + "TYO22", "YTO21", "YQB20", "FRA22", "MAA01", "CPQ02", "CPQ20", "SIN20", "HKG20", "SG2", + "MEL23", "SEL21", "OSA20", "SHA03", "BJB", "JNB22", "JNB21", "MNZ21", "SN8", "AUH20", "ZRH20", + "PUS20", "AdHoc", "CH1", "DSM05". + :vartype data_center_code: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataCenterCode + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox Heavy. Should not be passed + for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'datacenter_address': {'readonly': True}, + 'data_center_code': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'datacenter_address': {'key': 'datacenterAddress', 'type': 'DatacenterAddressResponse'}, + 'data_center_code': {'key': 'dataCenterCode', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBoxHeavy' # type: str + self.copy_progress = None + self.device_password = kwargs.get('device_password', None) + + +class DataBoxHeavyJobSecrets(JobSecrets): + """The secrets related to a databox heavy job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type job_secrets_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: + ~azure.mgmt.databox.v2021_08_01_preview.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. + :vartype cabinet_pod_secrets: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataBoxHeavySecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxHeavy' # type: str + self.cabinet_pod_secrets = None + + +class DataBoxHeavySecret(msrest.serialization.Model): + """The secrets related to a databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavySecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DataBoxJobDetails(JobDetails): + """Databox Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type job_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_08_01_preview.models.LastMitigationActionOnJob + :ivar datacenter_address: Datacenter address to ship to, for the given sku and storage + location. + :vartype datacenter_address: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + :ivar data_center_code: DataCenter code. Possible values include: "Invalid", "BY2", "BY1", + "ORK70", "AM2", "AMS20", "BY21", "BY24", "MWH01", "AMS06", "SSE90", "SYD03", "SYD23", "CBR20", + "YTO20", "CWL20", "LON24", "BOM01", "BL20", "BL7", "SEL20", "TYO01", "BN1", "SN5", "CYS04", + "TYO22", "YTO21", "YQB20", "FRA22", "MAA01", "CPQ02", "CPQ20", "SIN20", "HKG20", "SG2", + "MEL23", "SEL21", "OSA20", "SHA03", "BJB", "JNB22", "JNB21", "MNZ21", "SN8", "AUH20", "ZRH20", + "PUS20", "AdHoc", "CH1", "DSM05". + :vartype data_center_code: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataCenterCode + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox. Should not be passed for + TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password + itself. This will not be returned in Get Call. Password Requirements : Password must be + minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, + one number and one special character. Password cannot have the following characters : IilLoO0 + Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'datacenter_address': {'readonly': True}, + 'data_center_code': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'datacenter_address': {'key': 'datacenterAddress', 'type': 'DatacenterAddressResponse'}, + 'data_center_code': {'key': 'dataCenterCode', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxJobDetails, self).__init__(**kwargs) + self.job_details_type = 'DataBox' # type: str + self.copy_progress = None + self.device_password = kwargs.get('device_password', None) + + +class DataboxJobSecrets(JobSecrets): + """The secrets related to a databox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type job_secrets_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: + ~azure.mgmt.databox.v2021_08_01_preview.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.v2021_08_01_preview.models.DataBoxSecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataboxJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBox' # type: str + self.pod_secrets = kwargs.get('pod_secrets', None) + + +class ScheduleAvailabilityRequest(msrest.serialization.Model): + """Request body to get the availability for scheduling orders. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxScheduleAvailabilityRequest, DiskScheduleAvailabilityRequest, HeavyScheduleAvailabilityRequest. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + _subtype_map = { + 'sku_name': {'DataBox': 'DataBoxScheduleAvailabilityRequest', 'DataBoxDisk': 'DiskScheduleAvailabilityRequest', 'DataBoxHeavy': 'HeavyScheduleAvailabilityRequest'} + } + + def __init__( + self, + **kwargs + ): + super(ScheduleAvailabilityRequest, self).__init__(**kwargs) + self.storage_location = kwargs['storage_location'] + self.sku_name = None # type: Optional[str] + self.country = kwargs.get('country', None) + + +class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling data box orders orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBox' # type: str + + +class DataBoxSecret(msrest.serialization.Model): + """The secrets related to a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxSecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DatacenterAddressResponse(msrest.serialization.Model): + """Datacenter address for given storage location. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DatacenterAddressInstructionResponse, DatacenterAddressLocationResponse. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param datacenter_address_type: Required. Data center address type.Constant filled by server. + Possible values include: "DatacenterAddressLocation", "DatacenterAddressInstruction". + :type datacenter_address_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressType + :ivar supported_carriers_for_return_shipment: List of supported carriers for return shipment. + :vartype supported_carriers_for_return_shipment: list[str] + :ivar data_center_azure_location: Azure Location where the Data Center serves primarily. + :vartype data_center_azure_location: str + """ + + _validation = { + 'datacenter_address_type': {'required': True}, + 'supported_carriers_for_return_shipment': {'readonly': True}, + 'data_center_azure_location': {'readonly': True}, + } + + _attribute_map = { + 'datacenter_address_type': {'key': 'datacenterAddressType', 'type': 'str'}, + 'supported_carriers_for_return_shipment': {'key': 'supportedCarriersForReturnShipment', 'type': '[str]'}, + 'data_center_azure_location': {'key': 'dataCenterAzureLocation', 'type': 'str'}, + } + + _subtype_map = { + 'datacenter_address_type': {'DatacenterAddressInstruction': 'DatacenterAddressInstructionResponse', 'DatacenterAddressLocation': 'DatacenterAddressLocationResponse'} + } + + def __init__( + self, + **kwargs + ): + super(DatacenterAddressResponse, self).__init__(**kwargs) + self.datacenter_address_type = None # type: Optional[str] + self.supported_carriers_for_return_shipment = None + self.data_center_azure_location = None + + +class DatacenterAddressInstructionResponse(DatacenterAddressResponse): + """Datacenter instruction for given storage location. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param datacenter_address_type: Required. Data center address type.Constant filled by server. + Possible values include: "DatacenterAddressLocation", "DatacenterAddressInstruction". + :type datacenter_address_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressType + :ivar supported_carriers_for_return_shipment: List of supported carriers for return shipment. + :vartype supported_carriers_for_return_shipment: list[str] + :ivar data_center_azure_location: Azure Location where the Data Center serves primarily. + :vartype data_center_azure_location: str + :ivar communication_instruction: Data center communication instruction. + :vartype communication_instruction: str + """ + + _validation = { + 'datacenter_address_type': {'required': True}, + 'supported_carriers_for_return_shipment': {'readonly': True}, + 'data_center_azure_location': {'readonly': True}, + 'communication_instruction': {'readonly': True}, + } + + _attribute_map = { + 'datacenter_address_type': {'key': 'datacenterAddressType', 'type': 'str'}, + 'supported_carriers_for_return_shipment': {'key': 'supportedCarriersForReturnShipment', 'type': '[str]'}, + 'data_center_azure_location': {'key': 'dataCenterAzureLocation', 'type': 'str'}, + 'communication_instruction': {'key': 'communicationInstruction', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatacenterAddressInstructionResponse, self).__init__(**kwargs) + self.datacenter_address_type = 'DatacenterAddressInstruction' # type: str + self.communication_instruction = None + + +class DatacenterAddressLocationResponse(DatacenterAddressResponse): + """Datacenter address for given storage location. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param datacenter_address_type: Required. Data center address type.Constant filled by server. + Possible values include: "DatacenterAddressLocation", "DatacenterAddressInstruction". + :type datacenter_address_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressType + :ivar supported_carriers_for_return_shipment: List of supported carriers for return shipment. + :vartype supported_carriers_for_return_shipment: list[str] + :ivar data_center_azure_location: Azure Location where the Data Center serves primarily. + :vartype data_center_azure_location: str + :ivar contact_person_name: Contact person name. + :vartype contact_person_name: str + :ivar company: Company name. + :vartype company: str + :ivar street1: Street address line 1. + :vartype street1: str + :ivar street2: Street address line 2. + :vartype street2: str + :ivar street3: Street address line 3. + :vartype street3: str + :ivar city: City name. + :vartype city: str + :ivar state: name of the state. + :vartype state: str + :ivar zip: Zip code. + :vartype zip: str + :ivar country: name of the country. + :vartype country: str + :ivar phone: Phone number. + :vartype phone: str + :ivar phone_extension: Phone extension. + :vartype phone_extension: str + :ivar address_type: Address type. + :vartype address_type: str + :ivar additional_shipping_information: Special instruction for shipping. + :vartype additional_shipping_information: str + """ + + _validation = { + 'datacenter_address_type': {'required': True}, + 'supported_carriers_for_return_shipment': {'readonly': True}, + 'data_center_azure_location': {'readonly': True}, + 'contact_person_name': {'readonly': True}, + 'company': {'readonly': True}, + 'street1': {'readonly': True}, + 'street2': {'readonly': True}, + 'street3': {'readonly': True}, + 'city': {'readonly': True}, + 'state': {'readonly': True}, + 'zip': {'readonly': True}, + 'country': {'readonly': True}, + 'phone': {'readonly': True}, + 'phone_extension': {'readonly': True}, + 'address_type': {'readonly': True}, + 'additional_shipping_information': {'readonly': True}, + } + + _attribute_map = { + 'datacenter_address_type': {'key': 'datacenterAddressType', 'type': 'str'}, + 'supported_carriers_for_return_shipment': {'key': 'supportedCarriersForReturnShipment', 'type': '[str]'}, + 'data_center_azure_location': {'key': 'dataCenterAzureLocation', 'type': 'str'}, + 'contact_person_name': {'key': 'contactPersonName', 'type': 'str'}, + 'company': {'key': 'company', 'type': 'str'}, + 'street1': {'key': 'street1', 'type': 'str'}, + 'street2': {'key': 'street2', 'type': 'str'}, + 'street3': {'key': 'street3', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'zip': {'key': 'zip', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'phone_extension': {'key': 'phoneExtension', 'type': 'str'}, + 'address_type': {'key': 'addressType', 'type': 'str'}, + 'additional_shipping_information': {'key': 'additionalShippingInformation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatacenterAddressLocationResponse, self).__init__(**kwargs) + self.datacenter_address_type = 'DatacenterAddressLocation' # type: str + self.contact_person_name = None + self.company = None + self.street1 = None + self.street2 = None + self.street3 = None + self.city = None + self.state = None + self.zip = None + self.country = None + self.phone = None + self.phone_extension = None + self.address_type = None + self.additional_shipping_information = None + + +class DatacenterAddressRequest(msrest.serialization.Model): + """Request body to get the datacenter address. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Storage location. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the data center address requested. Possible + values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatacenterAddressRequest, self).__init__(**kwargs) + self.storage_location = kwargs['storage_location'] + self.sku_name = kwargs['sku_name'] + + +class DataExportDetails(msrest.serialization.Model): + """Details of the data to be used for exporting data from azure. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration: Required. Configuration for the data transfer. + :type transfer_configuration: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransferConfiguration + :param log_collection_level: Level of the logs to be collected. Possible values include: + "Error", "Verbose". Default value: "Error". + :type log_collection_level: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.LogCollectionLevel + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountDetails + """ + + _validation = { + 'transfer_configuration': {'required': True}, + 'account_details': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration': {'key': 'transferConfiguration', 'type': 'TransferConfiguration'}, + 'log_collection_level': {'key': 'logCollectionLevel', 'type': 'str'}, + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(DataExportDetails, self).__init__(**kwargs) + self.transfer_configuration = kwargs['transfer_configuration'] + self.log_collection_level = kwargs.get('log_collection_level', "Error") + self.account_details = kwargs['account_details'] + + +class DataImportDetails(msrest.serialization.Model): + """Details of the data to be used for importing data to azure. + + All required parameters must be populated in order to send to Azure. + + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountDetails + """ + + _validation = { + 'account_details': {'required': True}, + } + + _attribute_map = { + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(DataImportDetails, self).__init__(**kwargs) + self.account_details = kwargs['account_details'] + + +class DataLocationToServiceLocationMap(msrest.serialization.Model): + """Map of data location to service location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar data_location: Location of the data. + :vartype data_location: str + :ivar service_location: Location of the service. + :vartype service_location: str + """ + + _validation = { + 'data_location': {'readonly': True}, + 'service_location': {'readonly': True}, + } + + _attribute_map = { + 'data_location': {'key': 'dataLocation', 'type': 'str'}, + 'service_location': {'key': 'serviceLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataLocationToServiceLocationMap, self).__init__(**kwargs) + self.data_location = None + self.service_location = None + + +class DataTransferDetailsValidationRequest(ValidationInputRequest): + """Request to validate export and import data details. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :param data_export_details: List of DataTransfer details to be used to export data from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param data_import_details: List of DataTransfer details to be used to import data to azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param device_type: Required. Device type. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy", "DataBoxCustomerDisk". + :type device_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTransferDetailsValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.data_export_details = kwargs.get('data_export_details', None) + self.data_import_details = kwargs.get('data_import_details', None) + self.device_type = kwargs['device_type'] + self.transfer_type = kwargs['transfer_type'] + + +class DataTransferDetailsValidationResponseProperties(ValidationInputResponse): + """Properties of data transfer details validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar status: Data transfer details validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTransferDetailsValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.status = None + + +class DcAccessSecurityCode(msrest.serialization.Model): + """Dc access security code. + + :param reverse_dc_access_code: Reverse Dc access security code. + :type reverse_dc_access_code: str + :param forward_dc_access_code: Forward Dc access security code. + :type forward_dc_access_code: str + """ + + _attribute_map = { + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DcAccessSecurityCode, self).__init__(**kwargs) + self.reverse_dc_access_code = kwargs.get('reverse_dc_access_code', None) + self.forward_dc_access_code = kwargs.get('forward_dc_access_code', None) + + +class Details(msrest.serialization.Model): + """Details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Details, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + + +class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling disk orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBoxDisk' # type: str + self.expected_data_size_in_tera_bytes = kwargs['expected_data_size_in_tera_bytes'] + + +class DiskSecret(msrest.serialization.Model): + """Contains all the secrets of a Disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar disk_serial_number: Serial number of the assigned disk. + :vartype disk_serial_number: str + :ivar bit_locker_key: Bit Locker key of the disk which can be used to unlock the disk to copy + data. + :vartype bit_locker_key: str + """ + + _validation = { + 'disk_serial_number': {'readonly': True}, + 'bit_locker_key': {'readonly': True}, + } + + _attribute_map = { + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskSecret, self).__init__(**kwargs) + self.disk_serial_number = None + self.bit_locker_key = None + + +class EncryptionPreferences(msrest.serialization.Model): + """Preferences related to the Encryption. + + :param double_encryption: Defines secondary layer of software-based encryption enablement. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type double_encryption: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DoubleEncryption + """ + + _attribute_map = { + 'double_encryption': {'key': 'doubleEncryption', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EncryptionPreferences, self).__init__(**kwargs) + self.double_encryption = kwargs.get('double_encryption', "Disabled") + + +class ErrorDetail(msrest.serialization.Model): + """ErrorDetail. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + :param details: + :type details: list[~azure.mgmt.databox.v2021_08_01_preview.models.Details] + :param target: + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Details]'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.details = kwargs.get('details', None) + self.target = kwargs.get('target', None) + + +class ExportDiskDetails(msrest.serialization.Model): + """Export disk details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar manifest_file: The relative path of the manifest file on the disk. + :vartype manifest_file: str + :ivar manifest_hash: The Base16-encoded MD5 hash of the manifest file on the disk. + :vartype manifest_hash: str + :ivar backup_manifest_cloud_path: Path to backed up manifest, only returned if + enableManifestBackup is true. + :vartype backup_manifest_cloud_path: str + """ + + _validation = { + 'manifest_file': {'readonly': True}, + 'manifest_hash': {'readonly': True}, + 'backup_manifest_cloud_path': {'readonly': True}, + } + + _attribute_map = { + 'manifest_file': {'key': 'manifestFile', 'type': 'str'}, + 'manifest_hash': {'key': 'manifestHash', 'type': 'str'}, + 'backup_manifest_cloud_path': {'key': 'backupManifestCloudPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExportDiskDetails, self).__init__(**kwargs) + self.manifest_file = None + self.manifest_hash = None + self.backup_manifest_cloud_path = None + + +class FilterFileDetails(msrest.serialization.Model): + """Details of the filter files to be used for data transfer. + + All required parameters must be populated in order to send to Azure. + + :param filter_file_type: Required. Type of the filter file. Possible values include: + "AzureBlob", "AzureFile". + :type filter_file_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.FilterFileType + :param filter_file_path: Required. Path of the file that contains the details of all items to + transfer. + :type filter_file_path: str + """ + + _validation = { + 'filter_file_type': {'required': True}, + 'filter_file_path': {'required': True}, + } + + _attribute_map = { + 'filter_file_type': {'key': 'filterFileType', 'type': 'str'}, + 'filter_file_path': {'key': 'filterFilePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FilterFileDetails, self).__init__(**kwargs) + self.filter_file_type = kwargs['filter_file_type'] + self.filter_file_path = kwargs['filter_file_path'] + + +class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling heavy orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HeavyScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBoxHeavy' # type: str + + +class IdentityProperties(msrest.serialization.Model): + """Managed identity properties. + + :param type: Managed service identity type. + :type type: str + :param user_assigned: User assigned identity properties. + :type user_assigned: ~azure.mgmt.databox.v2021_08_01_preview.models.UserAssignedProperties + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned': {'key': 'userAssigned', 'type': 'UserAssignedProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(IdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.user_assigned = kwargs.get('user_assigned', None) + + +class ImportDiskDetails(msrest.serialization.Model): + """Import disk details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param manifest_file: Required. The relative path of the manifest file on the disk. + :type manifest_file: str + :param manifest_hash: Required. The Base16-encoded MD5 hash of the manifest file on the disk. + :type manifest_hash: str + :param bit_locker_key: Required. BitLocker key used to encrypt the disk. + :type bit_locker_key: str + :ivar backup_manifest_cloud_path: Path to backed up manifest, only returned if + enableManifestBackup is true. + :vartype backup_manifest_cloud_path: str + """ + + _validation = { + 'manifest_file': {'required': True}, + 'manifest_hash': {'required': True}, + 'bit_locker_key': {'required': True}, + 'backup_manifest_cloud_path': {'readonly': True}, + } + + _attribute_map = { + 'manifest_file': {'key': 'manifestFile', 'type': 'str'}, + 'manifest_hash': {'key': 'manifestHash', 'type': 'str'}, + 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, + 'backup_manifest_cloud_path': {'key': 'backupManifestCloudPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImportDiskDetails, self).__init__(**kwargs) + self.manifest_file = kwargs['manifest_file'] + self.manifest_hash = kwargs['manifest_hash'] + self.bit_locker_key = kwargs['bit_locker_key'] + self.backup_manifest_cloud_path = None + + +class JobDeliveryInfo(msrest.serialization.Model): + """Additional delivery info. + + :param scheduled_date_time: Scheduled date time. + :type scheduled_date_time: ~datetime.datetime + """ + + _attribute_map = { + 'scheduled_date_time': {'key': 'scheduledDateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(JobDeliveryInfo, self).__init__(**kwargs) + self.scheduled_date_time = kwargs.get('scheduled_date_time', None) + + +class Resource(msrest.serialization.Model): + """Model of the Resource. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_08_01_preview.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_08_01_preview.models.ResourceIdentity + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + self.sku = kwargs['sku'] + self.identity = kwargs.get('identity', None) + + +class JobResource(Resource): + """Job Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_08_01_preview.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_08_01_preview.models.ResourceIdentity + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.databox.v2021_08_01_preview.models.SystemData + :param transfer_type: Required. Type of the data transfer. Possible values include: + "ImportToAzure", "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + :ivar is_cancellable: Describes whether the job is cancellable or not. + :vartype is_cancellable: bool + :ivar is_deletable: Describes whether the job is deletable or not. + :vartype is_deletable: bool + :ivar is_shipping_address_editable: Describes whether the shipping address is editable or not. + :vartype is_shipping_address_editable: bool + :ivar is_prepare_to_ship_enabled: Is Prepare To Ship Enabled on this job. + :vartype is_prepare_to_ship_enabled: bool + :ivar status: Name of the stage which is in progress. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC", "Created", "ShippedToAzureDC", + "AwaitingShipmentDetails", "PreparingToShipFromAzureDC", "ShippedToCustomer". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :param details: Details of a job run. This field will only be sent for expand details filter. + :type details: ~azure.mgmt.databox.v2021_08_01_preview.models.JobDetails + :ivar cancellation_reason: Reason for cancellation. + :vartype cancellation_reason: str + :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.JobDeliveryType + :param delivery_info: Delivery Info of Job. + :type delivery_info: ~azure.mgmt.databox.v2021_08_01_preview.models.JobDeliveryInfo + :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. + :vartype is_cancellable_without_fee: bool + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'transfer_type': {'required': True}, + 'is_cancellable': {'readonly': True}, + 'is_deletable': {'readonly': True}, + 'is_shipping_address_editable': {'readonly': True}, + 'is_prepare_to_ship_enabled': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'error': {'readonly': True}, + 'cancellation_reason': {'readonly': True}, + 'is_cancellable_without_fee': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'transfer_type': {'key': 'properties.transferType', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, + 'is_shipping_address_editable': {'key': 'properties.isShippingAddressEditable', 'type': 'bool'}, + 'is_prepare_to_ship_enabled': {'key': 'properties.isPrepareToShipEnabled', 'type': 'bool'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'details': {'key': 'properties.details', 'type': 'JobDetails'}, + 'cancellation_reason': {'key': 'properties.cancellationReason', 'type': 'str'}, + 'delivery_type': {'key': 'properties.deliveryType', 'type': 'str'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, + 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(JobResource, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + self.system_data = None + self.transfer_type = kwargs['transfer_type'] + self.is_cancellable = None + self.is_deletable = None + self.is_shipping_address_editable = None + self.is_prepare_to_ship_enabled = None + self.status = None + self.start_time = None + self.error = None + self.details = kwargs.get('details', None) + self.cancellation_reason = None + self.delivery_type = kwargs.get('delivery_type', "NonScheduled") + self.delivery_info = kwargs.get('delivery_info', None) + self.is_cancellable_without_fee = None + + +class JobResourceList(msrest.serialization.Model): + """Job Resource Collection. + + :param value: List of job resources. + :type value: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobResource] + :param next_link: Link for the next set of job resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[JobResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(JobResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class JobResourceUpdateParameter(msrest.serialization.Model): + """The JobResourceUpdateParameter. + + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_08_01_preview.models.ResourceIdentity + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.v2021_08_01_preview.models.UpdateJobDetails + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.details = kwargs.get('details', None) + + +class JobStages(msrest.serialization.Model): + """Job stages. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar stage_name: Name of the job stage. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC", "Created", "ShippedToAzureDC", + "AwaitingShipmentDetails", "PreparingToShipFromAzureDC", "ShippedToCustomer". + :vartype stage_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.StageName + :ivar display_name: Display name of the job stage. + :vartype display_name: str + :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", + "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors", + "WaitingForCustomerAction", "SucceededWithWarnings", "WaitingForCustomerActionForKek", + "WaitingForCustomerActionForCleanUp", "CustomerActionPerformedForCleanUp". + :vartype stage_status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.StageStatus + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: ~datetime.datetime + :ivar job_stage_details: Job Stage Details. + :vartype job_stage_details: any + """ + + _validation = { + 'stage_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'stage_status': {'readonly': True}, + 'stage_time': {'readonly': True}, + 'job_stage_details': {'readonly': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'str'}, + 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, + 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(JobStages, self).__init__(**kwargs) + self.stage_name = None + self.display_name = None + self.stage_status = None + self.stage_time = None + self.job_stage_details = None + + +class KeyEncryptionKey(msrest.serialization.Model): + """Encryption key containing details about key to encrypt different keys. + + All required parameters must be populated in order to send to Azure. + + :param kek_type: Required. Type of encryption key used for key encryption. Possible values + include: "MicrosoftManaged", "CustomerManaged". Default value: "MicrosoftManaged". + :type kek_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.KekType + :param identity_properties: Managed identity properties used for key encryption. + :type identity_properties: ~azure.mgmt.databox.v2021_08_01_preview.models.IdentityProperties + :param kek_url: Key encryption key. It is required in case of Customer managed KekType. + :type kek_url: str + :param kek_vault_resource_id: Kek vault resource id. It is required in case of Customer managed + KekType. + :type kek_vault_resource_id: str + """ + + _validation = { + 'kek_type': {'required': True}, + } + + _attribute_map = { + 'kek_type': {'key': 'kekType', 'type': 'str'}, + 'identity_properties': {'key': 'identityProperties', 'type': 'IdentityProperties'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'kek_vault_resource_id': {'key': 'kekVaultResourceID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyEncryptionKey, self).__init__(**kwargs) + self.kek_type = kwargs.get('kek_type', "MicrosoftManaged") + self.identity_properties = kwargs.get('identity_properties', None) + self.kek_url = kwargs.get('kek_url', None) + self.kek_vault_resource_id = kwargs.get('kek_vault_resource_id', None) + + +class LastMitigationActionOnJob(msrest.serialization.Model): + """Last Mitigation Action Performed On Job. + + :param action_date_time_in_utc: Action performed date time. + :type action_date_time_in_utc: ~datetime.datetime + :param is_performed_by_customer: Action performed by customer, + possibility is that mitigation might happen by customer or service or by ops. + :type is_performed_by_customer: bool + :param customer_resolution: Resolution code provided by customer. Possible values include: + "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode + """ + + _attribute_map = { + 'action_date_time_in_utc': {'key': 'actionDateTimeInUtc', 'type': 'iso-8601'}, + 'is_performed_by_customer': {'key': 'isPerformedByCustomer', 'type': 'bool'}, + 'customer_resolution': {'key': 'customerResolution', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LastMitigationActionOnJob, self).__init__(**kwargs) + self.action_date_time_in_utc = kwargs.get('action_date_time_in_utc', None) + self.is_performed_by_customer = kwargs.get('is_performed_by_customer', None) + self.customer_resolution = kwargs.get('customer_resolution', None) + + +class ManagedDiskDetails(DataAccountDetails): + """Details of the managed disks. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param resource_group_id: Required. Resource Group Id of the compute disks. + :type resource_group_id: str + :param staging_storage_account_id: Required. Resource Id of the storage account that can be + used to copy the vhd for staging. + :type staging_storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'resource_group_id': {'required': True}, + 'staging_storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + 'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedDiskDetails, self).__init__(**kwargs) + self.data_account_type = 'ManagedDisk' # type: str + self.resource_group_id = kwargs['resource_group_id'] + self.staging_storage_account_id = kwargs['staging_storage_account_id'] + + +class MarkDevicesShippedRequest(msrest.serialization.Model): + """The request body to provide the delivery package details of job. + + All required parameters must be populated in order to send to Azure. + + :param deliver_to_dc_package_details: Required. Delivery package details. + :type deliver_to_dc_package_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageCarrierInfo + """ + + _validation = { + 'deliver_to_dc_package_details': {'required': True}, + } + + _attribute_map = { + 'deliver_to_dc_package_details': {'key': 'deliverToDcPackageDetails', 'type': 'PackageCarrierInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(MarkDevicesShippedRequest, self).__init__(**kwargs) + self.deliver_to_dc_package_details = kwargs['deliver_to_dc_package_details'] + + +class MitigateJobRequest(msrest.serialization.Model): + """The Mitigate Job captured from request body for Mitigate API. + + All required parameters must be populated in order to send to Azure. + + :param customer_resolution_code: Required. Resolution code for the job. Possible values + include: "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution_code: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode + """ + + _validation = { + 'customer_resolution_code': {'required': True}, + } + + _attribute_map = { + 'customer_resolution_code': {'key': 'customerResolutionCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MitigateJobRequest, self).__init__(**kwargs) + self.customer_resolution_code = kwargs['customer_resolution_code'] + + +class NotificationPreference(msrest.serialization.Model): + """Notification preference for a job stage. + + All required parameters must be populated in order to send to Azure. + + :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", + "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Created", "ShippedToCustomer". + :type stage_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = kwargs['stage_name'] + self.send_notification = kwargs.get('send_notification', True) + + +class Operation(msrest.serialization.Model): + """Operation entity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the operation. Format: + {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. + :vartype name: str + :ivar display: Operation display values. + :vartype display: ~azure.mgmt.databox.v2021_08_01_preview.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: any + :ivar origin: Origin of the operation. Can be : user|system|user,system. + :vartype origin: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'properties': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.properties = None + self.origin = None + self.is_data_action = kwargs.get('is_data_action', None) + + +class OperationDisplay(msrest.serialization.Model): + """Operation display. + + :param provider: Provider name. + :type provider: str + :param resource: Resource name. + :type resource: str + :param operation: Localized name of the operation for display purpose. + :type operation: str + :param description: Localized description of the operation for display purpose. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationList(msrest.serialization.Model): + """Operation Collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations. + :vartype value: list[~azure.mgmt.databox.v2021_08_01_preview.models.Operation] + :param next_link: Link for the next set of operations. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationList, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class PackageCarrierDetails(msrest.serialization.Model): + """Package carrier details. + + :param carrier_account_number: Carrier Account Number of customer for customer disk. + :type carrier_account_number: str + :param carrier_name: Name of the carrier. + :type carrier_name: str + :param tracking_id: Tracking Id of shipment. + :type tracking_id: str + """ + + _attribute_map = { + 'carrier_account_number': {'key': 'carrierAccountNumber', 'type': 'str'}, + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PackageCarrierDetails, self).__init__(**kwargs) + self.carrier_account_number = kwargs.get('carrier_account_number', None) + self.carrier_name = kwargs.get('carrier_name', None) + self.tracking_id = kwargs.get('tracking_id', None) + + +class PackageCarrierInfo(msrest.serialization.Model): + """package carrier info. + + :param carrier_name: Name of the carrier. + :type carrier_name: str + :param tracking_id: Tracking Id of shipment. + :type tracking_id: str + """ + + _attribute_map = { + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PackageCarrierInfo, self).__init__(**kwargs) + self.carrier_name = kwargs.get('carrier_name', None) + self.tracking_id = kwargs.get('tracking_id', None) + + +class PackageShippingDetails(msrest.serialization.Model): + """package shipping details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar tracking_url: Url where shipment can be tracked. + :vartype tracking_url: str + :ivar carrier_name: Name of the carrier. + :vartype carrier_name: str + :ivar tracking_id: Tracking Id of shipment. + :vartype tracking_id: str + """ + + _validation = { + 'tracking_url': {'readonly': True}, + 'carrier_name': {'readonly': True}, + 'tracking_id': {'readonly': True}, + } + + _attribute_map = { + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PackageShippingDetails, self).__init__(**kwargs) + self.tracking_url = None + self.carrier_name = None + self.tracking_id = None + + +class Preferences(msrest.serialization.Model): + """Preferences related to the order. + + :param preferred_data_center_region: Preferred data center region. + :type preferred_data_center_region: list[str] + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportPreferences + :param encryption_preferences: Preferences related to the Encryption. + :type encryption_preferences: + ~azure.mgmt.databox.v2021_08_01_preview.models.EncryptionPreferences + """ + + _attribute_map = { + 'preferred_data_center_region': {'key': 'preferredDataCenterRegion', 'type': '[str]'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + 'encryption_preferences': {'key': 'encryptionPreferences', 'type': 'EncryptionPreferences'}, + } + + def __init__( + self, + **kwargs + ): + super(Preferences, self).__init__(**kwargs) + self.preferred_data_center_region = kwargs.get('preferred_data_center_region', None) + self.transport_preferences = kwargs.get('transport_preferences', None) + self.encryption_preferences = kwargs.get('encryption_preferences', None) + + +class PreferencesValidationRequest(ValidationInputRequest): + """Request to validate preference of transport and data center. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :param preference: Preference of transport and data center. + :type preference: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type device_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'preference': {'key': 'preference', 'type': 'Preferences'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PreferencesValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.preference = kwargs.get('preference', None) + self.device_type = kwargs['device_type'] + + +class PreferencesValidationResponseProperties(ValidationInputResponse): + """Properties of data center and transport preference validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar status: Validation status of requested data center and transport. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.status = None + + +class RegionConfigurationRequest(msrest.serialization.Model): + """Request body to get the configuration for the region. + + :param schedule_availability_request: Request body to get the availability for scheduling + orders. + :type schedule_availability_request: + ~azure.mgmt.databox.v2021_08_01_preview.models.ScheduleAvailabilityRequest + :param transport_availability_request: Request body to get the transport availability for given + sku. + :type transport_availability_request: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportAvailabilityRequest + :param datacenter_address_request: Request body to get the datacenter address for given sku. + :type datacenter_address_request: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressRequest + """ + + _attribute_map = { + 'schedule_availability_request': {'key': 'scheduleAvailabilityRequest', 'type': 'ScheduleAvailabilityRequest'}, + 'transport_availability_request': {'key': 'transportAvailabilityRequest', 'type': 'TransportAvailabilityRequest'}, + 'datacenter_address_request': {'key': 'datacenterAddressRequest', 'type': 'DatacenterAddressRequest'}, + } + + def __init__( + self, + **kwargs + ): + super(RegionConfigurationRequest, self).__init__(**kwargs) + self.schedule_availability_request = kwargs.get('schedule_availability_request', None) + self.transport_availability_request = kwargs.get('transport_availability_request', None) + self.datacenter_address_request = kwargs.get('datacenter_address_request', None) + + +class RegionConfigurationResponse(msrest.serialization.Model): + """Configuration response specific to a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar schedule_availability_response: Schedule availability for given sku in a region. + :vartype schedule_availability_response: + ~azure.mgmt.databox.v2021_08_01_preview.models.ScheduleAvailabilityResponse + :ivar transport_availability_response: Transport options available for given sku in a region. + :vartype transport_availability_response: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportAvailabilityResponse + :ivar datacenter_address_response: Datacenter address for given sku in a region. + :vartype datacenter_address_response: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + """ + + _validation = { + 'schedule_availability_response': {'readonly': True}, + 'transport_availability_response': {'readonly': True}, + 'datacenter_address_response': {'readonly': True}, + } + + _attribute_map = { + 'schedule_availability_response': {'key': 'scheduleAvailabilityResponse', 'type': 'ScheduleAvailabilityResponse'}, + 'transport_availability_response': {'key': 'transportAvailabilityResponse', 'type': 'TransportAvailabilityResponse'}, + 'datacenter_address_response': {'key': 'datacenterAddressResponse', 'type': 'DatacenterAddressResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(RegionConfigurationResponse, self).__init__(**kwargs) + self.schedule_availability_response = None + self.transport_availability_response = None + self.datacenter_address_response = None + + +class ResourceIdentity(msrest.serialization.Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: Identity type. + :type type: str + :ivar principal_id: Service Principal Id backing the Msi. + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id. + :vartype tenant_id: str + :param user_assigned_identities: User Assigned Identities. + :type user_assigned_identities: dict[str, + ~azure.mgmt.databox.v2021_08_01_preview.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', "None") + self.principal_id = None + self.tenant_id = None + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class ScheduleAvailabilityResponse(msrest.serialization.Model): + """Schedule availability for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar available_dates: List of dates available to schedule. + :vartype available_dates: list[~datetime.datetime] + """ + + _validation = { + 'available_dates': {'readonly': True}, + } + + _attribute_map = { + 'available_dates': {'key': 'availableDates', 'type': '[iso-8601]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduleAvailabilityResponse, self).__init__(**kwargs) + self.available_dates = None + + +class ShareCredentialDetails(msrest.serialization.Model): + """Credential details of the shares in account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar share_name: Name of the share. + :vartype share_name: str + :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", + "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". + :vartype share_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ShareDestinationFormatType + :ivar user_name: User name for the share. + :vartype user_name: str + :ivar password: Password for the share. + :vartype password: str + :ivar supported_access_protocols: Access protocols supported on the device. + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.AccessProtocol] + """ + + _validation = { + 'share_name': {'readonly': True}, + 'share_type': {'readonly': True}, + 'user_name': {'readonly': True}, + 'password': {'readonly': True}, + 'supported_access_protocols': {'readonly': True}, + } + + _attribute_map = { + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'share_type': {'key': 'shareType', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareCredentialDetails, self).__init__(**kwargs) + self.share_name = None + self.share_type = None + self.user_name = None + self.password = None + self.supported_access_protocols = None + + +class ShipmentPickUpRequest(msrest.serialization.Model): + """Shipment pick up request details. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. Minimum date after which the pick up should commence, this must be + in local time of pick up area. + :type start_time: ~datetime.datetime + :param end_time: Required. Maximum date before which the pick up should commence, this must be + in local time of pick up area. + :type end_time: ~datetime.datetime + :param shipment_location: Required. Shipment Location in the pickup place. Eg.front desk. + :type shipment_location: str + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + 'shipment_location': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'shipment_location': {'key': 'shipmentLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShipmentPickUpRequest, self).__init__(**kwargs) + self.start_time = kwargs['start_time'] + self.end_time = kwargs['end_time'] + self.shipment_location = kwargs['shipment_location'] + + +class ShipmentPickUpResponse(msrest.serialization.Model): + """Shipment pick up response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar confirmation_number: Confirmation number for the pick up request. + :vartype confirmation_number: str + :ivar ready_by_time: Time by which shipment should be ready for pick up, this is in local time + of pick up area. + :vartype ready_by_time: ~datetime.datetime + """ + + _validation = { + 'confirmation_number': {'readonly': True}, + 'ready_by_time': {'readonly': True}, + } + + _attribute_map = { + 'confirmation_number': {'key': 'confirmationNumber', 'type': 'str'}, + 'ready_by_time': {'key': 'readyByTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ShipmentPickUpResponse, self).__init__(**kwargs) + self.confirmation_number = None + self.ready_by_time = None + + +class ShippingAddress(msrest.serialization.Model): + """Shipping address where customer wishes to receive the device. + + All required parameters must be populated in order to send to Azure. + + :param street_address1: Required. Street Address line 1. + :type street_address1: str + :param street_address2: Street Address line 2. + :type street_address2: str + :param street_address3: Street Address line 3. + :type street_address3: str + :param city: Name of the City. + :type city: str + :param state_or_province: Name of the State or Province. + :type state_or_province: str + :param country: Required. Name of the Country. + :type country: str + :param postal_code: Postal code. + :type postal_code: str + :param zip_extended_code: Extended Zip Code. + :type zip_extended_code: str + :param company_name: Name of the company. + :type company_name: str + :param address_type: Type of address. Possible values include: "None", "Residential", + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.AddressType + """ + + _validation = { + 'street_address1': {'required': True}, + 'country': {'required': True}, + } + + _attribute_map = { + 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, + 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, + 'street_address3': {'key': 'streetAddress3', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'zip_extended_code': {'key': 'zipExtendedCode', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'address_type': {'key': 'addressType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShippingAddress, self).__init__(**kwargs) + self.street_address1 = kwargs['street_address1'] + self.street_address2 = kwargs.get('street_address2', None) + self.street_address3 = kwargs.get('street_address3', None) + self.city = kwargs.get('city', None) + self.state_or_province = kwargs.get('state_or_province', None) + self.country = kwargs['country'] + self.postal_code = kwargs.get('postal_code', None) + self.zip_extended_code = kwargs.get('zip_extended_code', None) + self.company_name = kwargs.get('company_name', None) + self.address_type = kwargs.get('address_type', "None") + + +class Sku(msrest.serialization.Model): + """The Sku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy", "DataBoxCustomerDisk". + :type name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param display_name: The display name of the sku. + :type display_name: str + :param family: The sku family. + :type family: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs['name'] + self.display_name = kwargs.get('display_name', None) + self.family = kwargs.get('family', None) + + +class SkuAvailabilityValidationRequest(ValidationInputRequest): + """Request to validate sku availability. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type device_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.device_type = kwargs['device_type'] + self.transfer_type = kwargs['transfer_type'] + self.country = kwargs['country'] + self.location = kwargs['location'] + + +class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): + """Properties of sku availability validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", + "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.status = None + + +class SkuCapacity(msrest.serialization.Model): + """Capacity of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar usable: Usable capacity in TB. + :vartype usable: str + :ivar maximum: Maximum capacity in TB. + :vartype maximum: str + """ + + _validation = { + 'usable': {'readonly': True}, + 'maximum': {'readonly': True}, + } + + _attribute_map = { + 'usable': {'key': 'usable', 'type': 'str'}, + 'maximum': {'key': 'maximum', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.usable = None + self.maximum = None + + +class SkuCost(msrest.serialization.Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar meter_id: Meter id of the Sku. + :vartype meter_id: str + :ivar meter_type: The type of the meter. + :vartype meter_type: str + :ivar multiplier: Multiplier specifies the region specific value to be multiplied with 1$ guid. + Eg: Our new regions will be using 1$ shipping guid with appropriate multiplier specific to + region. + :vartype multiplier: float + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'meter_type': {'readonly': True}, + 'multiplier': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_type': {'key': 'meterType', 'type': 'str'}, + 'multiplier': {'key': 'multiplier', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.meter_type = None + self.multiplier = None + + +class SkuInformation(msrest.serialization.Model): + """Information of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.databox.v2021_08_01_preview.models.Sku + :ivar enabled: The sku is enabled or not. + :vartype enabled: bool + :ivar data_location_to_service_location_map: The map of data location to service location. + :vartype data_location_to_service_location_map: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataLocationToServiceLocationMap] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.v2021_08_01_preview.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.v2021_08_01_preview.models.SkuCost] + :ivar api_versions: Api versions that support this Sku. + :vartype api_versions: list[str] + :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", + "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". + :vartype disabled_reason: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.SkuDisabledReason + :ivar disabled_reason_message: Message for why the Sku is disabled. + :vartype disabled_reason_message: str + :ivar required_feature: Required feature to access the sku. + :vartype required_feature: str + """ + + _validation = { + 'sku': {'readonly': True}, + 'enabled': {'readonly': True}, + 'data_location_to_service_location_map': {'readonly': True}, + 'capacity': {'readonly': True}, + 'costs': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'disabled_reason': {'readonly': True}, + 'disabled_reason_message': {'readonly': True}, + 'required_feature': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'data_location_to_service_location_map': {'key': 'properties.dataLocationToServiceLocationMap', 'type': '[DataLocationToServiceLocationMap]'}, + 'capacity': {'key': 'properties.capacity', 'type': 'SkuCapacity'}, + 'costs': {'key': 'properties.costs', 'type': '[SkuCost]'}, + 'api_versions': {'key': 'properties.apiVersions', 'type': '[str]'}, + 'disabled_reason': {'key': 'properties.disabledReason', 'type': 'str'}, + 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, + 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuInformation, self).__init__(**kwargs) + self.sku = None + self.enabled = None + self.data_location_to_service_location_map = None + self.capacity = None + self.costs = None + self.api_versions = None + self.disabled_reason = None + self.disabled_reason_message = None + self.required_feature = None + + +class StorageAccountDetails(DataAccountDetails): + """Details for the storage account. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param storage_account_id: Required. Storage Account Resource Id. + :type storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageAccountDetails, self).__init__(**kwargs) + self.data_account_type = 'StorageAccount' # type: str + self.storage_account_id = kwargs['storage_account_id'] + + +class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): + """Request to validate subscription permission to create jobs. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + + +class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInputResponse): + """Properties of subscription permission to create job validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar status: Validation status of subscription permission to create job. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + self.status = None + + +class SystemData(msrest.serialization.Model): + """Provides details about resource creation and update time. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_by: A string identifier for the identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource: user, application, + managedIdentity. + :vartype created_by_type: str + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: A string identifier for the identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource: user, + application, managedIdentity. + :vartype last_modified_by_type: str + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _validation = { + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + } + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = None + self.created_by_type = None + self.created_at = None + self.last_modified_by = None + self.last_modified_by_type = None + self.last_modified_at = None + + +class TransferAllDetails(msrest.serialization.Model): + """Details to transfer all data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :param transfer_all_blobs: To indicate if all Azure blobs have to be transferred. + :type transfer_all_blobs: bool + :param transfer_all_files: To indicate if all Azure Files have to be transferred. + :type transfer_all_files: bool + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'transfer_all_blobs': {'key': 'transferAllBlobs', 'type': 'bool'}, + 'transfer_all_files': {'key': 'transferAllFiles', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferAllDetails, self).__init__(**kwargs) + self.data_account_type = kwargs['data_account_type'] + self.transfer_all_blobs = kwargs.get('transfer_all_blobs', None) + self.transfer_all_files = kwargs.get('transfer_all_files', None) + + +class TransferConfiguration(msrest.serialization.Model): + """Configuration for defining the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration_type: Required. Type of the configuration for transfer. Possible + values include: "TransferAll", "TransferUsingFilter". + :type transfer_configuration_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.TransferConfigurationType + :param transfer_filter_details: Map of filter type and the details to filter. This field is + required only if the TransferConfigurationType is given as TransferUsingFilter. + :type transfer_filter_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransferConfigurationTransferFilterDetails + :param transfer_all_details: Map of filter type and the details to transfer all data. This + field is required only if the TransferConfigurationType is given as TransferAll. + :type transfer_all_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransferConfigurationTransferAllDetails + """ + + _validation = { + 'transfer_configuration_type': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration_type': {'key': 'transferConfigurationType', 'type': 'str'}, + 'transfer_filter_details': {'key': 'transferFilterDetails', 'type': 'TransferConfigurationTransferFilterDetails'}, + 'transfer_all_details': {'key': 'transferAllDetails', 'type': 'TransferConfigurationTransferAllDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferConfiguration, self).__init__(**kwargs) + self.transfer_configuration_type = kwargs['transfer_configuration_type'] + self.transfer_filter_details = kwargs.get('transfer_filter_details', None) + self.transfer_all_details = kwargs.get('transfer_all_details', None) + + +class TransferConfigurationTransferAllDetails(msrest.serialization.Model): + """Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. + + :param include: Details to transfer all data. + :type include: ~azure.mgmt.databox.v2021_08_01_preview.models.TransferAllDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferAllDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferConfigurationTransferAllDetails, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + + +class TransferConfigurationTransferFilterDetails(msrest.serialization.Model): + """Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. + + :param include: Details of the filtering the transfer of data. + :type include: ~azure.mgmt.databox.v2021_08_01_preview.models.TransferFilterDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferFilterDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferConfigurationTransferFilterDetails, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + + +class TransferFilterDetails(msrest.serialization.Model): + """Details of the filtering the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :param blob_filter_details: Filter details to transfer blobs. + :type blob_filter_details: ~azure.mgmt.databox.v2021_08_01_preview.models.BlobFilterDetails + :param azure_file_filter_details: Filter details to transfer Azure files. + :type azure_file_filter_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.AzureFileFilterDetails + :param filter_file_details: Details of the filter files to be used for data transfer. + :type filter_file_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.FilterFileDetails] + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'blob_filter_details': {'key': 'blobFilterDetails', 'type': 'BlobFilterDetails'}, + 'azure_file_filter_details': {'key': 'azureFileFilterDetails', 'type': 'AzureFileFilterDetails'}, + 'filter_file_details': {'key': 'filterFileDetails', 'type': '[FilterFileDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(TransferFilterDetails, self).__init__(**kwargs) + self.data_account_type = kwargs['data_account_type'] + self.blob_filter_details = kwargs.get('blob_filter_details', None) + self.azure_file_filter_details = kwargs.get('azure_file_filter_details', None) + self.filter_file_details = kwargs.get('filter_file_details', None) + + +class TransportAvailabilityDetails(msrest.serialization.Model): + """Transport options availability details for given region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar shipment_type: Transport Shipment Type supported for given region. Possible values + include: "CustomerManaged", "MicrosoftManaged". + :vartype shipment_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportShipmentTypes + """ + + _validation = { + 'shipment_type': {'readonly': True}, + } + + _attribute_map = { + 'shipment_type': {'key': 'shipmentType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityDetails, self).__init__(**kwargs) + self.shipment_type = None + + +class TransportAvailabilityRequest(msrest.serialization.Model): + """Request body to get the transport availability for given sku. + + :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy", "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + """ + + _attribute_map = { + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = kwargs.get('sku_name', None) + + +class TransportAvailabilityResponse(msrest.serialization.Model): + """Transport options available for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar transport_availability_details: List of transport availability details for given region. + :vartype transport_availability_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.TransportAvailabilityDetails] + """ + + _validation = { + 'transport_availability_details': {'readonly': True}, + } + + _attribute_map = { + 'transport_availability_details': {'key': 'transportAvailabilityDetails', 'type': '[TransportAvailabilityDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityResponse, self).__init__(**kwargs) + self.transport_availability_details = None + + +class TransportPreferences(msrest.serialization.Model): + """Preferences related to the shipment logistics of the sku. + + All required parameters must be populated in order to send to Azure. + + :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportShipmentTypes + """ + + _validation = { + 'preferred_shipment_type': {'required': True}, + } + + _attribute_map = { + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportPreferences, self).__init__(**kwargs) + self.preferred_shipment_type = kwargs['preferred_shipment_type'] + + +class UnencryptedCredentials(msrest.serialization.Model): + """Unencrypted credentials for accessing device. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar job_name: Name of the job. + :vartype job_name: str + :ivar job_secrets: Secrets related to this job. + :vartype job_secrets: ~azure.mgmt.databox.v2021_08_01_preview.models.JobSecrets + """ + + _validation = { + 'job_name': {'readonly': True}, + 'job_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'job_secrets': {'key': 'jobSecrets', 'type': 'JobSecrets'}, + } + + def __init__( + self, + **kwargs + ): + super(UnencryptedCredentials, self).__init__(**kwargs) + self.job_name = None + self.job_secrets = None + + +class UnencryptedCredentialsList(msrest.serialization.Model): + """List of unencrypted credentials for accessing device. + + :param value: List of unencrypted credentials. + :type value: list[~azure.mgmt.databox.v2021_08_01_preview.models.UnencryptedCredentials] + :param next_link: Link for the next set of unencrypted credentials. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UnencryptedCredentials]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UnencryptedCredentialsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class UpdateJobDetails(msrest.serialization.Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :param key_encryption_key: Key encryption key for the job. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param return_to_customer_package_details: Return package details of job. + :type return_to_customer_package_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageCarrierDetails + """ + + _attribute_map = { + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'return_to_customer_package_details': {'key': 'returnToCustomerPackageDetails', 'type': 'PackageCarrierDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(UpdateJobDetails, self).__init__(**kwargs) + self.contact_details = kwargs.get('contact_details', None) + self.shipping_address = kwargs.get('shipping_address', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + self.return_to_customer_package_details = kwargs.get('return_to_customer_package_details', None) + + +class UserAssignedIdentity(msrest.serialization.Model): + """Class defining User assigned identity details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedProperties(msrest.serialization.Model): + """User assigned identity properties. + + :param resource_id: Arm resource id for user assigned identity to be used to fetch MSI token. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedProperties, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + + +class ValidateAddress(ValidationInputRequest): + """The requirements to validate customer address where the device needs to be shipped. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type device_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportPreferences + """ + + _validation = { + 'validation_type': {'required': True}, + 'shipping_address': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateAddress, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.shipping_address = kwargs['shipping_address'] + self.device_type = kwargs['device_type'] + self.transport_preferences = kwargs.get('transport_preferences', None) + + +class ValidationResponse(msrest.serialization.Model): + """Response of pre job creation validations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Overall validation status. Possible values include: "AllValidToProceed", + "InputsRevisitRequired", "CertainInputValidationsSkipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.OverallValidationStatus + :ivar individual_response_details: List of response details contain validationType and its + response as key and value respectively. + :vartype individual_response_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputResponse] + """ + + _validation = { + 'status': {'readonly': True}, + 'individual_response_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'individual_response_details': {'key': 'properties.individualResponseDetails', 'type': '[ValidationInputResponse]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidationResponse, self).__init__(**kwargs) + self.status = None + self.individual_response_details = None diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/_models_py3.py new file mode 100644 index 0000000000000..ea7ad1fe5e8ea --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/models/_models_py3.py @@ -0,0 +1,5310 @@ +# 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 + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._data_box_management_client_enums import * + + +class AccountCredentialDetails(msrest.serialization.Model): + """Credential details of the account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar account_name: Name of the account. + :vartype account_name: str + :ivar data_account_type: Type of the account. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :ivar account_connection_string: Connection string of the account endpoint to use the account + as a storage endpoint on the device. + :vartype account_connection_string: str + :ivar share_credential_details: Per share level unencrypted access credentials. + :vartype share_credential_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ShareCredentialDetails] + """ + + _validation = { + 'account_name': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_connection_string': {'readonly': True}, + 'share_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, + 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountCredentialDetails, self).__init__(**kwargs) + self.account_name = None + self.data_account_type = None + self.account_connection_string = None + self.share_credential_details = None + + +class AdditionalErrorInfo(msrest.serialization.Model): + """Additional error info. + + :param type: Additional error type. + :type type: str + :param info: Additional error info. + :type info: any + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + info: Optional[Any] = None, + **kwargs + ): + super(AdditionalErrorInfo, self).__init__(**kwargs) + self.type = type + self.info = info + + +class AddressValidationOutput(msrest.serialization.Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param validation_type: Identifies the type of validation response.Constant filled by server. + Possible values include: "ValidateAddress", "ValidateSubscriptionIsAllowedToCreateJob", + "ValidatePreferences", "ValidateCreateOrderLimit", "ValidateSkuAvailability", + "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress] + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'properties.validationType', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationOutput, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ValidationInputResponse(msrest.serialization.Model): + """Minimum properties that should be present in each individual validation response. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddressValidationProperties, CreateOrderLimitForSubscriptionValidationResponseProperties, DataTransferDetailsValidationResponseProperties, PreferencesValidationResponseProperties, SkuAvailabilityValidationResponseProperties, SubscriptionIsAllowedToCreateJobValidationResponseProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'AddressValidationProperties', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputResponse, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + self.error = None + + +class AddressValidationProperties(ValidationInputResponse): + """The address validation output. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar validation_status: The address validation status. Possible values include: "Valid", + "Invalid", "Ambiguous". + :vartype validation_status: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress] + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_status': {'key': 'validationStatus', 'type': 'str'}, + 'alternate_addresses': {'key': 'alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressValidationProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.validation_status = None + self.alternate_addresses = None + + +class ApiError(msrest.serialization.Model): + """ApiError. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. + :type error: ~azure.mgmt.databox.v2021_08_01_preview.models.ErrorDetail + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: "ErrorDetail", + **kwargs + ): + super(ApiError, self).__init__(**kwargs) + self.error = error + + +class ApplianceNetworkConfiguration(msrest.serialization.Model): + """The Network Adapter configuration of a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the network. + :vartype name: str + :ivar mac_address: Mac Address. + :vartype mac_address: str + """ + + _validation = { + 'name': {'readonly': True}, + 'mac_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceNetworkConfiguration, self).__init__(**kwargs) + self.name = None + self.mac_address = None + + +class ArmBaseObject(msrest.serialization.Model): + """Base class for all objects under resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmBaseObject, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + + +class AvailableSkuRequest(msrest.serialization.Model): + """The filters for showing the available skus. + + All required parameters must be populated in order to send to Azure. + + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + :param sku_names: Sku Names to filter for available skus. + :type sku_names: list[str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku_names': {'key': 'skuNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + transfer_type: Union[str, "TransferType"], + country: str, + location: str, + sku_names: Optional[List[Union[str, "SkuName"]]] = None, + **kwargs + ): + super(AvailableSkuRequest, self).__init__(**kwargs) + self.transfer_type = transfer_type + self.country = country + self.location = location + self.sku_names = sku_names + + +class AvailableSkusResult(msrest.serialization.Model): + """The available skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of available skus. + :vartype value: list[~azure.mgmt.databox.v2021_08_01_preview.models.SkuInformation] + :param next_link: Link for the next set of skus. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SkuInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(AvailableSkusResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class AzureFileFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure files. + + :param file_prefix_list: Prefix list of the Azure files to be transferred. + :type file_prefix_list: list[str] + :param file_path_list: List of full path of the files to be transferred. + :type file_path_list: list[str] + :param file_share_list: List of file shares to be transferred. + :type file_share_list: list[str] + """ + + _attribute_map = { + 'file_prefix_list': {'key': 'filePrefixList', 'type': '[str]'}, + 'file_path_list': {'key': 'filePathList', 'type': '[str]'}, + 'file_share_list': {'key': 'fileShareList', 'type': '[str]'}, + } + + def __init__( + self, + *, + file_prefix_list: Optional[List[str]] = None, + file_path_list: Optional[List[str]] = None, + file_share_list: Optional[List[str]] = None, + **kwargs + ): + super(AzureFileFilterDetails, self).__init__(**kwargs) + self.file_prefix_list = file_prefix_list + self.file_path_list = file_path_list + self.file_share_list = file_share_list + + +class BlobFilterDetails(msrest.serialization.Model): + """Filter details to transfer Azure Blobs. + + :param blob_prefix_list: Prefix list of the Azure blobs to be transferred. + :type blob_prefix_list: list[str] + :param blob_path_list: List of full path of the blobs to be transferred. + :type blob_path_list: list[str] + :param container_list: List of blob containers to be transferred. + :type container_list: list[str] + """ + + _attribute_map = { + 'blob_prefix_list': {'key': 'blobPrefixList', 'type': '[str]'}, + 'blob_path_list': {'key': 'blobPathList', 'type': '[str]'}, + 'container_list': {'key': 'containerList', 'type': '[str]'}, + } + + def __init__( + self, + *, + blob_prefix_list: Optional[List[str]] = None, + blob_path_list: Optional[List[str]] = None, + container_list: Optional[List[str]] = None, + **kwargs + ): + super(BlobFilterDetails, self).__init__(**kwargs) + self.blob_prefix_list = blob_prefix_list + self.blob_path_list = blob_path_list + self.container_list = container_list + + +class CancellationReason(msrest.serialization.Model): + """Reason for cancellation. + + All required parameters must be populated in order to send to Azure. + + :param reason: Required. Reason for cancellation. + :type reason: str + """ + + _validation = { + 'reason': {'required': True}, + } + + _attribute_map = { + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + *, + reason: str, + **kwargs + ): + super(CancellationReason, self).__init__(**kwargs) + self.reason = reason + + +class CloudError(msrest.serialization.Model): + """Cloud error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param code: Cloud error code. + :type code: str + :param message: Cloud error message. + :type message: str + :param target: Cloud error target. + :type target: str + :ivar details: Cloud error details. + :vartype details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CloudError] + :ivar additional_info: Cloud error additional info. + :vartype additional_info: + list[~azure.mgmt.databox.v2021_08_01_preview.models.AdditionalErrorInfo] + """ + + _validation = { + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudError]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[AdditionalErrorInfo]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + **kwargs + ): + super(CloudError, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = None + self.additional_info = None + + +class ContactDetails(msrest.serialization.Model): + """Contact Details. + + All required parameters must be populated in order to send to Azure. + + :param contact_name: Required. Contact name of the person. + :type contact_name: str + :param phone: Required. Phone number of the contact person. + :type phone: str + :param phone_extension: Phone extension number of the contact person. + :type phone_extension: str + :param mobile: Mobile number of the contact person. + :type mobile: str + :param email_list: Required. List of Email-ids to be notified about job progress. + :type email_list: list[str] + :param notification_preference: Notification preference for a job stage. + :type notification_preference: + list[~azure.mgmt.databox.v2021_08_01_preview.models.NotificationPreference] + """ + + _validation = { + 'contact_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_name': {'key': 'contactName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'phone_extension': {'key': 'phoneExtension', 'type': 'str'}, + 'mobile': {'key': 'mobile', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + 'notification_preference': {'key': 'notificationPreference', 'type': '[NotificationPreference]'}, + } + + def __init__( + self, + *, + contact_name: str, + phone: str, + email_list: List[str], + phone_extension: Optional[str] = None, + mobile: Optional[str] = None, + notification_preference: Optional[List["NotificationPreference"]] = None, + **kwargs + ): + super(ContactDetails, self).__init__(**kwargs) + self.contact_name = contact_name + self.phone = phone + self.phone_extension = phone_extension + self.mobile = mobile + self.email_list = email_list + self.notification_preference = notification_preference + + +class CopyLogDetails(msrest.serialization.Model): + """Details for log generated during copy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxAccountCopyLogDetails, DataBoxCustomerDiskCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxHeavyAccountCopyLogDetails. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type copy_log_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'copy_log_details_type': {'DataBox': 'DataBoxAccountCopyLogDetails', 'DataBoxCustomerDisk': 'DataBoxCustomerDiskCopyLogDetails', 'DataBoxDisk': 'DataBoxDiskCopyLogDetails', 'DataBoxHeavy': 'DataBoxHeavyAccountCopyLogDetails'} + } + + def __init__( + self, + **kwargs + ): + super(CopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = None # type: Optional[str] + + +class CopyProgress(msrest.serialization.Model): + """Copy progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar storage_account_name: Name of the storage account. This will be empty for data account + types other than storage account. + :vartype storage_account_name: str + :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", + "ExportFromAzure". + :vartype transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :ivar account_id: Id of the account where the data needs to be uploaded. + :vartype account_id: str + :ivar bytes_processed: To indicate bytes transferred. + :vartype bytes_processed: long + :ivar total_bytes_to_process: Total amount of data to be processed by the job. + :vartype total_bytes_to_process: long + :ivar files_processed: Number of files processed. + :vartype files_processed: long + :ivar total_files_to_process: Total files to process. + :vartype total_files_to_process: long + :ivar invalid_files_processed: Number of files not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype invalid_files_processed: long + :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to azure naming + conventions which were processed by automatic renaming. + :vartype invalid_file_bytes_uploaded: long + :ivar renamed_container_count: Number of folders not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype renamed_container_count: long + :ivar files_errored_out: Number of files which could not be copied. + :vartype files_errored_out: long + :ivar directories_errored_out: To indicate directories errored out in the job. + :vartype directories_errored_out: long + :ivar invalid_directories_processed: To indicate directories renamed. + :vartype invalid_directories_processed: long + :ivar is_enumeration_in_progress: To indicate if enumeration of data is in progress. + Until this is true, the TotalBytesToProcess may not be valid. + :vartype is_enumeration_in_progress: bool + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'transfer_type': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_processed': {'readonly': True}, + 'total_bytes_to_process': {'readonly': True}, + 'files_processed': {'readonly': True}, + 'total_files_to_process': {'readonly': True}, + 'invalid_files_processed': {'readonly': True}, + 'invalid_file_bytes_uploaded': {'readonly': True}, + 'renamed_container_count': {'readonly': True}, + 'files_errored_out': {'readonly': True}, + 'directories_errored_out': {'readonly': True}, + 'invalid_directories_processed': {'readonly': True}, + 'is_enumeration_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'bytes_processed': {'key': 'bytesProcessed', 'type': 'long'}, + 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, + 'files_processed': {'key': 'filesProcessed', 'type': 'long'}, + 'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'}, + 'invalid_files_processed': {'key': 'invalidFilesProcessed', 'type': 'long'}, + 'invalid_file_bytes_uploaded': {'key': 'invalidFileBytesUploaded', 'type': 'long'}, + 'renamed_container_count': {'key': 'renamedContainerCount', 'type': 'long'}, + 'files_errored_out': {'key': 'filesErroredOut', 'type': 'long'}, + 'directories_errored_out': {'key': 'directoriesErroredOut', 'type': 'long'}, + 'invalid_directories_processed': {'key': 'invalidDirectoriesProcessed', 'type': 'long'}, + 'is_enumeration_in_progress': {'key': 'isEnumerationInProgress', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CopyProgress, self).__init__(**kwargs) + self.storage_account_name = None + self.transfer_type = None + self.data_account_type = None + self.account_id = None + self.bytes_processed = None + self.total_bytes_to_process = None + self.files_processed = None + self.total_files_to_process = None + self.invalid_files_processed = None + self.invalid_file_bytes_uploaded = None + self.renamed_container_count = None + self.files_errored_out = None + self.directories_errored_out = None + self.invalid_directories_processed = None + self.is_enumeration_in_progress = None + + +class ValidationRequest(msrest.serialization.Model): + """Minimum request requirement of any validation category. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CreateJobValidations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + _subtype_map = { + 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} + } + + def __init__( + self, + *, + individual_request_details: List["ValidationInputRequest"], + **kwargs + ): + super(ValidationRequest, self).__init__(**kwargs) + self.validation_category = None # type: Optional[str] + self.individual_request_details = individual_request_details + + +class CreateJobValidations(ValidationRequest): + """It does all pre-job creation validations. + + All required parameters must be populated in order to send to Azure. + + :param validation_category: Required. Identify the nature of validation.Constant filled by + server. + :type validation_category: str + :param individual_request_details: Required. List of request details contain validationType and + its request as key and value respectively. + :type individual_request_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputRequest] + """ + + _validation = { + 'validation_category': {'required': True}, + 'individual_request_details': {'required': True}, + } + + _attribute_map = { + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + } + + def __init__( + self, + *, + individual_request_details: List["ValidationInputRequest"], + **kwargs + ): + super(CreateJobValidations, self).__init__(individual_request_details=individual_request_details, **kwargs) + self.validation_category = 'JobCreationValidation' # type: str + + +class ValidationInputRequest(msrest.serialization.Model): + """Minimum fields that must be present in any type of validation request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ValidateAddress, CreateOrderLimitForSubscriptionValidationRequest, DataTransferDetailsValidationRequest, PreferencesValidationRequest, SkuAvailabilityValidationRequest, SubscriptionIsAllowedToCreateJobValidationRequest. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateAddress': 'ValidateAddress', 'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(ValidationInputRequest, self).__init__(**kwargs) + self.validation_type = None # type: Optional[str] + + +class CreateOrderLimitForSubscriptionValidationRequest(ValidationInputRequest): + """Request to validate create order limit for current subscription. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type device_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.device_type = device_type + + +class CreateOrderLimitForSubscriptionValidationResponseProperties(ValidationInputResponse): + """Properties of create order limit for subscription validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar status: Create order limit validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateCreateOrderLimit' # type: str + self.status = None + + +class JobSecrets(msrest.serialization.Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataboxJobSecrets, CustomerDiskJobSecrets, DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type job_secrets_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: + ~azure.mgmt.databox.v2021_08_01_preview.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBox': 'DataboxJobSecrets', 'DataBoxCustomerDisk': 'CustomerDiskJobSecrets', 'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets'} + } + + def __init__( + self, + **kwargs + ): + super(JobSecrets, self).__init__(**kwargs) + self.job_secrets_type = None # type: Optional[str] + self.dc_access_security_code = None + self.error = None + + +class CustomerDiskJobSecrets(JobSecrets): + """The secrets related to customer disk job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type job_secrets_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: + ~azure.mgmt.databox.v2021_08_01_preview.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.v2021_08_01_preview.models.DiskSecret] + :ivar carrier_account_number: Carrier Account Number of the customer. + :vartype carrier_account_number: str + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'disk_secrets': {'readonly': True}, + 'carrier_account_number': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'carrier_account_number': {'key': 'carrierAccountNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomerDiskJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxCustomerDisk' # type: str + self.disk_secrets = None + self.carrier_account_number = None + + +class DataAccountDetails(msrest.serialization.Model): + """Account details of the data to be transferred. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedDiskDetails, StorageAccountDetails. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + } + + _subtype_map = { + 'data_account_type': {'ManagedDisk': 'ManagedDiskDetails', 'StorageAccount': 'StorageAccountDetails'} + } + + def __init__( + self, + *, + share_password: Optional[str] = None, + **kwargs + ): + super(DataAccountDetails, self).__init__(**kwargs) + self.data_account_type = None # type: Optional[str] + self.share_password = share_password + + +class DataBoxAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account of a DataBox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type copy_log_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: str + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when + LogCollectionLevel is set to Verbose. + :vartype copy_verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': 'str'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBox' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxCustomerDiskCopyLogDetails(CopyLogDetails): + """Copy Log Details for customer disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type copy_log_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar serial_number: Disk Serial Number. + :vartype serial_number: str + :ivar error_log_link: Link for copy error logs. + :vartype error_log_link: str + :ivar verbose_log_link: Link for copy verbose logs. + :vartype verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'serial_number': {'readonly': True}, + 'error_log_link': {'readonly': True}, + 'verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'error_log_link': {'key': 'errorLogLink', 'type': 'str'}, + 'verbose_log_link': {'key': 'verboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxCustomerDiskCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxCustomerDisk' # type: str + self.serial_number = None + self.error_log_link = None + self.verbose_log_link = None + + +class DataBoxCustomerDiskCopyProgress(CopyProgress): + """DataBox CustomerDisk Copy Progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar storage_account_name: Name of the storage account. This will be empty for data account + types other than storage account. + :vartype storage_account_name: str + :ivar transfer_type: Transfer type of data. Possible values include: "ImportToAzure", + "ExportFromAzure". + :vartype transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + :ivar data_account_type: Data Account Type. Possible values include: "StorageAccount", + "ManagedDisk". + :vartype data_account_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :ivar account_id: Id of the account where the data needs to be uploaded. + :vartype account_id: str + :ivar bytes_processed: To indicate bytes transferred. + :vartype bytes_processed: long + :ivar total_bytes_to_process: Total amount of data to be processed by the job. + :vartype total_bytes_to_process: long + :ivar files_processed: Number of files processed. + :vartype files_processed: long + :ivar total_files_to_process: Total files to process. + :vartype total_files_to_process: long + :ivar invalid_files_processed: Number of files not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype invalid_files_processed: long + :ivar invalid_file_bytes_uploaded: Total amount of data not adhering to azure naming + conventions which were processed by automatic renaming. + :vartype invalid_file_bytes_uploaded: long + :ivar renamed_container_count: Number of folders not adhering to azure naming conventions which + were processed by automatic renaming. + :vartype renamed_container_count: long + :ivar files_errored_out: Number of files which could not be copied. + :vartype files_errored_out: long + :ivar directories_errored_out: To indicate directories errored out in the job. + :vartype directories_errored_out: long + :ivar invalid_directories_processed: To indicate directories renamed. + :vartype invalid_directories_processed: long + :ivar is_enumeration_in_progress: To indicate if enumeration of data is in progress. + Until this is true, the TotalBytesToProcess may not be valid. + :vartype is_enumeration_in_progress: bool + :ivar serial_number: Disk Serial Number. + :vartype serial_number: str + :ivar copy_status: The Status of the copy. Possible values include: "NotStarted", "InProgress", + "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", + "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData", + "DriveNotReceived", "UnsupportedDrive", "OtherServiceError", "OtherUserError", + "DriveNotDetected", "DriveCorrupted", "MetadataFilesModifiedOrRemoved". + :vartype copy_status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.CopyStatus + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'transfer_type': {'readonly': True}, + 'data_account_type': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_processed': {'readonly': True}, + 'total_bytes_to_process': {'readonly': True}, + 'files_processed': {'readonly': True}, + 'total_files_to_process': {'readonly': True}, + 'invalid_files_processed': {'readonly': True}, + 'invalid_file_bytes_uploaded': {'readonly': True}, + 'renamed_container_count': {'readonly': True}, + 'files_errored_out': {'readonly': True}, + 'directories_errored_out': {'readonly': True}, + 'invalid_directories_processed': {'readonly': True}, + 'is_enumeration_in_progress': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'copy_status': {'readonly': True}, + } + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'bytes_processed': {'key': 'bytesProcessed', 'type': 'long'}, + 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, + 'files_processed': {'key': 'filesProcessed', 'type': 'long'}, + 'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'}, + 'invalid_files_processed': {'key': 'invalidFilesProcessed', 'type': 'long'}, + 'invalid_file_bytes_uploaded': {'key': 'invalidFileBytesUploaded', 'type': 'long'}, + 'renamed_container_count': {'key': 'renamedContainerCount', 'type': 'long'}, + 'files_errored_out': {'key': 'filesErroredOut', 'type': 'long'}, + 'directories_errored_out': {'key': 'directoriesErroredOut', 'type': 'long'}, + 'invalid_directories_processed': {'key': 'invalidDirectoriesProcessed', 'type': 'long'}, + 'is_enumeration_in_progress': {'key': 'isEnumerationInProgress', 'type': 'bool'}, + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'copy_status': {'key': 'copyStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxCustomerDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.copy_status = None + + +class JobDetails(msrest.serialization.Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxJobDetails, DataBoxCustomerDiskJobDetails, DataBoxDiskJobDetails, DataBoxHeavyJobDetails. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type job_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_08_01_preview.models.LastMitigationActionOnJob + :ivar datacenter_address: Datacenter address to ship to, for the given sku and storage + location. + :vartype datacenter_address: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + :ivar data_center_code: DataCenter code. Possible values include: "Invalid", "BY2", "BY1", + "ORK70", "AM2", "AMS20", "BY21", "BY24", "MWH01", "AMS06", "SSE90", "SYD03", "SYD23", "CBR20", + "YTO20", "CWL20", "LON24", "BOM01", "BL20", "BL7", "SEL20", "TYO01", "BN1", "SN5", "CYS04", + "TYO22", "YTO21", "YQB20", "FRA22", "MAA01", "CPQ02", "CPQ20", "SIN20", "HKG20", "SG2", + "MEL23", "SEL21", "OSA20", "SHA03", "BJB", "JNB22", "JNB21", "MNZ21", "SN8", "AUH20", "ZRH20", + "PUS20", "AdHoc", "CH1", "DSM05". + :vartype data_center_code: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataCenterCode + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'datacenter_address': {'readonly': True}, + 'data_center_code': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'datacenter_address': {'key': 'datacenterAddress', 'type': 'DatacenterAddressResponse'}, + 'data_center_code': {'key': 'dataCenterCode', 'type': 'str'}, + } + + _subtype_map = { + 'job_details_type': {'DataBox': 'DataBoxJobDetails', 'DataBoxCustomerDisk': 'DataBoxCustomerDiskJobDetails', 'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails'} + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + **kwargs + ): + super(JobDetails, self).__init__(**kwargs) + self.job_stages = None + self.contact_details = contact_details + self.shipping_address = shipping_address + self.delivery_package = None + self.return_package = None + self.data_import_details = data_import_details + self.data_export_details = data_export_details + self.job_details_type = None # type: Optional[str] + self.preferences = preferences + self.copy_log_details = None + self.reverse_shipment_label_sas_key = None + self.chain_of_custody_sas_key = None + self.key_encryption_key = key_encryption_key + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes + self.actions = None + self.last_mitigation_action_on_job = None + self.datacenter_address = None + self.data_center_code = None + + +class DataBoxCustomerDiskJobDetails(JobDetails): + """Customer disk job details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type job_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_08_01_preview.models.LastMitigationActionOnJob + :ivar datacenter_address: Datacenter address to ship to, for the given sku and storage + location. + :vartype datacenter_address: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + :ivar data_center_code: DataCenter code. Possible values include: "Invalid", "BY2", "BY1", + "ORK70", "AM2", "AMS20", "BY21", "BY24", "MWH01", "AMS06", "SSE90", "SYD03", "SYD23", "CBR20", + "YTO20", "CWL20", "LON24", "BOM01", "BL20", "BL7", "SEL20", "TYO01", "BN1", "SN5", "CYS04", + "TYO22", "YTO21", "YQB20", "FRA22", "MAA01", "CPQ02", "CPQ20", "SIN20", "HKG20", "SG2", + "MEL23", "SEL21", "OSA20", "SHA03", "BJB", "JNB22", "JNB21", "MNZ21", "SN8", "AUH20", "ZRH20", + "PUS20", "AdHoc", "CH1", "DSM05". + :vartype data_center_code: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataCenterCode + :param import_disk_details_collection: Contains the map of disk serial number to the disk + details for import jobs. + :type import_disk_details_collection: dict[str, + ~azure.mgmt.databox.v2021_08_01_preview.models.ImportDiskDetails] + :ivar export_disk_details_collection: Contains the map of disk serial number to the disk + details for export jobs. + :vartype export_disk_details_collection: dict[str, + ~azure.mgmt.databox.v2021_08_01_preview.models.ExportDiskDetails] + :ivar copy_progress: Copy progress per disk. + :vartype copy_progress: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataBoxCustomerDiskCopyProgress] + :ivar deliver_to_dc_package_details: Delivery package shipping details. + :vartype deliver_to_dc_package_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageCarrierInfo + :param return_to_customer_package_details: Required. Return package shipping details. + :type return_to_customer_package_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageCarrierDetails + :param enable_manifest_backup: Flag to indicate if disk manifest should be backed-up in the + Storage Account. + :type enable_manifest_backup: bool + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'datacenter_address': {'readonly': True}, + 'data_center_code': {'readonly': True}, + 'export_disk_details_collection': {'readonly': True}, + 'copy_progress': {'readonly': True}, + 'deliver_to_dc_package_details': {'readonly': True}, + 'return_to_customer_package_details': {'required': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'datacenter_address': {'key': 'datacenterAddress', 'type': 'DatacenterAddressResponse'}, + 'data_center_code': {'key': 'dataCenterCode', 'type': 'str'}, + 'import_disk_details_collection': {'key': 'importDiskDetailsCollection', 'type': '{ImportDiskDetails}'}, + 'export_disk_details_collection': {'key': 'exportDiskDetailsCollection', 'type': '{ExportDiskDetails}'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxCustomerDiskCopyProgress]'}, + 'deliver_to_dc_package_details': {'key': 'deliverToDcPackageDetails', 'type': 'PackageCarrierInfo'}, + 'return_to_customer_package_details': {'key': 'returnToCustomerPackageDetails', 'type': 'PackageCarrierDetails'}, + 'enable_manifest_backup': {'key': 'enableManifestBackup', 'type': 'bool'}, + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + return_to_customer_package_details: "PackageCarrierDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + import_disk_details_collection: Optional[Dict[str, "ImportDiskDetails"]] = None, + enable_manifest_backup: Optional[bool] = False, + **kwargs + ): + super(DataBoxCustomerDiskJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) + self.job_details_type = 'DataBoxCustomerDisk' # type: str + self.import_disk_details_collection = import_disk_details_collection + self.export_disk_details_collection = None + self.copy_progress = None + self.deliver_to_dc_package_details = None + self.return_to_customer_package_details = return_to_customer_package_details + self.enable_manifest_backup = enable_manifest_backup + + +class DataBoxDiskCopyLogDetails(CopyLogDetails): + """Copy Log Details for a disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type copy_log_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar disk_serial_number: Disk Serial Number. + :vartype disk_serial_number: str + :ivar error_log_link: Link for copy error logs. + :vartype error_log_link: str + :ivar verbose_log_link: Link for copy verbose logs. + :vartype verbose_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'disk_serial_number': {'readonly': True}, + 'error_log_link': {'readonly': True}, + 'verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'error_log_link': {'key': 'errorLogLink', 'type': 'str'}, + 'verbose_log_link': {'key': 'verboseLogLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxDisk' # type: str + self.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + + +class DataBoxDiskCopyProgress(msrest.serialization.Model): + """DataBox Disk Copy Progress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar serial_number: The serial number of the disk. + :vartype serial_number: str + :ivar bytes_copied: Bytes copied during the copy of disk. + :vartype bytes_copied: long + :ivar percent_complete: Indicates the percentage completed for the copy of the disk. + :vartype percent_complete: int + :ivar status: The Status of the copy. Possible values include: "NotStarted", "InProgress", + "Completed", "CompletedWithErrors", "Failed", "NotReturned", "HardwareError", + "DeviceFormatted", "DeviceMetadataModified", "StorageAccountNotAccessible", "UnsupportedData", + "DriveNotReceived", "UnsupportedDrive", "OtherServiceError", "OtherUserError", + "DriveNotDetected", "DriveCorrupted", "MetadataFilesModifiedOrRemoved". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.CopyStatus + """ + + _validation = { + 'serial_number': {'readonly': True}, + 'bytes_copied': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.bytes_copied = None + self.percent_complete = None + self.status = None + + +class DataBoxDiskJobDetails(JobDetails): + """DataBox Disk Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type job_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_08_01_preview.models.LastMitigationActionOnJob + :ivar datacenter_address: Datacenter address to ship to, for the given sku and storage + location. + :vartype datacenter_address: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + :ivar data_center_code: DataCenter code. Possible values include: "Invalid", "BY2", "BY1", + "ORK70", "AM2", "AMS20", "BY21", "BY24", "MWH01", "AMS06", "SSE90", "SYD03", "SYD23", "CBR20", + "YTO20", "CWL20", "LON24", "BOM01", "BL20", "BL7", "SEL20", "TYO01", "BN1", "SN5", "CYS04", + "TYO22", "YTO21", "YQB20", "FRA22", "MAA01", "CPQ02", "CPQ20", "SIN20", "HKG20", "SG2", + "MEL23", "SEL21", "OSA20", "SHA03", "BJB", "JNB22", "JNB21", "MNZ21", "SN8", "AUH20", "ZRH20", + "PUS20", "AdHoc", "CH1", "DSM05". + :vartype data_center_code: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataCenterCode + :param preferred_disks: User preference on what size disks are needed for the job. The map is + from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but + will be checked against an int. + :type preferred_disks: dict[str, int] + :ivar copy_progress: Copy progress per disk. + :vartype copy_progress: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataBoxDiskCopyProgress] + :ivar disks_and_size_details: Contains the map of disk serial number to the disk size being + used for the job. Is returned only after the disks are shipped to the customer. + :vartype disks_and_size_details: dict[str, int] + :param passkey: User entered passkey for DataBox Disk job. + :type passkey: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'datacenter_address': {'readonly': True}, + 'data_center_code': {'readonly': True}, + 'copy_progress': {'readonly': True}, + 'disks_and_size_details': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'datacenter_address': {'key': 'datacenterAddress', 'type': 'DatacenterAddressResponse'}, + 'data_center_code': {'key': 'dataCenterCode', 'type': 'str'}, + 'preferred_disks': {'key': 'preferredDisks', 'type': '{int}'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[DataBoxDiskCopyProgress]'}, + 'disks_and_size_details': {'key': 'disksAndSizeDetails', 'type': '{int}'}, + 'passkey': {'key': 'passkey', 'type': 'str'}, + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + preferred_disks: Optional[Dict[str, int]] = None, + passkey: Optional[str] = None, + **kwargs + ): + super(DataBoxDiskJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) + self.job_details_type = 'DataBoxDisk' # type: str + self.preferred_disks = preferred_disks + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = passkey + + +class DataBoxDiskJobSecrets(JobSecrets): + """The secrets related to disk job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type job_secrets_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: + ~azure.mgmt.databox.v2021_08_01_preview.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.v2021_08_01_preview.models.DiskSecret] + :ivar pass_key: PassKey for the disk Job. + :vartype pass_key: str + :ivar is_passkey_user_defined: Whether passkey was provided by user. + :vartype is_passkey_user_defined: bool + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'pass_key': {'key': 'passKey', 'type': 'str'}, + 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxDiskJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxDisk' # type: str + self.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + + +class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account for Databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Indicates the type of job details.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type copy_log_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar account_name: Account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: list[str] + :ivar copy_verbose_log_link: Link for copy verbose logs. This will be set only when the + LogCollectionLevel is set to verbose. + :vartype copy_verbose_log_link: list[str] + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_log_link': {'readonly': True}, + 'copy_verbose_log_link': {'readonly': True}, + } + + _attribute_map = { + 'copy_log_details_type': {'key': 'copyLogDetailsType', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'copy_log_link': {'key': 'copyLogLink', 'type': '[str]'}, + 'copy_verbose_log_link': {'key': 'copyVerboseLogLink', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = 'DataBoxHeavy' # type: str + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + + +class DataBoxHeavyJobDetails(JobDetails): + """Databox Heavy Device Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type job_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_08_01_preview.models.LastMitigationActionOnJob + :ivar datacenter_address: Datacenter address to ship to, for the given sku and storage + location. + :vartype datacenter_address: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + :ivar data_center_code: DataCenter code. Possible values include: "Invalid", "BY2", "BY1", + "ORK70", "AM2", "AMS20", "BY21", "BY24", "MWH01", "AMS06", "SSE90", "SYD03", "SYD23", "CBR20", + "YTO20", "CWL20", "LON24", "BOM01", "BL20", "BL7", "SEL20", "TYO01", "BN1", "SN5", "CYS04", + "TYO22", "YTO21", "YQB20", "FRA22", "MAA01", "CPQ02", "CPQ20", "SIN20", "HKG20", "SG2", + "MEL23", "SEL21", "OSA20", "SHA03", "BJB", "JNB22", "JNB21", "MNZ21", "SN8", "AUH20", "ZRH20", + "PUS20", "AdHoc", "CH1", "DSM05". + :vartype data_center_code: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataCenterCode + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox Heavy. Should not be passed + for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'datacenter_address': {'readonly': True}, + 'data_center_code': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'datacenter_address': {'key': 'datacenterAddress', 'type': 'DatacenterAddressResponse'}, + 'data_center_code': {'key': 'dataCenterCode', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + device_password: Optional[str] = None, + **kwargs + ): + super(DataBoxHeavyJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) + self.job_details_type = 'DataBoxHeavy' # type: str + self.copy_progress = None + self.device_password = device_password + + +class DataBoxHeavyJobSecrets(JobSecrets): + """The secrets related to a databox heavy job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type job_secrets_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: + ~azure.mgmt.databox.v2021_08_01_preview.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar cabinet_pod_secrets: Contains the list of secret objects for a databox heavy job. + :vartype cabinet_pod_secrets: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataBoxHeavySecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBoxHeavy' # type: str + self.cabinet_pod_secrets = None + + +class DataBoxHeavySecret(msrest.serialization.Model): + """The secrets related to a databox heavy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxHeavySecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DataBoxJobDetails(JobDetails): + """Databox Job Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobStages] + :param contact_details: Required. Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.v2021_08_01_preview.models.PackageShippingDetails + :param data_import_details: Details of the data to be imported into azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param job_details_type: Required. Indicates the type of job details.Constant filled by server. + Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type job_details_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyLogDetails] + :ivar reverse_shipment_label_sas_key: Shared access key to download the return shipment label. + :vartype reverse_shipment_label_sas_key: str + :ivar chain_of_custody_sas_key: Shared access key to download the chain of custody logs. + :vartype chain_of_custody_sas_key: str + :param key_encryption_key: Details about which key encryption type is being used. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param expected_data_size_in_tera_bytes: The expected size of the data, which needs to be + transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + :ivar actions: Available actions on the job. + :vartype actions: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode] + :ivar last_mitigation_action_on_job: Last mitigation action performed on the job. + :vartype last_mitigation_action_on_job: + ~azure.mgmt.databox.v2021_08_01_preview.models.LastMitigationActionOnJob + :ivar datacenter_address: Datacenter address to ship to, for the given sku and storage + location. + :vartype datacenter_address: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + :ivar data_center_code: DataCenter code. Possible values include: "Invalid", "BY2", "BY1", + "ORK70", "AM2", "AMS20", "BY21", "BY24", "MWH01", "AMS06", "SSE90", "SYD03", "SYD23", "CBR20", + "YTO20", "CWL20", "LON24", "BOM01", "BL20", "BL7", "SEL20", "TYO01", "BN1", "SN5", "CYS04", + "TYO22", "YTO21", "YQB20", "FRA22", "MAA01", "CPQ02", "CPQ20", "SIN20", "HKG20", "SG2", + "MEL23", "SEL21", "OSA20", "SHA03", "BJB", "JNB22", "JNB21", "MNZ21", "SN8", "AUH20", "ZRH20", + "PUS20", "AdHoc", "CH1", "DSM05". + :vartype data_center_code: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataCenterCode + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.v2021_08_01_preview.models.CopyProgress] + :param device_password: Set Device password for unlocking Databox. Should not be passed for + TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password + itself. This will not be returned in Get Call. Password Requirements : Password must be + minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, + one number and one special character. Password cannot have the following characters : IilLoO0 + Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type device_password: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'actions': {'readonly': True}, + 'last_mitigation_action_on_job': {'readonly': True}, + 'datacenter_address': {'readonly': True}, + 'data_center_code': {'readonly': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + 'job_stages': {'key': 'jobStages', 'type': '[JobStages]'}, + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'Preferences'}, + 'copy_log_details': {'key': 'copyLogDetails', 'type': '[CopyLogDetails]'}, + 'reverse_shipment_label_sas_key': {'key': 'reverseShipmentLabelSasKey', 'type': 'str'}, + 'chain_of_custody_sas_key': {'key': 'chainOfCustodySasKey', 'type': 'str'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + 'last_mitigation_action_on_job': {'key': 'lastMitigationActionOnJob', 'type': 'LastMitigationActionOnJob'}, + 'datacenter_address': {'key': 'datacenterAddress', 'type': 'DatacenterAddressResponse'}, + 'data_center_code': {'key': 'dataCenterCode', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__( + self, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + data_export_details: Optional[List["DataExportDetails"]] = None, + preferences: Optional["Preferences"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + expected_data_size_in_tera_bytes: Optional[int] = None, + device_password: Optional[str] = None, + **kwargs + ): + super(DataBoxJobDetails, self).__init__(contact_details=contact_details, shipping_address=shipping_address, data_import_details=data_import_details, data_export_details=data_export_details, preferences=preferences, key_encryption_key=key_encryption_key, expected_data_size_in_tera_bytes=expected_data_size_in_tera_bytes, **kwargs) + self.job_details_type = 'DataBox' # type: str + self.copy_progress = None + self.device_password = device_password + + +class DataboxJobSecrets(JobSecrets): + """The secrets related to a databox job. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant + filled by server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type job_secrets_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ClassDiscriminator + :ivar dc_access_security_code: Dc Access Security Code for Customer Managed Shipping. + :vartype dc_access_security_code: + ~azure.mgmt.databox.v2021_08_01_preview.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.v2021_08_01_preview.models.DataBoxSecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__( + self, + *, + pod_secrets: Optional[List["DataBoxSecret"]] = None, + **kwargs + ): + super(DataboxJobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 'DataBox' # type: str + self.pod_secrets = pod_secrets + + +class ScheduleAvailabilityRequest(msrest.serialization.Model): + """Request body to get the availability for scheduling orders. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxScheduleAvailabilityRequest, DiskScheduleAvailabilityRequest, HeavyScheduleAvailabilityRequest. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + _subtype_map = { + 'sku_name': {'DataBox': 'DataBoxScheduleAvailabilityRequest', 'DataBoxDisk': 'DiskScheduleAvailabilityRequest', 'DataBoxHeavy': 'HeavyScheduleAvailabilityRequest'} + } + + def __init__( + self, + *, + storage_location: str, + country: Optional[str] = None, + **kwargs + ): + super(ScheduleAvailabilityRequest, self).__init__(**kwargs) + self.storage_location = storage_location + self.sku_name = None # type: Optional[str] + self.country = country + + +class DataBoxScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling data box orders orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_location: str, + country: Optional[str] = None, + **kwargs + ): + super(DataBoxScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBox' # type: str + + +class DataBoxSecret(msrest.serialization.Model): + """The secrets related to a DataBox. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to authenticate with the + device. + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataBoxSecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None + + +class DatacenterAddressResponse(msrest.serialization.Model): + """Datacenter address for given storage location. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DatacenterAddressInstructionResponse, DatacenterAddressLocationResponse. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param datacenter_address_type: Required. Data center address type.Constant filled by server. + Possible values include: "DatacenterAddressLocation", "DatacenterAddressInstruction". + :type datacenter_address_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressType + :ivar supported_carriers_for_return_shipment: List of supported carriers for return shipment. + :vartype supported_carriers_for_return_shipment: list[str] + :ivar data_center_azure_location: Azure Location where the Data Center serves primarily. + :vartype data_center_azure_location: str + """ + + _validation = { + 'datacenter_address_type': {'required': True}, + 'supported_carriers_for_return_shipment': {'readonly': True}, + 'data_center_azure_location': {'readonly': True}, + } + + _attribute_map = { + 'datacenter_address_type': {'key': 'datacenterAddressType', 'type': 'str'}, + 'supported_carriers_for_return_shipment': {'key': 'supportedCarriersForReturnShipment', 'type': '[str]'}, + 'data_center_azure_location': {'key': 'dataCenterAzureLocation', 'type': 'str'}, + } + + _subtype_map = { + 'datacenter_address_type': {'DatacenterAddressInstruction': 'DatacenterAddressInstructionResponse', 'DatacenterAddressLocation': 'DatacenterAddressLocationResponse'} + } + + def __init__( + self, + **kwargs + ): + super(DatacenterAddressResponse, self).__init__(**kwargs) + self.datacenter_address_type = None # type: Optional[str] + self.supported_carriers_for_return_shipment = None + self.data_center_azure_location = None + + +class DatacenterAddressInstructionResponse(DatacenterAddressResponse): + """Datacenter instruction for given storage location. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param datacenter_address_type: Required. Data center address type.Constant filled by server. + Possible values include: "DatacenterAddressLocation", "DatacenterAddressInstruction". + :type datacenter_address_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressType + :ivar supported_carriers_for_return_shipment: List of supported carriers for return shipment. + :vartype supported_carriers_for_return_shipment: list[str] + :ivar data_center_azure_location: Azure Location where the Data Center serves primarily. + :vartype data_center_azure_location: str + :ivar communication_instruction: Data center communication instruction. + :vartype communication_instruction: str + """ + + _validation = { + 'datacenter_address_type': {'required': True}, + 'supported_carriers_for_return_shipment': {'readonly': True}, + 'data_center_azure_location': {'readonly': True}, + 'communication_instruction': {'readonly': True}, + } + + _attribute_map = { + 'datacenter_address_type': {'key': 'datacenterAddressType', 'type': 'str'}, + 'supported_carriers_for_return_shipment': {'key': 'supportedCarriersForReturnShipment', 'type': '[str]'}, + 'data_center_azure_location': {'key': 'dataCenterAzureLocation', 'type': 'str'}, + 'communication_instruction': {'key': 'communicationInstruction', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatacenterAddressInstructionResponse, self).__init__(**kwargs) + self.datacenter_address_type = 'DatacenterAddressInstruction' # type: str + self.communication_instruction = None + + +class DatacenterAddressLocationResponse(DatacenterAddressResponse): + """Datacenter address for given storage location. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param datacenter_address_type: Required. Data center address type.Constant filled by server. + Possible values include: "DatacenterAddressLocation", "DatacenterAddressInstruction". + :type datacenter_address_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressType + :ivar supported_carriers_for_return_shipment: List of supported carriers for return shipment. + :vartype supported_carriers_for_return_shipment: list[str] + :ivar data_center_azure_location: Azure Location where the Data Center serves primarily. + :vartype data_center_azure_location: str + :ivar contact_person_name: Contact person name. + :vartype contact_person_name: str + :ivar company: Company name. + :vartype company: str + :ivar street1: Street address line 1. + :vartype street1: str + :ivar street2: Street address line 2. + :vartype street2: str + :ivar street3: Street address line 3. + :vartype street3: str + :ivar city: City name. + :vartype city: str + :ivar state: name of the state. + :vartype state: str + :ivar zip: Zip code. + :vartype zip: str + :ivar country: name of the country. + :vartype country: str + :ivar phone: Phone number. + :vartype phone: str + :ivar phone_extension: Phone extension. + :vartype phone_extension: str + :ivar address_type: Address type. + :vartype address_type: str + :ivar additional_shipping_information: Special instruction for shipping. + :vartype additional_shipping_information: str + """ + + _validation = { + 'datacenter_address_type': {'required': True}, + 'supported_carriers_for_return_shipment': {'readonly': True}, + 'data_center_azure_location': {'readonly': True}, + 'contact_person_name': {'readonly': True}, + 'company': {'readonly': True}, + 'street1': {'readonly': True}, + 'street2': {'readonly': True}, + 'street3': {'readonly': True}, + 'city': {'readonly': True}, + 'state': {'readonly': True}, + 'zip': {'readonly': True}, + 'country': {'readonly': True}, + 'phone': {'readonly': True}, + 'phone_extension': {'readonly': True}, + 'address_type': {'readonly': True}, + 'additional_shipping_information': {'readonly': True}, + } + + _attribute_map = { + 'datacenter_address_type': {'key': 'datacenterAddressType', 'type': 'str'}, + 'supported_carriers_for_return_shipment': {'key': 'supportedCarriersForReturnShipment', 'type': '[str]'}, + 'data_center_azure_location': {'key': 'dataCenterAzureLocation', 'type': 'str'}, + 'contact_person_name': {'key': 'contactPersonName', 'type': 'str'}, + 'company': {'key': 'company', 'type': 'str'}, + 'street1': {'key': 'street1', 'type': 'str'}, + 'street2': {'key': 'street2', 'type': 'str'}, + 'street3': {'key': 'street3', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'zip': {'key': 'zip', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'phone_extension': {'key': 'phoneExtension', 'type': 'str'}, + 'address_type': {'key': 'addressType', 'type': 'str'}, + 'additional_shipping_information': {'key': 'additionalShippingInformation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatacenterAddressLocationResponse, self).__init__(**kwargs) + self.datacenter_address_type = 'DatacenterAddressLocation' # type: str + self.contact_person_name = None + self.company = None + self.street1 = None + self.street2 = None + self.street3 = None + self.city = None + self.state = None + self.zip = None + self.country = None + self.phone = None + self.phone_extension = None + self.address_type = None + self.additional_shipping_information = None + + +class DatacenterAddressRequest(msrest.serialization.Model): + """Request body to get the datacenter address. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Storage location. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the data center address requested. Possible + values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_location: str, + sku_name: Union[str, "SkuName"], + **kwargs + ): + super(DatacenterAddressRequest, self).__init__(**kwargs) + self.storage_location = storage_location + self.sku_name = sku_name + + +class DataExportDetails(msrest.serialization.Model): + """Details of the data to be used for exporting data from azure. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration: Required. Configuration for the data transfer. + :type transfer_configuration: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransferConfiguration + :param log_collection_level: Level of the logs to be collected. Possible values include: + "Error", "Verbose". Default value: "Error". + :type log_collection_level: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.LogCollectionLevel + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountDetails + """ + + _validation = { + 'transfer_configuration': {'required': True}, + 'account_details': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration': {'key': 'transferConfiguration', 'type': 'TransferConfiguration'}, + 'log_collection_level': {'key': 'logCollectionLevel', 'type': 'str'}, + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + *, + transfer_configuration: "TransferConfiguration", + account_details: "DataAccountDetails", + log_collection_level: Optional[Union[str, "LogCollectionLevel"]] = "Error", + **kwargs + ): + super(DataExportDetails, self).__init__(**kwargs) + self.transfer_configuration = transfer_configuration + self.log_collection_level = log_collection_level + self.account_details = account_details + + +class DataImportDetails(msrest.serialization.Model): + """Details of the data to be used for importing data to azure. + + All required parameters must be populated in order to send to Azure. + + :param account_details: Required. Account details of the data to be transferred. + :type account_details: ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountDetails + """ + + _validation = { + 'account_details': {'required': True}, + } + + _attribute_map = { + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__( + self, + *, + account_details: "DataAccountDetails", + **kwargs + ): + super(DataImportDetails, self).__init__(**kwargs) + self.account_details = account_details + + +class DataLocationToServiceLocationMap(msrest.serialization.Model): + """Map of data location to service location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar data_location: Location of the data. + :vartype data_location: str + :ivar service_location: Location of the service. + :vartype service_location: str + """ + + _validation = { + 'data_location': {'readonly': True}, + 'service_location': {'readonly': True}, + } + + _attribute_map = { + 'data_location': {'key': 'dataLocation', 'type': 'str'}, + 'service_location': {'key': 'serviceLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataLocationToServiceLocationMap, self).__init__(**kwargs) + self.data_location = None + self.service_location = None + + +class DataTransferDetailsValidationRequest(ValidationInputRequest): + """Request to validate export and import data details. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :param data_export_details: List of DataTransfer details to be used to export data from azure. + :type data_export_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataExportDetails] + :param data_import_details: List of DataTransfer details to be used to import data to azure. + :type data_import_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataImportDetails] + :param device_type: Required. Device type. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy", "DataBoxCustomerDisk". + :type device_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'data_export_details': {'key': 'dataExportDetails', 'type': '[DataExportDetails]'}, + 'data_import_details': {'key': 'dataImportDetails', 'type': '[DataImportDetails]'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + transfer_type: Union[str, "TransferType"], + data_export_details: Optional[List["DataExportDetails"]] = None, + data_import_details: Optional[List["DataImportDetails"]] = None, + **kwargs + ): + super(DataTransferDetailsValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.data_export_details = data_export_details + self.data_import_details = data_import_details + self.device_type = device_type + self.transfer_type = transfer_type + + +class DataTransferDetailsValidationResponseProperties(ValidationInputResponse): + """Properties of data transfer details validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar status: Data transfer details validation status. Possible values include: "Valid", + "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTransferDetailsValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateDataTransferDetails' # type: str + self.status = None + + +class DcAccessSecurityCode(msrest.serialization.Model): + """Dc access security code. + + :param reverse_dc_access_code: Reverse Dc access security code. + :type reverse_dc_access_code: str + :param forward_dc_access_code: Forward Dc access security code. + :type forward_dc_access_code: str + """ + + _attribute_map = { + 'reverse_dc_access_code': {'key': 'reverseDCAccessCode', 'type': 'str'}, + 'forward_dc_access_code': {'key': 'forwardDCAccessCode', 'type': 'str'}, + } + + def __init__( + self, + *, + reverse_dc_access_code: Optional[str] = None, + forward_dc_access_code: Optional[str] = None, + **kwargs + ): + super(DcAccessSecurityCode, self).__init__(**kwargs) + self.reverse_dc_access_code = reverse_dc_access_code + self.forward_dc_access_code = forward_dc_access_code + + +class Details(msrest.serialization.Model): + """Details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: str, + message: str, + **kwargs + ): + super(Details, self).__init__(**kwargs) + self.code = code + self.message = message + + +class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling disk orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + :param expected_data_size_in_tera_bytes: Required. The expected size of the data, which needs + to be transferred in this job, in terabytes. + :type expected_data_size_in_tera_bytes: int + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + 'expected_data_size_in_tera_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + } + + def __init__( + self, + *, + storage_location: str, + expected_data_size_in_tera_bytes: int, + country: Optional[str] = None, + **kwargs + ): + super(DiskScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBoxDisk' # type: str + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes + + +class DiskSecret(msrest.serialization.Model): + """Contains all the secrets of a Disk. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar disk_serial_number: Serial number of the assigned disk. + :vartype disk_serial_number: str + :ivar bit_locker_key: Bit Locker key of the disk which can be used to unlock the disk to copy + data. + :vartype bit_locker_key: str + """ + + _validation = { + 'disk_serial_number': {'readonly': True}, + 'bit_locker_key': {'readonly': True}, + } + + _attribute_map = { + 'disk_serial_number': {'key': 'diskSerialNumber', 'type': 'str'}, + 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskSecret, self).__init__(**kwargs) + self.disk_serial_number = None + self.bit_locker_key = None + + +class EncryptionPreferences(msrest.serialization.Model): + """Preferences related to the Encryption. + + :param double_encryption: Defines secondary layer of software-based encryption enablement. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type double_encryption: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DoubleEncryption + """ + + _attribute_map = { + 'double_encryption': {'key': 'doubleEncryption', 'type': 'str'}, + } + + def __init__( + self, + *, + double_encryption: Optional[Union[str, "DoubleEncryption"]] = "Disabled", + **kwargs + ): + super(EncryptionPreferences, self).__init__(**kwargs) + self.double_encryption = double_encryption + + +class ErrorDetail(msrest.serialization.Model): + """ErrorDetail. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. + :type code: str + :param message: Required. + :type message: str + :param details: + :type details: list[~azure.mgmt.databox.v2021_08_01_preview.models.Details] + :param target: + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Details]'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + *, + code: str, + message: str, + details: Optional[List["Details"]] = None, + target: Optional[str] = None, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + self.target = target + + +class ExportDiskDetails(msrest.serialization.Model): + """Export disk details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar manifest_file: The relative path of the manifest file on the disk. + :vartype manifest_file: str + :ivar manifest_hash: The Base16-encoded MD5 hash of the manifest file on the disk. + :vartype manifest_hash: str + :ivar backup_manifest_cloud_path: Path to backed up manifest, only returned if + enableManifestBackup is true. + :vartype backup_manifest_cloud_path: str + """ + + _validation = { + 'manifest_file': {'readonly': True}, + 'manifest_hash': {'readonly': True}, + 'backup_manifest_cloud_path': {'readonly': True}, + } + + _attribute_map = { + 'manifest_file': {'key': 'manifestFile', 'type': 'str'}, + 'manifest_hash': {'key': 'manifestHash', 'type': 'str'}, + 'backup_manifest_cloud_path': {'key': 'backupManifestCloudPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExportDiskDetails, self).__init__(**kwargs) + self.manifest_file = None + self.manifest_hash = None + self.backup_manifest_cloud_path = None + + +class FilterFileDetails(msrest.serialization.Model): + """Details of the filter files to be used for data transfer. + + All required parameters must be populated in order to send to Azure. + + :param filter_file_type: Required. Type of the filter file. Possible values include: + "AzureBlob", "AzureFile". + :type filter_file_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.FilterFileType + :param filter_file_path: Required. Path of the file that contains the details of all items to + transfer. + :type filter_file_path: str + """ + + _validation = { + 'filter_file_type': {'required': True}, + 'filter_file_path': {'required': True}, + } + + _attribute_map = { + 'filter_file_type': {'key': 'filterFileType', 'type': 'str'}, + 'filter_file_path': {'key': 'filterFilePath', 'type': 'str'}, + } + + def __init__( + self, + *, + filter_file_type: Union[str, "FilterFileType"], + filter_file_path: str, + **kwargs + ): + super(FilterFileDetails, self).__init__(**kwargs) + self.filter_file_type = filter_file_type + self.filter_file_path = filter_file_path + + +class HeavyScheduleAvailabilityRequest(ScheduleAvailabilityRequest): + """Request body to get the availability for scheduling heavy orders. + + All required parameters must be populated in order to send to Azure. + + :param storage_location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type storage_location: str + :param sku_name: Required. Sku Name for which the order is to be scheduled.Constant filled by + server. Possible values include: "DataBox", "DataBoxDisk", "DataBoxHeavy", + "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param country: Country in which storage location should be supported. + :type country: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_location: str, + country: Optional[str] = None, + **kwargs + ): + super(HeavyScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBoxHeavy' # type: str + + +class IdentityProperties(msrest.serialization.Model): + """Managed identity properties. + + :param type: Managed service identity type. + :type type: str + :param user_assigned: User assigned identity properties. + :type user_assigned: ~azure.mgmt.databox.v2021_08_01_preview.models.UserAssignedProperties + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned': {'key': 'userAssigned', 'type': 'UserAssignedProperties'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + user_assigned: Optional["UserAssignedProperties"] = None, + **kwargs + ): + super(IdentityProperties, self).__init__(**kwargs) + self.type = type + self.user_assigned = user_assigned + + +class ImportDiskDetails(msrest.serialization.Model): + """Import disk details. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param manifest_file: Required. The relative path of the manifest file on the disk. + :type manifest_file: str + :param manifest_hash: Required. The Base16-encoded MD5 hash of the manifest file on the disk. + :type manifest_hash: str + :param bit_locker_key: Required. BitLocker key used to encrypt the disk. + :type bit_locker_key: str + :ivar backup_manifest_cloud_path: Path to backed up manifest, only returned if + enableManifestBackup is true. + :vartype backup_manifest_cloud_path: str + """ + + _validation = { + 'manifest_file': {'required': True}, + 'manifest_hash': {'required': True}, + 'bit_locker_key': {'required': True}, + 'backup_manifest_cloud_path': {'readonly': True}, + } + + _attribute_map = { + 'manifest_file': {'key': 'manifestFile', 'type': 'str'}, + 'manifest_hash': {'key': 'manifestHash', 'type': 'str'}, + 'bit_locker_key': {'key': 'bitLockerKey', 'type': 'str'}, + 'backup_manifest_cloud_path': {'key': 'backupManifestCloudPath', 'type': 'str'}, + } + + def __init__( + self, + *, + manifest_file: str, + manifest_hash: str, + bit_locker_key: str, + **kwargs + ): + super(ImportDiskDetails, self).__init__(**kwargs) + self.manifest_file = manifest_file + self.manifest_hash = manifest_hash + self.bit_locker_key = bit_locker_key + self.backup_manifest_cloud_path = None + + +class JobDeliveryInfo(msrest.serialization.Model): + """Additional delivery info. + + :param scheduled_date_time: Scheduled date time. + :type scheduled_date_time: ~datetime.datetime + """ + + _attribute_map = { + 'scheduled_date_time': {'key': 'scheduledDateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + scheduled_date_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(JobDeliveryInfo, self).__init__(**kwargs) + self.scheduled_date_time = scheduled_date_time + + +class Resource(msrest.serialization.Model): + """Model of the Resource. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_08_01_preview.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_08_01_preview.models.ResourceIdentity + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + } + + def __init__( + self, + *, + location: str, + sku: "Sku", + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceIdentity"] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.sku = sku + self.identity = identity + + +class JobResource(Resource): + """Job Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. This will be one of the supported and + registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a + resource cannot be changed once it is created, but if an identical region is specified on + update the request will succeed. + :type location: str + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param sku: Required. The sku type. + :type sku: ~azure.mgmt.databox.v2021_08_01_preview.models.Sku + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_08_01_preview.models.ResourceIdentity + :ivar name: Name of the object. + :vartype name: str + :ivar id: Id of the object. + :vartype id: str + :ivar type: Type of the object. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.databox.v2021_08_01_preview.models.SystemData + :param transfer_type: Required. Type of the data transfer. Possible values include: + "ImportToAzure", "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + :ivar is_cancellable: Describes whether the job is cancellable or not. + :vartype is_cancellable: bool + :ivar is_deletable: Describes whether the job is deletable or not. + :vartype is_deletable: bool + :ivar is_shipping_address_editable: Describes whether the shipping address is editable or not. + :vartype is_shipping_address_editable: bool + :ivar is_prepare_to_ship_enabled: Is Prepare To Ship Enabled on this job. + :vartype is_prepare_to_ship_enabled: bool + :ivar status: Name of the stage which is in progress. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC", "Created", "ShippedToAzureDC", + "AwaitingShipmentDetails", "PreparingToShipFromAzureDC", "ShippedToCustomer". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :param details: Details of a job run. This field will only be sent for expand details filter. + :type details: ~azure.mgmt.databox.v2021_08_01_preview.models.JobDetails + :ivar cancellation_reason: Reason for cancellation. + :vartype cancellation_reason: str + :param delivery_type: Delivery type of Job. Possible values include: "NonScheduled", + "Scheduled". Default value: "NonScheduled". + :type delivery_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.JobDeliveryType + :param delivery_info: Delivery Info of Job. + :type delivery_info: ~azure.mgmt.databox.v2021_08_01_preview.models.JobDeliveryInfo + :ivar is_cancellable_without_fee: Flag to indicate cancellation of scheduled job. + :vartype is_cancellable_without_fee: bool + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'transfer_type': {'required': True}, + 'is_cancellable': {'readonly': True}, + 'is_deletable': {'readonly': True}, + 'is_shipping_address_editable': {'readonly': True}, + 'is_prepare_to_ship_enabled': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'error': {'readonly': True}, + 'cancellation_reason': {'readonly': True}, + 'is_cancellable_without_fee': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'transfer_type': {'key': 'properties.transferType', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, + 'is_shipping_address_editable': {'key': 'properties.isShippingAddressEditable', 'type': 'bool'}, + 'is_prepare_to_ship_enabled': {'key': 'properties.isPrepareToShipEnabled', 'type': 'bool'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'details': {'key': 'properties.details', 'type': 'JobDetails'}, + 'cancellation_reason': {'key': 'properties.cancellationReason', 'type': 'str'}, + 'delivery_type': {'key': 'properties.deliveryType', 'type': 'str'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, + 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, + } + + def __init__( + self, + *, + location: str, + sku: "Sku", + transfer_type: Union[str, "TransferType"], + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceIdentity"] = None, + details: Optional["JobDetails"] = None, + delivery_type: Optional[Union[str, "JobDeliveryType"]] = "NonScheduled", + delivery_info: Optional["JobDeliveryInfo"] = None, + **kwargs + ): + super(JobResource, self).__init__(location=location, tags=tags, sku=sku, identity=identity, **kwargs) + self.name = None + self.id = None + self.type = None + self.system_data = None + self.transfer_type = transfer_type + self.is_cancellable = None + self.is_deletable = None + self.is_shipping_address_editable = None + self.is_prepare_to_ship_enabled = None + self.status = None + self.start_time = None + self.error = None + self.details = details + self.cancellation_reason = None + self.delivery_type = delivery_type + self.delivery_info = delivery_info + self.is_cancellable_without_fee = None + + +class JobResourceList(msrest.serialization.Model): + """Job Resource Collection. + + :param value: List of job resources. + :type value: list[~azure.mgmt.databox.v2021_08_01_preview.models.JobResource] + :param next_link: Link for the next set of job resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[JobResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["JobResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(JobResourceList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class JobResourceUpdateParameter(msrest.serialization.Model): + """The JobResourceUpdateParameter. + + :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + can be used in viewing and grouping this resource (across resource groups). + :type tags: dict[str, str] + :param identity: Msi identity of the resource. + :type identity: ~azure.mgmt.databox.v2021_08_01_preview.models.ResourceIdentity + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.v2021_08_01_preview.models.UpdateJobDetails + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceIdentity"] = None, + details: Optional["UpdateJobDetails"] = None, + **kwargs + ): + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.tags = tags + self.identity = identity + self.details = details + + +class JobStages(msrest.serialization.Model): + """Job stages. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar stage_name: Name of the job stage. Possible values include: "DeviceOrdered", + "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", + "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", + "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", + "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC", "Created", "ShippedToAzureDC", + "AwaitingShipmentDetails", "PreparingToShipFromAzureDC", "ShippedToCustomer". + :vartype stage_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.StageName + :ivar display_name: Display name of the job stage. + :vartype display_name: str + :ivar stage_status: Status of the job stage. Possible values include: "None", "InProgress", + "Succeeded", "Failed", "Cancelled", "Cancelling", "SucceededWithErrors", + "WaitingForCustomerAction", "SucceededWithWarnings", "WaitingForCustomerActionForKek", + "WaitingForCustomerActionForCleanUp", "CustomerActionPerformedForCleanUp". + :vartype stage_status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.StageStatus + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: ~datetime.datetime + :ivar job_stage_details: Job Stage Details. + :vartype job_stage_details: any + """ + + _validation = { + 'stage_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'stage_status': {'readonly': True}, + 'stage_time': {'readonly': True}, + 'job_stage_details': {'readonly': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'str'}, + 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, + 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(JobStages, self).__init__(**kwargs) + self.stage_name = None + self.display_name = None + self.stage_status = None + self.stage_time = None + self.job_stage_details = None + + +class KeyEncryptionKey(msrest.serialization.Model): + """Encryption key containing details about key to encrypt different keys. + + All required parameters must be populated in order to send to Azure. + + :param kek_type: Required. Type of encryption key used for key encryption. Possible values + include: "MicrosoftManaged", "CustomerManaged". Default value: "MicrosoftManaged". + :type kek_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.KekType + :param identity_properties: Managed identity properties used for key encryption. + :type identity_properties: ~azure.mgmt.databox.v2021_08_01_preview.models.IdentityProperties + :param kek_url: Key encryption key. It is required in case of Customer managed KekType. + :type kek_url: str + :param kek_vault_resource_id: Kek vault resource id. It is required in case of Customer managed + KekType. + :type kek_vault_resource_id: str + """ + + _validation = { + 'kek_type': {'required': True}, + } + + _attribute_map = { + 'kek_type': {'key': 'kekType', 'type': 'str'}, + 'identity_properties': {'key': 'identityProperties', 'type': 'IdentityProperties'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'kek_vault_resource_id': {'key': 'kekVaultResourceID', 'type': 'str'}, + } + + def __init__( + self, + *, + kek_type: Union[str, "KekType"] = "MicrosoftManaged", + identity_properties: Optional["IdentityProperties"] = None, + kek_url: Optional[str] = None, + kek_vault_resource_id: Optional[str] = None, + **kwargs + ): + super(KeyEncryptionKey, self).__init__(**kwargs) + self.kek_type = kek_type + self.identity_properties = identity_properties + self.kek_url = kek_url + self.kek_vault_resource_id = kek_vault_resource_id + + +class LastMitigationActionOnJob(msrest.serialization.Model): + """Last Mitigation Action Performed On Job. + + :param action_date_time_in_utc: Action performed date time. + :type action_date_time_in_utc: ~datetime.datetime + :param is_performed_by_customer: Action performed by customer, + possibility is that mitigation might happen by customer or service or by ops. + :type is_performed_by_customer: bool + :param customer_resolution: Resolution code provided by customer. Possible values include: + "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode + """ + + _attribute_map = { + 'action_date_time_in_utc': {'key': 'actionDateTimeInUtc', 'type': 'iso-8601'}, + 'is_performed_by_customer': {'key': 'isPerformedByCustomer', 'type': 'bool'}, + 'customer_resolution': {'key': 'customerResolution', 'type': 'str'}, + } + + def __init__( + self, + *, + action_date_time_in_utc: Optional[datetime.datetime] = None, + is_performed_by_customer: Optional[bool] = None, + customer_resolution: Optional[Union[str, "CustomerResolutionCode"]] = None, + **kwargs + ): + super(LastMitigationActionOnJob, self).__init__(**kwargs) + self.action_date_time_in_utc = action_date_time_in_utc + self.is_performed_by_customer = is_performed_by_customer + self.customer_resolution = customer_resolution + + +class ManagedDiskDetails(DataAccountDetails): + """Details of the managed disks. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param resource_group_id: Required. Resource Group Id of the compute disks. + :type resource_group_id: str + :param staging_storage_account_id: Required. Resource Id of the storage account that can be + used to copy the vhd for staging. + :type staging_storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'resource_group_id': {'required': True}, + 'staging_storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + 'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_group_id: str, + staging_storage_account_id: str, + share_password: Optional[str] = None, + **kwargs + ): + super(ManagedDiskDetails, self).__init__(share_password=share_password, **kwargs) + self.data_account_type = 'ManagedDisk' # type: str + self.resource_group_id = resource_group_id + self.staging_storage_account_id = staging_storage_account_id + + +class MarkDevicesShippedRequest(msrest.serialization.Model): + """The request body to provide the delivery package details of job. + + All required parameters must be populated in order to send to Azure. + + :param deliver_to_dc_package_details: Required. Delivery package details. + :type deliver_to_dc_package_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageCarrierInfo + """ + + _validation = { + 'deliver_to_dc_package_details': {'required': True}, + } + + _attribute_map = { + 'deliver_to_dc_package_details': {'key': 'deliverToDcPackageDetails', 'type': 'PackageCarrierInfo'}, + } + + def __init__( + self, + *, + deliver_to_dc_package_details: "PackageCarrierInfo", + **kwargs + ): + super(MarkDevicesShippedRequest, self).__init__(**kwargs) + self.deliver_to_dc_package_details = deliver_to_dc_package_details + + +class MitigateJobRequest(msrest.serialization.Model): + """The Mitigate Job captured from request body for Mitigate API. + + All required parameters must be populated in order to send to Azure. + + :param customer_resolution_code: Required. Resolution code for the job. Possible values + include: "None", "MoveToCleanUpDevice", "Resume". + :type customer_resolution_code: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.CustomerResolutionCode + """ + + _validation = { + 'customer_resolution_code': {'required': True}, + } + + _attribute_map = { + 'customer_resolution_code': {'key': 'customerResolutionCode', 'type': 'str'}, + } + + def __init__( + self, + *, + customer_resolution_code: Union[str, "CustomerResolutionCode"], + **kwargs + ): + super(MitigateJobRequest, self).__init__(**kwargs) + self.customer_resolution_code = customer_resolution_code + + +class NotificationPreference(msrest.serialization.Model): + """Notification preference for a job stage. + + All required parameters must be populated in order to send to Azure. + + :param stage_name: Required. Name of the stage. Possible values include: "DevicePrepared", + "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Created", "ShippedToCustomer". + :type stage_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'str'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__( + self, + *, + stage_name: Union[str, "NotificationStageName"], + send_notification: bool = True, + **kwargs + ): + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = stage_name + self.send_notification = send_notification + + +class Operation(msrest.serialization.Model): + """Operation entity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the operation. Format: + {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. + :vartype name: str + :ivar display: Operation display values. + :vartype display: ~azure.mgmt.databox.v2021_08_01_preview.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: any + :ivar origin: Origin of the operation. Can be : user|system|user,system. + :vartype origin: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'properties': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + *, + is_data_action: Optional[bool] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.properties = None + self.origin = None + self.is_data_action = is_data_action + + +class OperationDisplay(msrest.serialization.Model): + """Operation display. + + :param provider: Provider name. + :type provider: str + :param resource: Resource name. + :type resource: str + :param operation: Localized name of the operation for display purpose. + :type operation: str + :param description: Localized description of the operation for display purpose. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationList(msrest.serialization.Model): + """Operation Collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations. + :vartype value: list[~azure.mgmt.databox.v2021_08_01_preview.models.Operation] + :param next_link: Link for the next set of operations. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(OperationList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class PackageCarrierDetails(msrest.serialization.Model): + """Package carrier details. + + :param carrier_account_number: Carrier Account Number of customer for customer disk. + :type carrier_account_number: str + :param carrier_name: Name of the carrier. + :type carrier_name: str + :param tracking_id: Tracking Id of shipment. + :type tracking_id: str + """ + + _attribute_map = { + 'carrier_account_number': {'key': 'carrierAccountNumber', 'type': 'str'}, + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + } + + def __init__( + self, + *, + carrier_account_number: Optional[str] = None, + carrier_name: Optional[str] = None, + tracking_id: Optional[str] = None, + **kwargs + ): + super(PackageCarrierDetails, self).__init__(**kwargs) + self.carrier_account_number = carrier_account_number + self.carrier_name = carrier_name + self.tracking_id = tracking_id + + +class PackageCarrierInfo(msrest.serialization.Model): + """package carrier info. + + :param carrier_name: Name of the carrier. + :type carrier_name: str + :param tracking_id: Tracking Id of shipment. + :type tracking_id: str + """ + + _attribute_map = { + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + } + + def __init__( + self, + *, + carrier_name: Optional[str] = None, + tracking_id: Optional[str] = None, + **kwargs + ): + super(PackageCarrierInfo, self).__init__(**kwargs) + self.carrier_name = carrier_name + self.tracking_id = tracking_id + + +class PackageShippingDetails(msrest.serialization.Model): + """package shipping details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar tracking_url: Url where shipment can be tracked. + :vartype tracking_url: str + :ivar carrier_name: Name of the carrier. + :vartype carrier_name: str + :ivar tracking_id: Tracking Id of shipment. + :vartype tracking_id: str + """ + + _validation = { + 'tracking_url': {'readonly': True}, + 'carrier_name': {'readonly': True}, + 'tracking_id': {'readonly': True}, + } + + _attribute_map = { + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PackageShippingDetails, self).__init__(**kwargs) + self.tracking_url = None + self.carrier_name = None + self.tracking_id = None + + +class Preferences(msrest.serialization.Model): + """Preferences related to the order. + + :param preferred_data_center_region: Preferred data center region. + :type preferred_data_center_region: list[str] + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportPreferences + :param encryption_preferences: Preferences related to the Encryption. + :type encryption_preferences: + ~azure.mgmt.databox.v2021_08_01_preview.models.EncryptionPreferences + """ + + _attribute_map = { + 'preferred_data_center_region': {'key': 'preferredDataCenterRegion', 'type': '[str]'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + 'encryption_preferences': {'key': 'encryptionPreferences', 'type': 'EncryptionPreferences'}, + } + + def __init__( + self, + *, + preferred_data_center_region: Optional[List[str]] = None, + transport_preferences: Optional["TransportPreferences"] = None, + encryption_preferences: Optional["EncryptionPreferences"] = None, + **kwargs + ): + super(Preferences, self).__init__(**kwargs) + self.preferred_data_center_region = preferred_data_center_region + self.transport_preferences = transport_preferences + self.encryption_preferences = encryption_preferences + + +class PreferencesValidationRequest(ValidationInputRequest): + """Request to validate preference of transport and data center. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :param preference: Preference of transport and data center. + :type preference: ~azure.mgmt.databox.v2021_08_01_preview.models.Preferences + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type device_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'preference': {'key': 'preference', 'type': 'Preferences'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + preference: Optional["Preferences"] = None, + **kwargs + ): + super(PreferencesValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.preference = preference + self.device_type = device_type + + +class PreferencesValidationResponseProperties(ValidationInputResponse): + """Properties of data center and transport preference validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar status: Validation status of requested data center and transport. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidatePreferences' # type: str + self.status = None + + +class RegionConfigurationRequest(msrest.serialization.Model): + """Request body to get the configuration for the region. + + :param schedule_availability_request: Request body to get the availability for scheduling + orders. + :type schedule_availability_request: + ~azure.mgmt.databox.v2021_08_01_preview.models.ScheduleAvailabilityRequest + :param transport_availability_request: Request body to get the transport availability for given + sku. + :type transport_availability_request: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportAvailabilityRequest + :param datacenter_address_request: Request body to get the datacenter address for given sku. + :type datacenter_address_request: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressRequest + """ + + _attribute_map = { + 'schedule_availability_request': {'key': 'scheduleAvailabilityRequest', 'type': 'ScheduleAvailabilityRequest'}, + 'transport_availability_request': {'key': 'transportAvailabilityRequest', 'type': 'TransportAvailabilityRequest'}, + 'datacenter_address_request': {'key': 'datacenterAddressRequest', 'type': 'DatacenterAddressRequest'}, + } + + def __init__( + self, + *, + schedule_availability_request: Optional["ScheduleAvailabilityRequest"] = None, + transport_availability_request: Optional["TransportAvailabilityRequest"] = None, + datacenter_address_request: Optional["DatacenterAddressRequest"] = None, + **kwargs + ): + super(RegionConfigurationRequest, self).__init__(**kwargs) + self.schedule_availability_request = schedule_availability_request + self.transport_availability_request = transport_availability_request + self.datacenter_address_request = datacenter_address_request + + +class RegionConfigurationResponse(msrest.serialization.Model): + """Configuration response specific to a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar schedule_availability_response: Schedule availability for given sku in a region. + :vartype schedule_availability_response: + ~azure.mgmt.databox.v2021_08_01_preview.models.ScheduleAvailabilityResponse + :ivar transport_availability_response: Transport options available for given sku in a region. + :vartype transport_availability_response: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportAvailabilityResponse + :ivar datacenter_address_response: Datacenter address for given sku in a region. + :vartype datacenter_address_response: + ~azure.mgmt.databox.v2021_08_01_preview.models.DatacenterAddressResponse + """ + + _validation = { + 'schedule_availability_response': {'readonly': True}, + 'transport_availability_response': {'readonly': True}, + 'datacenter_address_response': {'readonly': True}, + } + + _attribute_map = { + 'schedule_availability_response': {'key': 'scheduleAvailabilityResponse', 'type': 'ScheduleAvailabilityResponse'}, + 'transport_availability_response': {'key': 'transportAvailabilityResponse', 'type': 'TransportAvailabilityResponse'}, + 'datacenter_address_response': {'key': 'datacenterAddressResponse', 'type': 'DatacenterAddressResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(RegionConfigurationResponse, self).__init__(**kwargs) + self.schedule_availability_response = None + self.transport_availability_response = None + self.datacenter_address_response = None + + +class ResourceIdentity(msrest.serialization.Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: Identity type. + :type type: str + :ivar principal_id: Service Principal Id backing the Msi. + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id. + :vartype tenant_id: str + :param user_assigned_identities: User Assigned Identities. + :type user_assigned_identities: dict[str, + ~azure.mgmt.databox.v2021_08_01_preview.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + *, + type: Optional[str] = "None", + user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None, + **kwargs + ): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = None + self.tenant_id = None + self.user_assigned_identities = user_assigned_identities + + +class ScheduleAvailabilityResponse(msrest.serialization.Model): + """Schedule availability for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar available_dates: List of dates available to schedule. + :vartype available_dates: list[~datetime.datetime] + """ + + _validation = { + 'available_dates': {'readonly': True}, + } + + _attribute_map = { + 'available_dates': {'key': 'availableDates', 'type': '[iso-8601]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduleAvailabilityResponse, self).__init__(**kwargs) + self.available_dates = None + + +class ShareCredentialDetails(msrest.serialization.Model): + """Credential details of the shares in account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar share_name: Name of the share. + :vartype share_name: str + :ivar share_type: Type of the share. Possible values include: "UnknownType", "HCS", + "BlockBlob", "PageBlob", "AzureFile", "ManagedDisk". + :vartype share_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ShareDestinationFormatType + :ivar user_name: User name for the share. + :vartype user_name: str + :ivar password: Password for the share. + :vartype password: str + :ivar supported_access_protocols: Access protocols supported on the device. + :vartype supported_access_protocols: list[str or + ~azure.mgmt.databox.v2021_08_01_preview.models.AccessProtocol] + """ + + _validation = { + 'share_name': {'readonly': True}, + 'share_type': {'readonly': True}, + 'user_name': {'readonly': True}, + 'password': {'readonly': True}, + 'supported_access_protocols': {'readonly': True}, + } + + _attribute_map = { + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'share_type': {'key': 'shareType', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareCredentialDetails, self).__init__(**kwargs) + self.share_name = None + self.share_type = None + self.user_name = None + self.password = None + self.supported_access_protocols = None + + +class ShipmentPickUpRequest(msrest.serialization.Model): + """Shipment pick up request details. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. Minimum date after which the pick up should commence, this must be + in local time of pick up area. + :type start_time: ~datetime.datetime + :param end_time: Required. Maximum date before which the pick up should commence, this must be + in local time of pick up area. + :type end_time: ~datetime.datetime + :param shipment_location: Required. Shipment Location in the pickup place. Eg.front desk. + :type shipment_location: str + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + 'shipment_location': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'shipment_location': {'key': 'shipmentLocation', 'type': 'str'}, + } + + def __init__( + self, + *, + start_time: datetime.datetime, + end_time: datetime.datetime, + shipment_location: str, + **kwargs + ): + super(ShipmentPickUpRequest, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.shipment_location = shipment_location + + +class ShipmentPickUpResponse(msrest.serialization.Model): + """Shipment pick up response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar confirmation_number: Confirmation number for the pick up request. + :vartype confirmation_number: str + :ivar ready_by_time: Time by which shipment should be ready for pick up, this is in local time + of pick up area. + :vartype ready_by_time: ~datetime.datetime + """ + + _validation = { + 'confirmation_number': {'readonly': True}, + 'ready_by_time': {'readonly': True}, + } + + _attribute_map = { + 'confirmation_number': {'key': 'confirmationNumber', 'type': 'str'}, + 'ready_by_time': {'key': 'readyByTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ShipmentPickUpResponse, self).__init__(**kwargs) + self.confirmation_number = None + self.ready_by_time = None + + +class ShippingAddress(msrest.serialization.Model): + """Shipping address where customer wishes to receive the device. + + All required parameters must be populated in order to send to Azure. + + :param street_address1: Required. Street Address line 1. + :type street_address1: str + :param street_address2: Street Address line 2. + :type street_address2: str + :param street_address3: Street Address line 3. + :type street_address3: str + :param city: Name of the City. + :type city: str + :param state_or_province: Name of the State or Province. + :type state_or_province: str + :param country: Required. Name of the Country. + :type country: str + :param postal_code: Postal code. + :type postal_code: str + :param zip_extended_code: Extended Zip Code. + :type zip_extended_code: str + :param company_name: Name of the company. + :type company_name: str + :param address_type: Type of address. Possible values include: "None", "Residential", + "Commercial". Default value: "None". + :type address_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.AddressType + """ + + _validation = { + 'street_address1': {'required': True}, + 'country': {'required': True}, + } + + _attribute_map = { + 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, + 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, + 'street_address3': {'key': 'streetAddress3', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'zip_extended_code': {'key': 'zipExtendedCode', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'address_type': {'key': 'addressType', 'type': 'str'}, + } + + def __init__( + self, + *, + street_address1: str, + country: str, + street_address2: Optional[str] = None, + street_address3: Optional[str] = None, + city: Optional[str] = None, + state_or_province: Optional[str] = None, + postal_code: Optional[str] = None, + zip_extended_code: Optional[str] = None, + company_name: Optional[str] = None, + address_type: Optional[Union[str, "AddressType"]] = "None", + **kwargs + ): + super(ShippingAddress, self).__init__(**kwargs) + self.street_address1 = street_address1 + self.street_address2 = street_address2 + self.street_address3 = street_address3 + self.city = city + self.state_or_province = state_or_province + self.country = country + self.postal_code = postal_code + self.zip_extended_code = zip_extended_code + self.company_name = company_name + self.address_type = address_type + + +class Sku(msrest.serialization.Model): + """The Sku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy", "DataBoxCustomerDisk". + :type name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param display_name: The display name of the sku. + :type display_name: str + :param family: The sku family. + :type family: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Union[str, "SkuName"], + display_name: Optional[str] = None, + family: Optional[str] = None, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.family = family + + +class SkuAvailabilityValidationRequest(ValidationInputRequest): + """Request to validate sku availability. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type device_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param transfer_type: Required. Type of the transfer. Possible values include: "ImportToAzure", + "ExportFromAzure". + :type transfer_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.TransferType + :param country: Required. ISO country code. Country for hardware shipment. For codes check: + https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. + :type country: str + :param location: Required. Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + :type location: str + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transfer_type': {'key': 'transferType', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + device_type: Union[str, "SkuName"], + transfer_type: Union[str, "TransferType"], + country: str, + location: str, + **kwargs + ): + super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.device_type = device_type + self.transfer_type = transfer_type + self.country = country + self.location = location + + +class SkuAvailabilityValidationResponseProperties(ValidationInputResponse): + """Properties of sku availability validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar status: Sku availability validation status. Possible values include: "Valid", "Invalid", + "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSkuAvailability' # type: str + self.status = None + + +class SkuCapacity(msrest.serialization.Model): + """Capacity of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar usable: Usable capacity in TB. + :vartype usable: str + :ivar maximum: Maximum capacity in TB. + :vartype maximum: str + """ + + _validation = { + 'usable': {'readonly': True}, + 'maximum': {'readonly': True}, + } + + _attribute_map = { + 'usable': {'key': 'usable', 'type': 'str'}, + 'maximum': {'key': 'maximum', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.usable = None + self.maximum = None + + +class SkuCost(msrest.serialization.Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar meter_id: Meter id of the Sku. + :vartype meter_id: str + :ivar meter_type: The type of the meter. + :vartype meter_type: str + :ivar multiplier: Multiplier specifies the region specific value to be multiplied with 1$ guid. + Eg: Our new regions will be using 1$ shipping guid with appropriate multiplier specific to + region. + :vartype multiplier: float + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'meter_type': {'readonly': True}, + 'multiplier': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_type': {'key': 'meterType', 'type': 'str'}, + 'multiplier': {'key': 'multiplier', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.meter_type = None + self.multiplier = None + + +class SkuInformation(msrest.serialization.Model): + """Information of the sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar sku: The Sku. + :vartype sku: ~azure.mgmt.databox.v2021_08_01_preview.models.Sku + :ivar enabled: The sku is enabled or not. + :vartype enabled: bool + :ivar data_location_to_service_location_map: The map of data location to service location. + :vartype data_location_to_service_location_map: + list[~azure.mgmt.databox.v2021_08_01_preview.models.DataLocationToServiceLocationMap] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.v2021_08_01_preview.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.v2021_08_01_preview.models.SkuCost] + :ivar api_versions: Api versions that support this Sku. + :vartype api_versions: list[str] + :ivar disabled_reason: Reason why the Sku is disabled. Possible values include: "None", + "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo". + :vartype disabled_reason: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.SkuDisabledReason + :ivar disabled_reason_message: Message for why the Sku is disabled. + :vartype disabled_reason_message: str + :ivar required_feature: Required feature to access the sku. + :vartype required_feature: str + """ + + _validation = { + 'sku': {'readonly': True}, + 'enabled': {'readonly': True}, + 'data_location_to_service_location_map': {'readonly': True}, + 'capacity': {'readonly': True}, + 'costs': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'disabled_reason': {'readonly': True}, + 'disabled_reason_message': {'readonly': True}, + 'required_feature': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'data_location_to_service_location_map': {'key': 'properties.dataLocationToServiceLocationMap', 'type': '[DataLocationToServiceLocationMap]'}, + 'capacity': {'key': 'properties.capacity', 'type': 'SkuCapacity'}, + 'costs': {'key': 'properties.costs', 'type': '[SkuCost]'}, + 'api_versions': {'key': 'properties.apiVersions', 'type': '[str]'}, + 'disabled_reason': {'key': 'properties.disabledReason', 'type': 'str'}, + 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, + 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuInformation, self).__init__(**kwargs) + self.sku = None + self.enabled = None + self.data_location_to_service_location_map = None + self.capacity = None + self.costs = None + self.api_versions = None + self.disabled_reason = None + self.disabled_reason_message = None + self.required_feature = None + + +class StorageAccountDetails(DataAccountDetails): + """Details for the storage account. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Account Type of the data to be transferred.Constant filled + by server. Possible values include: "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :param share_password: Password for all the shares to be created on the device. Should not be + passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate + password itself. This will not be returned in Get Call. Password Requirements : Password must + be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + alphabet, one number and one special character. Password cannot have the following characters : + IilLoO0 Password can have only alphabets, numbers and these characters : @#-$%^!+=;:_()]+. + :type share_password: str + :param storage_account_id: Required. Storage Account Resource Id. + :type storage_account_id: str + """ + + _validation = { + 'data_account_type': {'required': True}, + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_account_id: str, + share_password: Optional[str] = None, + **kwargs + ): + super(StorageAccountDetails, self).__init__(share_password=share_password, **kwargs) + self.data_account_type = 'StorageAccount' # type: str + self.storage_account_id = storage_account_id + + +class SubscriptionIsAllowedToCreateJobValidationRequest(ValidationInputRequest): + """Request to validate subscription permission to create jobs. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + + +class SubscriptionIsAllowedToCreateJobValidationResponseProperties(ValidationInputResponse): + """Properties of subscription permission to create job validation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation response.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.v2021_08_01_preview.models.CloudError + :ivar status: Validation status of subscription permission to create job. Possible values + include: "Valid", "Invalid", "Skipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationStatus + """ + + _validation = { + 'validation_type': {'required': True}, + 'error': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' # type: str + self.status = None + + +class SystemData(msrest.serialization.Model): + """Provides details about resource creation and update time. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_by: A string identifier for the identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource: user, application, + managedIdentity. + :vartype created_by_type: str + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: A string identifier for the identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource: user, + application, managedIdentity. + :vartype last_modified_by_type: str + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _validation = { + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + } + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = None + self.created_by_type = None + self.created_at = None + self.last_modified_by = None + self.last_modified_by_type = None + self.last_modified_at = None + + +class TransferAllDetails(msrest.serialization.Model): + """Details to transfer all data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :param transfer_all_blobs: To indicate if all Azure blobs have to be transferred. + :type transfer_all_blobs: bool + :param transfer_all_files: To indicate if all Azure Files have to be transferred. + :type transfer_all_files: bool + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'transfer_all_blobs': {'key': 'transferAllBlobs', 'type': 'bool'}, + 'transfer_all_files': {'key': 'transferAllFiles', 'type': 'bool'}, + } + + def __init__( + self, + *, + data_account_type: Union[str, "DataAccountType"], + transfer_all_blobs: Optional[bool] = None, + transfer_all_files: Optional[bool] = None, + **kwargs + ): + super(TransferAllDetails, self).__init__(**kwargs) + self.data_account_type = data_account_type + self.transfer_all_blobs = transfer_all_blobs + self.transfer_all_files = transfer_all_files + + +class TransferConfiguration(msrest.serialization.Model): + """Configuration for defining the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param transfer_configuration_type: Required. Type of the configuration for transfer. Possible + values include: "TransferAll", "TransferUsingFilter". + :type transfer_configuration_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.TransferConfigurationType + :param transfer_filter_details: Map of filter type and the details to filter. This field is + required only if the TransferConfigurationType is given as TransferUsingFilter. + :type transfer_filter_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransferConfigurationTransferFilterDetails + :param transfer_all_details: Map of filter type and the details to transfer all data. This + field is required only if the TransferConfigurationType is given as TransferAll. + :type transfer_all_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransferConfigurationTransferAllDetails + """ + + _validation = { + 'transfer_configuration_type': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration_type': {'key': 'transferConfigurationType', 'type': 'str'}, + 'transfer_filter_details': {'key': 'transferFilterDetails', 'type': 'TransferConfigurationTransferFilterDetails'}, + 'transfer_all_details': {'key': 'transferAllDetails', 'type': 'TransferConfigurationTransferAllDetails'}, + } + + def __init__( + self, + *, + transfer_configuration_type: Union[str, "TransferConfigurationType"], + transfer_filter_details: Optional["TransferConfigurationTransferFilterDetails"] = None, + transfer_all_details: Optional["TransferConfigurationTransferAllDetails"] = None, + **kwargs + ): + super(TransferConfiguration, self).__init__(**kwargs) + self.transfer_configuration_type = transfer_configuration_type + self.transfer_filter_details = transfer_filter_details + self.transfer_all_details = transfer_all_details + + +class TransferConfigurationTransferAllDetails(msrest.serialization.Model): + """Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll. + + :param include: Details to transfer all data. + :type include: ~azure.mgmt.databox.v2021_08_01_preview.models.TransferAllDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferAllDetails'}, + } + + def __init__( + self, + *, + include: Optional["TransferAllDetails"] = None, + **kwargs + ): + super(TransferConfigurationTransferAllDetails, self).__init__(**kwargs) + self.include = include + + +class TransferConfigurationTransferFilterDetails(msrest.serialization.Model): + """Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. + + :param include: Details of the filtering the transfer of data. + :type include: ~azure.mgmt.databox.v2021_08_01_preview.models.TransferFilterDetails + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferFilterDetails'}, + } + + def __init__( + self, + *, + include: Optional["TransferFilterDetails"] = None, + **kwargs + ): + super(TransferConfigurationTransferFilterDetails, self).__init__(**kwargs) + self.include = include + + +class TransferFilterDetails(msrest.serialization.Model): + """Details of the filtering the transfer of data. + + All required parameters must be populated in order to send to Azure. + + :param data_account_type: Required. Type of the account of data. Possible values include: + "StorageAccount", "ManagedDisk". + :type data_account_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.DataAccountType + :param blob_filter_details: Filter details to transfer blobs. + :type blob_filter_details: ~azure.mgmt.databox.v2021_08_01_preview.models.BlobFilterDetails + :param azure_file_filter_details: Filter details to transfer Azure files. + :type azure_file_filter_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.AzureFileFilterDetails + :param filter_file_details: Details of the filter files to be used for data transfer. + :type filter_file_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.FilterFileDetails] + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'blob_filter_details': {'key': 'blobFilterDetails', 'type': 'BlobFilterDetails'}, + 'azure_file_filter_details': {'key': 'azureFileFilterDetails', 'type': 'AzureFileFilterDetails'}, + 'filter_file_details': {'key': 'filterFileDetails', 'type': '[FilterFileDetails]'}, + } + + def __init__( + self, + *, + data_account_type: Union[str, "DataAccountType"], + blob_filter_details: Optional["BlobFilterDetails"] = None, + azure_file_filter_details: Optional["AzureFileFilterDetails"] = None, + filter_file_details: Optional[List["FilterFileDetails"]] = None, + **kwargs + ): + super(TransferFilterDetails, self).__init__(**kwargs) + self.data_account_type = data_account_type + self.blob_filter_details = blob_filter_details + self.azure_file_filter_details = azure_file_filter_details + self.filter_file_details = filter_file_details + + +class TransportAvailabilityDetails(msrest.serialization.Model): + """Transport options availability details for given region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar shipment_type: Transport Shipment Type supported for given region. Possible values + include: "CustomerManaged", "MicrosoftManaged". + :vartype shipment_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportShipmentTypes + """ + + _validation = { + 'shipment_type': {'readonly': True}, + } + + _attribute_map = { + 'shipment_type': {'key': 'shipmentType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityDetails, self).__init__(**kwargs) + self.shipment_type = None + + +class TransportAvailabilityRequest(msrest.serialization.Model): + """Request body to get the transport availability for given sku. + + :param sku_name: Type of the device. Possible values include: "DataBox", "DataBoxDisk", + "DataBoxHeavy", "DataBoxCustomerDisk". + :type sku_name: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + """ + + _attribute_map = { + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__( + self, + *, + sku_name: Optional[Union[str, "SkuName"]] = None, + **kwargs + ): + super(TransportAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = sku_name + + +class TransportAvailabilityResponse(msrest.serialization.Model): + """Transport options available for given sku in a region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar transport_availability_details: List of transport availability details for given region. + :vartype transport_availability_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.TransportAvailabilityDetails] + """ + + _validation = { + 'transport_availability_details': {'readonly': True}, + } + + _attribute_map = { + 'transport_availability_details': {'key': 'transportAvailabilityDetails', 'type': '[TransportAvailabilityDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(TransportAvailabilityResponse, self).__init__(**kwargs) + self.transport_availability_details = None + + +class TransportPreferences(msrest.serialization.Model): + """Preferences related to the shipment logistics of the sku. + + All required parameters must be populated in order to send to Azure. + + :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". + :type preferred_shipment_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportShipmentTypes + """ + + _validation = { + 'preferred_shipment_type': {'required': True}, + } + + _attribute_map = { + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'str'}, + } + + def __init__( + self, + *, + preferred_shipment_type: Union[str, "TransportShipmentTypes"], + **kwargs + ): + super(TransportPreferences, self).__init__(**kwargs) + self.preferred_shipment_type = preferred_shipment_type + + +class UnencryptedCredentials(msrest.serialization.Model): + """Unencrypted credentials for accessing device. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar job_name: Name of the job. + :vartype job_name: str + :ivar job_secrets: Secrets related to this job. + :vartype job_secrets: ~azure.mgmt.databox.v2021_08_01_preview.models.JobSecrets + """ + + _validation = { + 'job_name': {'readonly': True}, + 'job_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'job_secrets': {'key': 'jobSecrets', 'type': 'JobSecrets'}, + } + + def __init__( + self, + **kwargs + ): + super(UnencryptedCredentials, self).__init__(**kwargs) + self.job_name = None + self.job_secrets = None + + +class UnencryptedCredentialsList(msrest.serialization.Model): + """List of unencrypted credentials for accessing device. + + :param value: List of unencrypted credentials. + :type value: list[~azure.mgmt.databox.v2021_08_01_preview.models.UnencryptedCredentials] + :param next_link: Link for the next set of unencrypted credentials. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UnencryptedCredentials]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["UnencryptedCredentials"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(UnencryptedCredentialsList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class UpdateJobDetails(msrest.serialization.Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.v2021_08_01_preview.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :param key_encryption_key: Key encryption key for the job. + :type key_encryption_key: ~azure.mgmt.databox.v2021_08_01_preview.models.KeyEncryptionKey + :param return_to_customer_package_details: Return package details of job. + :type return_to_customer_package_details: + ~azure.mgmt.databox.v2021_08_01_preview.models.PackageCarrierDetails + """ + + _attribute_map = { + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyEncryptionKey'}, + 'return_to_customer_package_details': {'key': 'returnToCustomerPackageDetails', 'type': 'PackageCarrierDetails'}, + } + + def __init__( + self, + *, + contact_details: Optional["ContactDetails"] = None, + shipping_address: Optional["ShippingAddress"] = None, + key_encryption_key: Optional["KeyEncryptionKey"] = None, + return_to_customer_package_details: Optional["PackageCarrierDetails"] = None, + **kwargs + ): + super(UpdateJobDetails, self).__init__(**kwargs) + self.contact_details = contact_details + self.shipping_address = shipping_address + self.key_encryption_key = key_encryption_key + self.return_to_customer_package_details = return_to_customer_package_details + + +class UserAssignedIdentity(msrest.serialization.Model): + """Class defining User assigned identity details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedProperties(msrest.serialization.Model): + """User assigned identity properties. + + :param resource_id: Arm resource id for user assigned identity to be used to fetch MSI token. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + **kwargs + ): + super(UserAssignedProperties, self).__init__(**kwargs) + self.resource_id = resource_id + + +class ValidateAddress(ValidationInputRequest): + """The requirements to validate customer address where the device needs to be shipped. + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Identifies the type of validation request.Constant filled by + server. Possible values include: "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", "ValidatePreferences", "ValidateCreateOrderLimit", + "ValidateSkuAvailability", "ValidateDataTransferDetails". + :type validation_type: str or + ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputDiscriminator + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ShippingAddress + :param device_type: Required. Device type to be used for the job. Possible values include: + "DataBox", "DataBoxDisk", "DataBoxHeavy", "DataBoxCustomerDisk". + :type device_type: str or ~azure.mgmt.databox.v2021_08_01_preview.models.SkuName + :param transport_preferences: Preferences related to the shipment logistics of the sku. + :type transport_preferences: + ~azure.mgmt.databox.v2021_08_01_preview.models.TransportPreferences + """ + + _validation = { + 'validation_type': {'required': True}, + 'shipping_address': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__( + self, + *, + shipping_address: "ShippingAddress", + device_type: Union[str, "SkuName"], + transport_preferences: Optional["TransportPreferences"] = None, + **kwargs + ): + super(ValidateAddress, self).__init__(**kwargs) + self.validation_type = 'ValidateAddress' # type: str + self.shipping_address = shipping_address + self.device_type = device_type + self.transport_preferences = transport_preferences + + +class ValidationResponse(msrest.serialization.Model): + """Response of pre job creation validations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Overall validation status. Possible values include: "AllValidToProceed", + "InputsRevisitRequired", "CertainInputValidationsSkipped". + :vartype status: str or ~azure.mgmt.databox.v2021_08_01_preview.models.OverallValidationStatus + :ivar individual_response_details: List of response details contain validationType and its + response as key and value respectively. + :vartype individual_response_details: + list[~azure.mgmt.databox.v2021_08_01_preview.models.ValidationInputResponse] + """ + + _validation = { + 'status': {'readonly': True}, + 'individual_response_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'individual_response_details': {'key': 'properties.individualResponseDetails', 'type': '[ValidationInputResponse]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidationResponse, self).__init__(**kwargs) + self.status = None + self.individual_response_details = None diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/__init__.py new file mode 100644 index 0000000000000..bd13cc67afb6e --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/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 ._operations import Operations +from ._jobs_operations import JobsOperations +from ._data_box_management_client_operations import DataBoxManagementClientOperationsMixin +from ._service_operations import ServiceOperations + +__all__ = [ + 'Operations', + 'JobsOperations', + 'DataBoxManagementClientOperationsMixin', + 'ServiceOperations', +] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_data_box_management_client_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_data_box_management_client_operations.py new file mode 100644 index 0000000000000..6c3cc3babdd9d --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_data_box_management_client_operations.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +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 HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +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]] + +class DataBoxManagementClientOperationsMixin(object): + + def mitigate( + self, + job_name, # type: str + resource_group_name, # type: str + mitigate_job_request, # type: "_models.MitigateJobRequest" + **kwargs # type: Any + ): + # type: (...) -> None + """Request to mitigate for a given job. + + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param mitigate_job_request: Mitigation Request. + :type mitigate_job_request: ~azure.mgmt.databox.v2021_08_01_preview.models.MitigateJobRequest + :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', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.mitigate.metadata['url'] # type: ignore + path_format_arguments = { + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(mitigate_job_request, 'MitigateJobRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + mitigate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_jobs_operations.py new file mode 100644 index 0000000000000..3ae7433b2ce32 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_jobs_operations.py @@ -0,0 +1,926 @@ +# 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 +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations(object): + """JobsOperations 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.databox.v2021_08_01_preview.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 + + def list( + self, + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobResourceList"] + """Lists all the jobs available under the subscription. + + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_08_01_preview.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def mark_devices_shipped( + self, + job_name, # type: str + resource_group_name, # type: str + mark_devices_shipped_request, # type: "_models.MarkDevicesShippedRequest" + **kwargs # type: Any + ): + # type: (...) -> None + """Request to mark devices for a given job as shipped. + + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param mark_devices_shipped_request: Mark Devices Shipped Request. + :type mark_devices_shipped_request: ~azure.mgmt.databox.v2021_08_01_preview.models.MarkDevicesShippedRequest + :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', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.mark_devices_shipped.metadata['url'] # type: ignore + path_format_arguments = { + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(mark_devices_shipped_request, 'MarkDevicesShippedRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + mark_devices_shipped.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/markDevicesShipped'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobResourceList"] + """Lists all the jobs available under the given resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of jobs, which provides the next page in + the list of jobs. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_08_01_preview.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('JobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} # type: ignore + + def get( + self, + resource_group_name, # type: str + job_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.JobResource" + """Gets information about the specified job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param expand: $expand is supported on details parameter for job, which provides details on the + job stages. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobResource, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource, # type: "_models.JobResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.JobResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource, 'JobResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource, # type: "_models.JobResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.JobResource"] + """Creates a new job with the specified parameters. Existing job cannot be updated with this API + and should instead be updated with the Update job API. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource: Job details from request body. + :type job_resource: ~azure.mgmt.databox.v2021_08_01_preview.models.JobResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2021_08_01_preview.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource_update_parameter, # type: "_models.JobResourceUpdateParameter" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.JobResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.JobResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + job_name, # type: str + job_resource_update_parameter, # type: "_models.JobResourceUpdateParameter" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.JobResource"] + """Updates the properties of an existing job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param job_resource_update_parameter: Job update parameters from request body. + :type job_resource_update_parameter: ~azure.mgmt.databox.v2021_08_01_preview.models.JobResourceUpdateParameter + :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag + of the job on the server matches this value. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either JobResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databox.v2021_08_01_preview.models.JobResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource_update_parameter=job_resource_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} # type: ignore + + def book_shipment_pick_up( + self, + resource_group_name, # type: str + job_name, # type: str + shipment_pick_up_request, # type: "_models.ShipmentPickUpRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ShipmentPickUpResponse" + """Book shipment pick up. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param shipment_pick_up_request: Details of shipment pick up request. + :type shipment_pick_up_request: ~azure.mgmt.databox.v2021_08_01_preview.models.ShipmentPickUpRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShipmentPickUpResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.ShipmentPickUpResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ShipmentPickUpResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ShipmentPickUpResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} # type: ignore + + def cancel( + self, + resource_group_name, # type: str + job_name, # type: str + cancellation_reason, # type: "_models.CancellationReason" + **kwargs # type: Any + ): + # type: (...) -> None + """CancelJob. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.databox.v2021_08_01_preview.models.CancellationReason + :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', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} # type: ignore + + def list_credentials( + self, + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.UnencryptedCredentialsList"] + """This method gets the unencrypted secrets related to the job. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param job_name: The name of the job Resource within the specified resource group. job names + must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + :type job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UnencryptedCredentialsList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_08_01_preview.models.UnencryptedCredentialsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnencryptedCredentialsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('UnencryptedCredentialsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_operations.py new file mode 100644 index 0000000000000..eabb14e7640a1 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_operations.py @@ -0,0 +1,110 @@ +# 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 +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations 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.databox.v2021_08_01_preview.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 + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationList"] + """This method gets all the operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_08_01_preview.models.OperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_service_operations.py new file mode 100644 index 0000000000000..81e54241695da --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/operations/_service_operations.py @@ -0,0 +1,466 @@ +# 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 +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServiceOperations(object): + """ServiceOperations 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.databox.v2021_08_01_preview.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 + + def list_available_skus_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + available_sku_request, # type: "_models.AvailableSkuRequest" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AvailableSkusResult"] + """This method provides the list of available skus for the given subscription, resource group and + location. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param available_sku_request: Filters for showing the available skus. + :type available_sku_request: ~azure.mgmt.databox.v2021_08_01_preview.models.AvailableSkuRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableSkusResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databox.v2021_08_01_preview.models.AvailableSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_available_skus_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} # type: ignore + + def validate_address( + self, + location, # type: str + validate_address, # type: "_models.ValidateAddress" + **kwargs # type: Any + ): + # type: (...) -> "_models.AddressValidationOutput" + """[DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer + shipping address and provide alternate addresses if any. + + :param location: The location of the resource. + :type location: str + :param validate_address: Shipping address of the customer. + :type validate_address: ~azure.mgmt.databox.v2021_08_01_preview.models.ValidateAddress + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressValidationOutput, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.AddressValidationOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressValidationOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_address.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_address, 'ValidateAddress') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressValidationOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_address.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} # type: ignore + + def validate_inputs_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + validation_request, # type: "_models.ValidationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidationResponse" + """This method does all necessary pre-job creation validation under resource group. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + def validate_inputs( + self, + location, # type: str + validation_request, # type: "_models.ValidationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidationResponse" + """This method does all necessary pre-job creation validation under subscription. + + :param location: The location of the resource. + :type location: str + :param validation_request: Inputs of the customer. + :type validation_request: ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.ValidationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_inputs.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validation_request, 'ValidationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} # type: ignore + + def region_configuration( + self, + location, # type: str + region_configuration_request, # type: "_models.RegionConfigurationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.RegionConfigurationResponse" + """This API provides configuration details specific to given region/location at Subscription + level. + + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region. + :type region_configuration_request: ~azure.mgmt.databox.v2021_08_01_preview.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore + + def region_configuration_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + region_configuration_request, # type: "_models.RegionConfigurationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.RegionConfigurationResponse" + """This API provides configuration details specific to given region/location at Resource group + level. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param location: The location of the resource. + :type location: str + :param region_configuration_request: Request body to get the configuration for the region at + resource group level. + :type region_configuration_request: ~azure.mgmt.databox.v2021_08_01_preview.models.RegionConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegionConfigurationResponse, or the result of cls(response) + :rtype: ~azure.mgmt.databox.v2021_08_01_preview.models.RegionConfigurationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegionConfigurationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.region_configuration_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegionConfigurationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + region_configuration_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} # type: ignore diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/py.typed b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2021_08_01_preview/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file