From 9b7c3cbed36ba7acd25171a6dc6db045970d8af6 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 23 Feb 2021 14:28:35 +0000 Subject: [PATCH] CodeGen from PR 13113 in Azure/azure-rest-api-specs Merge 82d62662ddea3da9adf5a89632c5efe44cc820e8 into 3ae2e25456e7d9ec0b7825f5a33a93a963f89dd6 --- .../databox/_data_box_management_client.py | 155 +- .../azure/mgmt/databox/models.py | 7 + .../mgmt/databox/v2018_01_01/__init__.py | 19 + .../databox/v2018_01_01/_configuration.py | 48 + .../_data_box_management_client.py | 59 + .../databox/v2018_01_01/models/__init__.py | 196 + .../_data_box_management_client_enums.py | 107 + .../databox/v2018_01_01/models/_models.py | 2070 +++++++++ .../databox/v2018_01_01/models/_models_py3.py | 2070 +++++++++ .../{ => v2018_01_01}/models/_paged_models.py | 0 .../{ => v2018_01_01}/operations/__init__.py | 0 .../operations/_jobs_operations.py | 758 ++++ .../v2018_01_01/operations/_operations.py | 102 + .../operations/_service_operations.py | 187 + .../azure/mgmt/databox/v2018_01_01/version.py | 13 + .../mgmt/databox/v2019_09_01/__init__.py | 19 + .../databox/v2019_09_01/_configuration.py | 48 + .../_data_box_management_client.py | 59 + .../{ => v2019_09_01}/models/__init__.py | 0 .../_data_box_management_client_enums.py | 0 .../{ => v2019_09_01}/models/_models.py | 53 +- .../{ => v2019_09_01}/models/_models_py3.py | 69 +- .../v2019_09_01/models/_paged_models.py | 66 + .../v2019_09_01/operations/__init__.py | 20 + .../operations/_jobs_operations.py | 0 .../operations/_operations.py | 0 .../operations/_service_operations.py | 0 .../azure/mgmt/databox/v2019_09_01/version.py | 13 + .../mgmt/databox/v2020_04_01/__init__.py | 19 + .../databox/v2020_04_01/_configuration.py | 48 + .../_data_box_management_client.py | 59 + .../databox/v2020_04_01/models/__init__.py | 342 ++ .../_data_box_management_client_enums.py | 179 + .../databox/v2020_04_01/models/_models.py | 3604 ++++++++++++++++ .../databox/v2020_04_01/models/_models_py3.py | 3604 ++++++++++++++++ .../v2020_04_01/models/_paged_models.py | 66 + .../v2020_04_01/operations/__init__.py | 20 + .../operations/_jobs_operations.py | 748 ++++ .../v2020_04_01/operations/_operations.py | 100 + .../operations/_service_operations.py | 461 ++ .../azure/mgmt/databox/v2020_04_01/version.py | 13 + .../mgmt/databox/v2020_11_01/__init__.py | 19 + .../databox/v2020_11_01/_configuration.py | 48 + .../_data_box_management_client.py | 59 + .../databox/v2020_11_01/models/__init__.py | 359 ++ .../_data_box_management_client_enums.py | 185 + .../databox/v2020_11_01/models/_models.py | 3756 +++++++++++++++++ .../databox/v2020_11_01/models/_models_py3.py | 3756 +++++++++++++++++ .../v2020_11_01/models/_paged_models.py | 66 + .../v2020_11_01/operations/__init__.py | 20 + .../operations/_jobs_operations.py | 748 ++++ .../v2020_11_01/operations/_operations.py | 100 + .../operations/_service_operations.py | 461 ++ .../azure/mgmt/databox/v2020_11_01/version.py | 13 + 54 files changed, 24903 insertions(+), 88 deletions(-) create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_configuration.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_data_box_management_client.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_data_box_management_client_enums.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models_py3.py rename sdk/databox/azure-mgmt-databox/azure/mgmt/databox/{ => v2018_01_01}/models/_paged_models.py (100%) rename sdk/databox/azure-mgmt-databox/azure/mgmt/databox/{ => v2018_01_01}/operations/__init__.py (100%) create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_jobs_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_service_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/version.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_configuration.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_data_box_management_client.py rename sdk/databox/azure-mgmt-databox/azure/mgmt/databox/{ => v2019_09_01}/models/__init__.py (100%) rename sdk/databox/azure-mgmt-databox/azure/mgmt/databox/{ => v2019_09_01}/models/_data_box_management_client_enums.py (100%) rename sdk/databox/azure-mgmt-databox/azure/mgmt/databox/{ => v2019_09_01}/models/_models.py (98%) rename sdk/databox/azure-mgmt-databox/azure/mgmt/databox/{ => v2019_09_01}/models/_models_py3.py (97%) create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_paged_models.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/__init__.py rename sdk/databox/azure-mgmt-databox/azure/mgmt/databox/{ => v2019_09_01}/operations/_jobs_operations.py (100%) rename sdk/databox/azure-mgmt-databox/azure/mgmt/databox/{ => v2019_09_01}/operations/_operations.py (100%) rename sdk/databox/azure-mgmt-databox/azure/mgmt/databox/{ => v2019_09_01}/operations/_service_operations.py (100%) create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/version.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_configuration.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_data_box_management_client.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_data_box_management_client_enums.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models_py3.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_paged_models.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_jobs_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_service_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/version.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_configuration.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_data_box_management_client.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_data_box_management_client_enums.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models_py3.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_paged_models.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_jobs_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_service_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/version.py 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 7c2f11f5e82f..920e57408656 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 @@ -12,48 +12,147 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin from ._configuration import DataBoxManagementClientConfiguration -from .operations import Operations -from .operations import JobsOperations -from .operations import ServiceOperations -from . import models -class DataBoxManagementClient(SDKClient): + +class DataBoxManagementClient(MultiApiClientMixin, SDKClient): """DataBoxManagementClient + This ready contains multiple API versions, to help you deal with all Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, uses latest API version available on public Azure. + For production, you should stick a particular api-version and/or profile. + The profile sets a mapping between the operation group and an API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + :ivar config: Configuration for client. :vartype config: DataBoxManagementClientConfiguration - :ivar operations: Operations operations - :vartype operations: azure.mgmt.databox.operations.Operations - :ivar jobs: Jobs operations - :vartype jobs: azure.mgmt.databox.operations.JobsOperations - :ivar service: Service operations - :vartype service: azure.mgmt.databox.operations.ServiceOperations - :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: The Subscription Id + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. :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 profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles """ - def __init__( - self, credentials, subscription_id, base_url=None): + DEFAULT_API_VERSION = '2020-11-01' + _PROFILE_TAG = "azure.mgmt.databox.DataBoxManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + }}, + _PROFILE_TAG + " latest" + ) + def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default): self.config = DataBoxManagementClientConfiguration(credentials, subscription_id, base_url) - super(DataBoxManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-09-01' - self._serialize = Serializer(client_models) - 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) + super(DataBoxManagementClient, self).__init__( + credentials, + self.config, + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2018-01-01: :mod:`v2018_01_01.models` + * 2019-09-01: :mod:`v2019_09_01.models` + * 2020-04-01: :mod:`v2020_04_01.models` + * 2020-11-01: :mod:`v2020_11_01.models` + """ + if api_version == '2018-01-01': + from .v2018_01_01 import models + return models + elif api_version == '2019-09-01': + from .v2019_09_01 import models + return models + elif api_version == '2020-04-01': + from .v2020_04_01 import models + return models + elif api_version == '2020-11-01': + from .v2020_11_01 import models + return models + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + + @property + def jobs(self): + """Instance depends on the API version: + + * 2018-01-01: :class:`JobsOperations` + * 2019-09-01: :class:`JobsOperations` + * 2020-04-01: :class:`JobsOperations` + * 2020-11-01: :class:`JobsOperations` + """ + api_version = self._get_api_version('jobs') + if api_version == '2018-01-01': + from .v2018_01_01.operations import JobsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import JobsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import JobsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import JobsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def operations(self): + """Instance depends on the API version: + + * 2018-01-01: :class:`Operations` + * 2019-09-01: :class:`Operations` + * 2020-04-01: :class:`Operations` + * 2020-11-01: :class:`Operations` + """ + api_version = self._get_api_version('operations') + if api_version == '2018-01-01': + from .v2018_01_01.operations import Operations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import Operations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import Operations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import Operations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service(self): + """Instance depends on the API version: + + * 2018-01-01: :class:`ServiceOperations` + * 2019-09-01: :class:`ServiceOperations` + * 2020-04-01: :class:`ServiceOperations` + * 2020-11-01: :class:`ServiceOperations` + """ + api_version = self._get_api_version('service') + if api_version == '2018-01-01': + from .v2018_01_01.operations import ServiceOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ServiceOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ServiceOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ServiceOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".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/models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models.py new file mode 100644 index 000000000000..3194fab613a3 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models.py @@ -0,0 +1,7 @@ +# 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. +# -------------------------------------------------------------------------- +from .v2020_11_01.models import * diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/__init__.py new file mode 100644 index 000000000000..1c85885ae27c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_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 ._configuration import DataBoxManagementClientConfiguration +from ._data_box_management_client import DataBoxManagementClient +__all__ = ['DataBoxManagementClient', 'DataBoxManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_configuration.py new file mode 100644 index 000000000000..adf67e024e24 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_configuration.py @@ -0,0 +1,48 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class DataBoxManagementClientConfiguration(AzureConfiguration): + """Configuration for DataBoxManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Subscription Id + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DataBoxManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-databox/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id 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 new file mode 100644 index 000000000000..dcd36cb5bcd9 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/_data_box_management_client.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.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import ServiceOperations +from . import models + + +class DataBoxManagementClient(SDKClient): + """DataBoxManagementClient + + :ivar config: Configuration for client. + :vartype config: DataBoxManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.operations.Operations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.databox.operations.JobsOperations + :ivar service: Service operations + :vartype service: azure.mgmt.databox.operations.ServiceOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Subscription Id + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DataBoxManagementClientConfiguration(credentials, subscription_id, base_url) + super(DataBoxManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-01-01' + self._serialize = Serializer(client_models) + 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) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/__init__.py new file mode 100644 index 000000000000..4fe68965fd88 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/__init__.py @@ -0,0 +1,196 @@ +# 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 AddressValidationOutput + from ._models_py3 import ApplianceNetworkConfiguration + from ._models_py3 import ArmBaseObject + from ._models_py3 import AvailableSkuRequest + from ._models_py3 import CancellationReason + from ._models_py3 import ContactDetails + from ._models_py3 import CopyLogDetails + from ._models_py3 import CopyProgress + 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 DataboxJobSecrets + from ._models_py3 import DataBoxSecret + from ._models_py3 import DestinationAccountDetails + from ._models_py3 import DestinationManagedDiskDetails + from ._models_py3 import DestinationStorageAccountDetails + from ._models_py3 import DestinationToServiceLocationMap + from ._models_py3 import DiskSecret + from ._models_py3 import Error + from ._models_py3 import JobDetails + from ._models_py3 import JobErrorDetails + from ._models_py3 import JobResource + from ._models_py3 import JobResourceUpdateParameter + from ._models_py3 import JobSecrets + from ._models_py3 import JobStages + from ._models_py3 import NotificationPreference + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PackageShippingDetails + from ._models_py3 import Preferences + from ._models_py3 import Resource + 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 SkuCapacity + from ._models_py3 import SkuCost + from ._models_py3 import SkuInformation + from ._models_py3 import UnencryptedCredentials + from ._models_py3 import UpdateJobDetails + from ._models_py3 import ValidateAddress +except (SyntaxError, ImportError): + from ._models import AccountCredentialDetails + from ._models import AddressValidationOutput + from ._models import ApplianceNetworkConfiguration + from ._models import ArmBaseObject + from ._models import AvailableSkuRequest + from ._models import CancellationReason + from ._models import ContactDetails + from ._models import CopyLogDetails + from ._models import CopyProgress + from ._models import DataBoxAccountCopyLogDetails + from ._models import DataBoxDiskCopyLogDetails + from ._models import DataBoxDiskCopyProgress + from ._models import DataBoxDiskJobDetails + from ._models import DataBoxDiskJobSecrets + from ._models import DataBoxHeavyAccountCopyLogDetails + from ._models import DataBoxHeavyJobDetails + from ._models import DataBoxHeavyJobSecrets + from ._models import DataBoxHeavySecret + from ._models import DataBoxJobDetails + from ._models import DataboxJobSecrets + from ._models import DataBoxSecret + from ._models import DestinationAccountDetails + from ._models import DestinationManagedDiskDetails + from ._models import DestinationStorageAccountDetails + from ._models import DestinationToServiceLocationMap + from ._models import DiskSecret + from ._models import Error + from ._models import JobDetails + from ._models import JobErrorDetails + from ._models import JobResource + from ._models import JobResourceUpdateParameter + from ._models import JobSecrets + from ._models import JobStages + from ._models import NotificationPreference + from ._models import Operation + from ._models import OperationDisplay + from ._models import PackageShippingDetails + from ._models import Preferences + from ._models import Resource + from ._models import ShareCredentialDetails + from ._models import ShipmentPickUpRequest + from ._models import ShipmentPickUpResponse + from ._models import ShippingAddress + from ._models import Sku + from ._models import SkuCapacity + from ._models import SkuCost + from ._models import SkuInformation + from ._models import UnencryptedCredentials + from ._models import UpdateJobDetails + from ._models import ValidateAddress +from ._paged_models import JobResourcePaged +from ._paged_models import OperationPaged +from ._paged_models import SkuInformationPaged +from ._paged_models import UnencryptedCredentialsPaged +from ._data_box_management_client_enums import ( + ShareDestinationFormatType, + AccessProtocol, + AddressValidationStatus, + AddressType, + SkuName, + SkuDisabledReason, + NotificationStageName, + CopyStatus, + StageName, + StageStatus, +) + +__all__ = [ + 'AccountCredentialDetails', + 'AddressValidationOutput', + 'ApplianceNetworkConfiguration', + 'ArmBaseObject', + 'AvailableSkuRequest', + 'CancellationReason', + 'ContactDetails', + 'CopyLogDetails', + 'CopyProgress', + 'DataBoxAccountCopyLogDetails', + 'DataBoxDiskCopyLogDetails', + 'DataBoxDiskCopyProgress', + 'DataBoxDiskJobDetails', + 'DataBoxDiskJobSecrets', + 'DataBoxHeavyAccountCopyLogDetails', + 'DataBoxHeavyJobDetails', + 'DataBoxHeavyJobSecrets', + 'DataBoxHeavySecret', + 'DataBoxJobDetails', + 'DataboxJobSecrets', + 'DataBoxSecret', + 'DestinationAccountDetails', + 'DestinationManagedDiskDetails', + 'DestinationStorageAccountDetails', + 'DestinationToServiceLocationMap', + 'DiskSecret', + 'Error', + 'JobDetails', + 'JobErrorDetails', + 'JobResource', + 'JobResourceUpdateParameter', + 'JobSecrets', + 'JobStages', + 'NotificationPreference', + 'Operation', + 'OperationDisplay', + 'PackageShippingDetails', + 'Preferences', + 'Resource', + 'ShareCredentialDetails', + 'ShipmentPickUpRequest', + 'ShipmentPickUpResponse', + 'ShippingAddress', + 'Sku', + 'SkuCapacity', + 'SkuCost', + 'SkuInformation', + 'UnencryptedCredentials', + 'UpdateJobDetails', + 'ValidateAddress', + 'OperationPaged', + 'JobResourcePaged', + 'UnencryptedCredentialsPaged', + 'SkuInformationPaged', + 'ShareDestinationFormatType', + 'AccessProtocol', + 'AddressValidationStatus', + 'AddressType', + 'SkuName', + 'SkuDisabledReason', + 'NotificationStageName', + 'CopyStatus', + 'StageName', + 'StageStatus', +] 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 new file mode 100644 index 000000000000..2b537ed82c55 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_data_box_management_client_enums.py @@ -0,0 +1,107 @@ +# 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 + + +class ShareDestinationFormatType(str, Enum): + + 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. + + +class AccessProtocol(str, Enum): + + smb = "SMB" #: Server Message Block protocol(SMB). + nfs = "NFS" #: Network File System protocol(NFS). + + +class AddressValidationStatus(str, Enum): + + 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. + + +class AddressType(str, Enum): + + none = "None" #: Address type not known. + residential = "Residential" #: Residential Address. + commercial = "Commercial" #: Commercial Address. + + +class SkuName(str, Enum): + + data_box = "DataBox" #: DataBox. + data_box_disk = "DataBoxDisk" #: DataBoxDisk. + data_box_heavy = "DataBoxHeavy" #: DataBoxHeavy. + + +class SkuDisabledReason(str, Enum): + + 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. + + +class NotificationStageName(str, Enum): + + 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. + + +class CopyStatus(str, Enum): + + 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. + + +class StageName(str, Enum): + + 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. + + +class StageStatus(str, Enum): + + 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. 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 new file mode 100644 index 000000000000..1420cba1210f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models.py @@ -0,0 +1,2070 @@ +# 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.serialization import Model + + +class AccountCredentialDetails(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 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] + """ + + _validation = { + 'account_name': {'readonly': True}, + 'account_connection_string': {'readonly': True}, + 'share_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', '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.account_connection_string = None + self.share_credential_details = None + + +class AddressValidationOutput(Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar validation_status: The address validation status. Possible values + include: 'Valid', 'Invalid', 'Ambiguous' + :vartype validation_status: str or + ~azure.mgmt.databox.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: + list[~azure.mgmt.databox.models.ShippingAddress] + """ + + _validation = { + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_status': {'key': 'properties.validationStatus', 'type': 'AddressValidationStatus'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__(self, **kwargs): + super(AddressValidationOutput, self).__init__(**kwargs) + self.validation_status = None + self.alternate_addresses = None + + +class ApplianceNetworkConfiguration(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(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(Model): + """The filters for showing the available skus. + + 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 transfer_type: Required. Type of the transfer. Default 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 + :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.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True, 'constant': 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': '[SkuName]'}, + } + + transfer_type = "ImportToAzure" + + def __init__(self, **kwargs): + super(AvailableSkuRequest, self).__init__(**kwargs) + self.country = kwargs.get('country', None) + self.location = kwargs.get('location', None) + self.sku_names = kwargs.get('sku_names', None) + + +class CancellationReason(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.get('reason', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ContactDetails(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.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.get('contact_name', None) + self.phone = kwargs.get('phone', None) + self.phone_extension = kwargs.get('phone_extension', None) + self.mobile = kwargs.get('mobile', None) + self.email_list = kwargs.get('email_list', None) + self.notification_preference = kwargs.get('notification_preference', None) + + +class CopyLogDetails(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. Constant filled by server. + :type copy_log_details_type: str + """ + + _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 + + +class CopyProgress(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 where the data + needs to be uploaded. + :vartype storage_account_name: str + :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. + :vartype bytes_sent_to_cloud: 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 by the job as of now. + :vartype files_processed: long + :ivar total_files_to_process: Total number of files to be processed by the + job. + :vartype total_files_to_process: long + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_sent_to_cloud': {'readonly': True}, + 'total_bytes_to_process': {'readonly': True}, + 'files_processed': {'readonly': True}, + 'total_files_to_process': {'readonly': True}, + } + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'bytes_sent_to_cloud': {'key': 'bytesSentToCloud', 'type': 'long'}, + 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, + 'files_processed': {'key': 'filesProcessed', 'type': 'long'}, + 'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(CopyProgress, self).__init__(**kwargs) + self.storage_account_name = None + self.account_id = None + self.bytes_sent_to_cloud = None + self.total_bytes_to_process = None + self.files_processed = None + self.total_files_to_process = 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. Constant filled by server. + :type copy_log_details_type: str + :ivar account_name: Destination account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_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'}, + } + + def __init__(self, **kwargs): + super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.account_name = None + self.copy_log_link = None + self.copy_log_details_type = 'DataBox' + + +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. Constant filled by server. + :type copy_log_details_type: str + :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.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + self.copy_log_details_type = 'DataBoxDisk' + + +class DataBoxDiskCopyProgress(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' + :vartype status: str or ~azure.mgmt.databox.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': 'CopyStatus'}, + } + + 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(Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobDetails, DataBoxHeavyJobDetails, + DataBoxJobDetails + + 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 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 job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :param destination_account_details: Required. Destination account details. + :type destination_account_details: + list[~azure.mgmt.databox.models.DestinationAccountDetails] + :ivar error_details: Error details for failure. This is optional. + :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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 job_details_type: Required. Constant filled by server. + :type job_details_type: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'shipping_address': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'destination_account_details': {'required': True}, + 'error_details': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': True}, + } + + _attribute_map = { + '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'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_details_type': {'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails', 'DataBox': 'DataBoxJobDetails'} + } + + def __init__(self, **kwargs): + super(JobDetails, self).__init__(**kwargs) + self.expected_data_size_in_tera_bytes = kwargs.get('expected_data_size_in_tera_bytes', None) + self.job_stages = None + self.contact_details = kwargs.get('contact_details', None) + self.shipping_address = kwargs.get('shipping_address', None) + self.delivery_package = None + self.return_package = None + self.destination_account_details = kwargs.get('destination_account_details', None) + self.error_details = None + 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.job_details_type = 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. + + :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 job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :param destination_account_details: Required. Destination account details. + :type destination_account_details: + list[~azure.mgmt.databox.models.DestinationAccountDetails] + :ivar error_details: Error details for failure. This is optional. + :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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 job_details_type: Required. Constant filled by server. + :type job_details_type: str + :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] + :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}, + 'shipping_address': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'destination_account_details': {'required': True}, + 'error_details': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_progress': {'readonly': True}, + 'disks_and_size_details': {'readonly': True}, + } + + _attribute_map = { + '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'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', '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.preferred_disks = kwargs.get('preferred_disks', None) + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = kwargs.get('passkey', None) + self.job_details_type = 'DataBoxDisk' + + +class JobSecrets(Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets, + DataboxJobSecrets + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + """ + + _validation = { + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets', 'DataBox': 'DataboxJobSecrets'} + } + + def __init__(self, **kwargs): + super(JobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 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. Constant filled by server. + :type job_secrets_type: str + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.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}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + '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.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + self.job_secrets_type = 'DataBoxDisk' + + +class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account for DataBoxHeavy. + + 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. Constant filled by server. + :type copy_log_details_type: str + :ivar account_name: Destination account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: list[str] + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_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]'}, + } + + def __init__(self, **kwargs): + super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.account_name = None + self.copy_log_link = None + self.copy_log_details_type = 'DataBoxHeavy' + + +class DataBoxHeavyJobDetails(JobDetails): + """DataBoxHeavy 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. + + :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 job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :param destination_account_details: Required. Destination account details. + :type destination_account_details: + list[~azure.mgmt.databox.models.DestinationAccountDetails] + :ivar error_details: Error details for failure. This is optional. + :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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 job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'shipping_address': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'destination_account_details': {'required': True}, + 'error_details': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + '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'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + } + + def __init__(self, **kwargs): + super(DataBoxHeavyJobDetails, self).__init__(**kwargs) + self.copy_progress = None + self.job_details_type = 'DataBoxHeavy' + + +class DataBoxHeavyJobSecrets(JobSecrets): + """The secrets related to a DataBoxHeavy 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. Constant filled by server. + :type job_secrets_type: str + :ivar cabinet_pod_secrets: Contains the list of secret objects for a + DataBoxHeavy job. + :vartype cabinet_pod_secrets: + list[~azure.mgmt.databox.models.DataBoxHeavySecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__(self, **kwargs): + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.cabinet_pod_secrets = None + self.job_secrets_type = 'DataBoxHeavy' + + +class DataBoxHeavySecret(Model): + """The secrets related to a DataBoxHeavy. + + 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.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] + """ + + _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. + + :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 job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :param destination_account_details: Required. Destination account details. + :type destination_account_details: + list[~azure.mgmt.databox.models.DestinationAccountDetails] + :ivar error_details: Error details for failure. This is optional. + :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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 job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'shipping_address': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'destination_account_details': {'required': True}, + 'error_details': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + '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'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + } + + def __init__(self, **kwargs): + super(DataBoxJobDetails, self).__init__(**kwargs) + self.copy_progress = None + self.job_details_type = 'DataBox' + + +class DataboxJobSecrets(JobSecrets): + """The secrets related to a DataBox job. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__(self, **kwargs): + super(DataboxJobSecrets, self).__init__(**kwargs) + self.pod_secrets = kwargs.get('pod_secrets', None) + self.job_secrets_type = 'DataBox' + + +class DataBoxSecret(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.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] + """ + + _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 DestinationAccountDetails(Model): + """Details of the destination of the data. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DestinationManagedDiskDetails, + DestinationStorageAccountDetails + + All required parameters must be populated in order to send to Azure. + + :param account_id: Arm Id of the destination where the data has to be + moved. + :type account_id: str + :param data_destination_type: Required. Constant filled by server. + :type data_destination_type: str + """ + + _validation = { + 'data_destination_type': {'required': True}, + } + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, + } + + _subtype_map = { + 'data_destination_type': {'ManagedDisk': 'DestinationManagedDiskDetails', 'StorageAccount': 'DestinationStorageAccountDetails'} + } + + def __init__(self, **kwargs): + super(DestinationAccountDetails, self).__init__(**kwargs) + self.account_id = kwargs.get('account_id', None) + self.data_destination_type = None + + +class DestinationManagedDiskDetails(DestinationAccountDetails): + """Details for the destination compute disks. + + All required parameters must be populated in order to send to Azure. + + :param account_id: Arm Id of the destination where the data has to be + moved. + :type account_id: str + :param data_destination_type: Required. Constant filled by server. + :type data_destination_type: str + :param resource_group_id: Required. Destination Resource Group Id where + the Compute disks should be created. + :type resource_group_id: str + :param staging_storage_account_id: Required. Arm Id of the storage account + that can be used to copy the vhd for staging. + :type staging_storage_account_id: str + """ + + _validation = { + 'data_destination_type': {'required': True}, + 'resource_group_id': {'required': True}, + 'staging_storage_account_id': {'required': True}, + } + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + 'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DestinationManagedDiskDetails, self).__init__(**kwargs) + self.resource_group_id = kwargs.get('resource_group_id', None) + self.staging_storage_account_id = kwargs.get('staging_storage_account_id', None) + self.data_destination_type = 'ManagedDisk' + + +class DestinationStorageAccountDetails(DestinationAccountDetails): + """Details for the destination storage account. + + All required parameters must be populated in order to send to Azure. + + :param account_id: Arm Id of the destination where the data has to be + moved. + :type account_id: str + :param data_destination_type: Required. Constant filled by server. + :type data_destination_type: str + :param storage_account_id: Required. Destination Storage Account Arm Id. + :type storage_account_id: str + """ + + _validation = { + 'data_destination_type': {'required': True}, + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DestinationStorageAccountDetails, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.data_destination_type = 'StorageAccount' + + +class DestinationToServiceLocationMap(Model): + """Map of destination location to service location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar destination_location: Location of the destination. + :vartype destination_location: str + :ivar service_location: Location of the service. + :vartype service_location: str + """ + + _validation = { + 'destination_location': {'readonly': True}, + 'service_location': {'readonly': True}, + } + + _attribute_map = { + 'destination_location': {'key': 'destinationLocation', 'type': 'str'}, + 'service_location': {'key': 'serviceLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DestinationToServiceLocationMap, self).__init__(**kwargs) + self.destination_location = None + self.service_location = None + + +class DiskSecret(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 Error(Model): + """Top level error for the job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code that can be used to programmatically identify the + error. + :vartype code: str + :ivar message: Describes the error in detail and provides debugging + information. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.code = None + self.message = None + + +class JobErrorDetails(Model): + """Job Error Details for providing the information and recommended action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_message: Message for the error. + :vartype error_message: str + :ivar error_code: Code for the error. + :vartype error_code: int + :ivar recommended_action: Recommended action for the error. + :vartype recommended_action: str + :ivar exception_message: Contains the non localized exception message + :vartype exception_message: str + """ + + _validation = { + 'error_message': {'readonly': True}, + 'error_code': {'readonly': True}, + 'recommended_action': {'readonly': True}, + 'exception_message': {'readonly': True}, + } + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'recommended_action': {'key': 'recommendedAction', 'type': 'str'}, + 'exception_message': {'key': 'exceptionMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobErrorDetails, self).__init__(**kwargs) + self.error_message = None + self.error_code = None + self.recommended_action = None + self.exception_message = None + + +class Resource(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: 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.models.Sku + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', 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: 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.models.Sku + :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 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' + :vartype status: str or ~azure.mgmt.databox.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 + format. + :vartype start_time: datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.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 + :ivar cancellation_reason: Reason for cancellation. + :vartype cancellation_reason: str + :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 = { + 'location': {'required': True}, + 'sku': {'required': True}, + 'is_cancellable': {'readonly': True}, + 'is_deletable': {'readonly': True}, + 'is_shipping_address_editable': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'error': {'readonly': True}, + 'cancellation_reason': {'readonly': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, + 'is_shipping_address_editable': {'key': 'properties.isShippingAddressEditable', 'type': 'bool'}, + 'status': {'key': 'properties.status', 'type': 'StageName'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'Error'}, + 'details': {'key': 'properties.details', 'type': 'JobDetails'}, + 'cancellation_reason': {'key': 'properties.cancellationReason', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobResource, self).__init__(**kwargs) + self.is_cancellable = None + self.is_deletable = None + self.is_shipping_address_editable = None + self.status = None + self.start_time = None + self.error = None + self.details = kwargs.get('details', None) + self.cancellation_reason = None + self.name = None + self.id = None + self.type = None + + +class JobResourceUpdateParameter(Model): + """The JobResourceUpdateParameter. + + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :param destination_account_details: Destination account details. + :type destination_account_details: + list[~azure.mgmt.databox.models.DestinationAccountDetails] + :param 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] + """ + + _attribute_map = { + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + 'destination_account_details': {'key': 'properties.destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.destination_account_details = kwargs.get('destination_account_details', None) + self.tags = kwargs.get('tags', None) + + +class JobStages(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' + :vartype stage_name: str or ~azure.mgmt.databox.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 + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: datetime + :ivar job_stage_details: Job Stage Details + :vartype job_stage_details: object + :ivar error_details: Error details for the stage. + :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + """ + + _validation = { + 'stage_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'stage_status': {'readonly': True}, + 'stage_time': {'readonly': True}, + 'job_stage_details': {'readonly': True}, + 'error_details': {'readonly': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'StageName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'StageStatus'}, + 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, + 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + } + + 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 + self.error_details = None + + +class NotificationPreference(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.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + Default value: True . + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'NotificationStageName'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = kwargs.get('stage_name', None) + self.send_notification = kwargs.get('send_notification', True) + + +class Operation(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.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: object + :ivar origin: Origin of the operation. Can be : user|system|user,system + :vartype origin: str + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.properties = None + self.origin = None + + +class OperationDisplay(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 PackageShippingDetails(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(Model): + """Preferences related to the order. + + :param preferred_data_center_region: + :type preferred_data_center_region: list[str] + """ + + _attribute_map = { + 'preferred_data_center_region': {'key': 'preferredDataCenterRegion', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Preferences, self).__init__(**kwargs) + self.preferred_data_center_region = kwargs.get('preferred_data_center_region', None) + + +class ShareCredentialDetails(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.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] + """ + + _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': 'ShareDestinationFormatType'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[AccessProtocol]'}, + } + + 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(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 + :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 + :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.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.shipment_location = kwargs.get('shipment_location', None) + + +class ShipmentPickUpResponse(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 + """ + + _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(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: Required. 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.models.AddressType + """ + + _validation = { + 'street_address1': {'required': True}, + 'country': {'required': True}, + 'postal_code': {'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': 'AddressType'}, + } + + def __init__(self, **kwargs): + super(ShippingAddress, self).__init__(**kwargs) + self.street_address1 = kwargs.get('street_address1', None) + 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.get('country', None) + 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(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.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': 'SkuName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.family = kwargs.get('family', None) + + +class SkuCapacity(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(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 + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'meter_type': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_type': {'key': 'meterType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.meter_type = None + + +class SkuInformation(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.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] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.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 + :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}, + 'destination_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'}, + 'destination_to_service_location_map': {'key': 'properties.destinationToServiceLocationMap', 'type': '[DestinationToServiceLocationMap]'}, + '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': 'SkuDisabledReason'}, + '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.destination_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 UnencryptedCredentials(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.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 UpdateJobDetails(Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + """ + + _attribute_map = { + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + } + + 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) + + +class ValidateAddress(Model): + """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 shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.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 + """ + + _validation = { + 'shipping_address': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + } + + def __init__(self, **kwargs): + super(ValidateAddress, self).__init__(**kwargs) + self.shipping_address = kwargs.get('shipping_address', None) + self.device_type = kwargs.get('device_type', None) 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 new file mode 100644 index 000000000000..77d0998d7bf1 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_models_py3.py @@ -0,0 +1,2070 @@ +# 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.serialization import Model + + +class AccountCredentialDetails(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 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] + """ + + _validation = { + 'account_name': {'readonly': True}, + 'account_connection_string': {'readonly': True}, + 'share_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, + 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, + } + + def __init__(self, **kwargs) -> None: + super(AccountCredentialDetails, self).__init__(**kwargs) + self.account_name = None + self.account_connection_string = None + self.share_credential_details = None + + +class AddressValidationOutput(Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar validation_status: The address validation status. Possible values + include: 'Valid', 'Invalid', 'Ambiguous' + :vartype validation_status: str or + ~azure.mgmt.databox.models.AddressValidationStatus + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: + list[~azure.mgmt.databox.models.ShippingAddress] + """ + + _validation = { + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'validation_status': {'key': 'properties.validationStatus', 'type': 'AddressValidationStatus'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__(self, **kwargs) -> None: + super(AddressValidationOutput, self).__init__(**kwargs) + self.validation_status = None + self.alternate_addresses = None + + +class ApplianceNetworkConfiguration(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) -> None: + super(ApplianceNetworkConfiguration, self).__init__(**kwargs) + self.name = None + self.mac_address = None + + +class ArmBaseObject(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) -> None: + super(ArmBaseObject, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + + +class AvailableSkuRequest(Model): + """The filters for showing the available skus. + + 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 transfer_type: Required. Type of the transfer. Default 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 + :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.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True, 'constant': 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': '[SkuName]'}, + } + + transfer_type = "ImportToAzure" + + def __init__(self, *, country: str, location: str, sku_names=None, **kwargs) -> None: + super(AvailableSkuRequest, self).__init__(**kwargs) + self.country = country + self.location = location + self.sku_names = sku_names + + +class CancellationReason(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) -> None: + super(CancellationReason, self).__init__(**kwargs) + self.reason = reason + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ContactDetails(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.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, phone_extension: str=None, mobile: str=None, notification_preference=None, **kwargs) -> None: + 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(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. Constant filled by server. + :type copy_log_details_type: str + """ + + _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) -> None: + super(CopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = None + + +class CopyProgress(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 where the data + needs to be uploaded. + :vartype storage_account_name: str + :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. + :vartype bytes_sent_to_cloud: 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 by the job as of now. + :vartype files_processed: long + :ivar total_files_to_process: Total number of files to be processed by the + job. + :vartype total_files_to_process: long + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_sent_to_cloud': {'readonly': True}, + 'total_bytes_to_process': {'readonly': True}, + 'files_processed': {'readonly': True}, + 'total_files_to_process': {'readonly': True}, + } + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'bytes_sent_to_cloud': {'key': 'bytesSentToCloud', 'type': 'long'}, + 'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'}, + 'files_processed': {'key': 'filesProcessed', 'type': 'long'}, + 'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(CopyProgress, self).__init__(**kwargs) + self.storage_account_name = None + self.account_id = None + self.bytes_sent_to_cloud = None + self.total_bytes_to_process = None + self.files_processed = None + self.total_files_to_process = 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. Constant filled by server. + :type copy_log_details_type: str + :ivar account_name: Destination account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: str + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_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'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.account_name = None + self.copy_log_link = None + self.copy_log_details_type = 'DataBox' + + +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. Constant filled by server. + :type copy_log_details_type: str + :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) -> None: + super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + self.copy_log_details_type = 'DataBoxDisk' + + +class DataBoxDiskCopyProgress(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' + :vartype status: str or ~azure.mgmt.databox.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': 'CopyStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.bytes_copied = None + self.percent_complete = None + self.status = None + + +class JobDetails(Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobDetails, DataBoxHeavyJobDetails, + DataBoxJobDetails + + 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 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 job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :param destination_account_details: Required. Destination account details. + :type destination_account_details: + list[~azure.mgmt.databox.models.DestinationAccountDetails] + :ivar error_details: Error details for failure. This is optional. + :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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 job_details_type: Required. Constant filled by server. + :type job_details_type: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'shipping_address': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'destination_account_details': {'required': True}, + 'error_details': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': True}, + } + + _attribute_map = { + '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'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_details_type': {'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails', 'DataBox': 'DataBoxJobDetails'} + } + + def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_tera_bytes: int=None, preferences=None, **kwargs) -> None: + super(JobDetails, self).__init__(**kwargs) + 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 + self.delivery_package = None + self.return_package = None + self.destination_account_details = destination_account_details + self.error_details = None + self.preferences = preferences + self.copy_log_details = None + self.reverse_shipment_label_sas_key = None + self.chain_of_custody_sas_key = None + self.job_details_type = 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. + + :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 job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :param destination_account_details: Required. Destination account details. + :type destination_account_details: + list[~azure.mgmt.databox.models.DestinationAccountDetails] + :ivar error_details: Error details for failure. This is optional. + :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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 job_details_type: Required. Constant filled by server. + :type job_details_type: str + :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] + :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}, + 'shipping_address': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'destination_account_details': {'required': True}, + 'error_details': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_progress': {'readonly': True}, + 'disks_and_size_details': {'readonly': True}, + } + + _attribute_map = { + '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'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', '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, shipping_address, destination_account_details, expected_data_size_in_tera_bytes: int=None, preferences=None, preferred_disks=None, passkey: str=None, **kwargs) -> None: + 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.preferred_disks = preferred_disks + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = passkey + self.job_details_type = 'DataBoxDisk' + + +class JobSecrets(Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets, + DataboxJobSecrets + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + """ + + _validation = { + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets', 'DataBox': 'DataboxJobSecrets'} + } + + def __init__(self, **kwargs) -> None: + super(JobSecrets, self).__init__(**kwargs) + self.job_secrets_type = 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. Constant filled by server. + :type job_secrets_type: str + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.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}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'pass_key': {'key': 'passKey', 'type': 'str'}, + 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxDiskJobSecrets, self).__init__(**kwargs) + self.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + self.job_secrets_type = 'DataBoxDisk' + + +class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account for DataBoxHeavy. + + 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. Constant filled by server. + :type copy_log_details_type: str + :ivar account_name: Destination account name. + :vartype account_name: str + :ivar copy_log_link: Link for copy logs. + :vartype copy_log_link: list[str] + """ + + _validation = { + 'copy_log_details_type': {'required': True}, + 'account_name': {'readonly': True}, + 'copy_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]'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.account_name = None + self.copy_log_link = None + self.copy_log_details_type = 'DataBoxHeavy' + + +class DataBoxHeavyJobDetails(JobDetails): + """DataBoxHeavy 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. + + :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 job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :param destination_account_details: Required. Destination account details. + :type destination_account_details: + list[~azure.mgmt.databox.models.DestinationAccountDetails] + :ivar error_details: Error details for failure. This is optional. + :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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 job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'shipping_address': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'destination_account_details': {'required': True}, + 'error_details': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + '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'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + } + + def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_tera_bytes: int=None, preferences=None, **kwargs) -> None: + 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.copy_progress = None + self.job_details_type = 'DataBoxHeavy' + + +class DataBoxHeavyJobSecrets(JobSecrets): + """The secrets related to a DataBoxHeavy 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. Constant filled by server. + :type job_secrets_type: str + :ivar cabinet_pod_secrets: Contains the list of secret objects for a + DataBoxHeavy job. + :vartype cabinet_pod_secrets: + list[~azure.mgmt.databox.models.DataBoxHeavySecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.cabinet_pod_secrets = None + self.job_secrets_type = 'DataBoxHeavy' + + +class DataBoxHeavySecret(Model): + """The secrets related to a DataBoxHeavy. + + 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.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] + """ + + _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) -> None: + 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. + + :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 job_stages: List of stages that run in the job. + :vartype job_stages: list[~azure.mgmt.databox.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.models.PackageShippingDetails + :param destination_account_details: Required. Destination account details. + :type destination_account_details: + list[~azure.mgmt.databox.models.DestinationAccountDetails] + :ivar error_details: Error details for failure. This is optional. + :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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 job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.models.CopyProgress] + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'shipping_address': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'destination_account_details': {'required': True}, + 'error_details': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': True}, + 'copy_progress': {'readonly': True}, + } + + _attribute_map = { + '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'}, + 'delivery_package': {'key': 'deliveryPackage', 'type': 'PackageShippingDetails'}, + 'return_package': {'key': 'returnPackage', 'type': 'PackageShippingDetails'}, + 'destination_account_details': {'key': 'destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + } + + def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_tera_bytes: int=None, preferences=None, **kwargs) -> None: + 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.copy_progress = None + self.job_details_type = 'DataBox' + + +class DataboxJobSecrets(JobSecrets): + """The secrets related to a DataBox job. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + """ + + _validation = { + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__(self, *, pod_secrets=None, **kwargs) -> None: + super(DataboxJobSecrets, self).__init__(**kwargs) + self.pod_secrets = pod_secrets + self.job_secrets_type = 'DataBox' + + +class DataBoxSecret(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.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] + """ + + _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) -> None: + 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 DestinationAccountDetails(Model): + """Details of the destination of the data. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DestinationManagedDiskDetails, + DestinationStorageAccountDetails + + All required parameters must be populated in order to send to Azure. + + :param account_id: Arm Id of the destination where the data has to be + moved. + :type account_id: str + :param data_destination_type: Required. Constant filled by server. + :type data_destination_type: str + """ + + _validation = { + 'data_destination_type': {'required': True}, + } + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, + } + + _subtype_map = { + 'data_destination_type': {'ManagedDisk': 'DestinationManagedDiskDetails', 'StorageAccount': 'DestinationStorageAccountDetails'} + } + + def __init__(self, *, account_id: str=None, **kwargs) -> None: + super(DestinationAccountDetails, self).__init__(**kwargs) + self.account_id = account_id + self.data_destination_type = None + + +class DestinationManagedDiskDetails(DestinationAccountDetails): + """Details for the destination compute disks. + + All required parameters must be populated in order to send to Azure. + + :param account_id: Arm Id of the destination where the data has to be + moved. + :type account_id: str + :param data_destination_type: Required. Constant filled by server. + :type data_destination_type: str + :param resource_group_id: Required. Destination Resource Group Id where + the Compute disks should be created. + :type resource_group_id: str + :param staging_storage_account_id: Required. Arm Id of the storage account + that can be used to copy the vhd for staging. + :type staging_storage_account_id: str + """ + + _validation = { + 'data_destination_type': {'required': True}, + 'resource_group_id': {'required': True}, + 'staging_storage_account_id': {'required': True}, + } + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'data_destination_type': {'key': 'dataDestinationType', '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, account_id: str=None, **kwargs) -> None: + super(DestinationManagedDiskDetails, self).__init__(account_id=account_id, **kwargs) + self.resource_group_id = resource_group_id + self.staging_storage_account_id = staging_storage_account_id + self.data_destination_type = 'ManagedDisk' + + +class DestinationStorageAccountDetails(DestinationAccountDetails): + """Details for the destination storage account. + + All required parameters must be populated in order to send to Azure. + + :param account_id: Arm Id of the destination where the data has to be + moved. + :type account_id: str + :param data_destination_type: Required. Constant filled by server. + :type data_destination_type: str + :param storage_account_id: Required. Destination Storage Account Arm Id. + :type storage_account_id: str + """ + + _validation = { + 'data_destination_type': {'required': True}, + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, *, storage_account_id: str, account_id: str=None, **kwargs) -> None: + super(DestinationStorageAccountDetails, self).__init__(account_id=account_id, **kwargs) + self.storage_account_id = storage_account_id + self.data_destination_type = 'StorageAccount' + + +class DestinationToServiceLocationMap(Model): + """Map of destination location to service location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar destination_location: Location of the destination. + :vartype destination_location: str + :ivar service_location: Location of the service. + :vartype service_location: str + """ + + _validation = { + 'destination_location': {'readonly': True}, + 'service_location': {'readonly': True}, + } + + _attribute_map = { + 'destination_location': {'key': 'destinationLocation', 'type': 'str'}, + 'service_location': {'key': 'serviceLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DestinationToServiceLocationMap, self).__init__(**kwargs) + self.destination_location = None + self.service_location = None + + +class DiskSecret(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) -> None: + super(DiskSecret, self).__init__(**kwargs) + self.disk_serial_number = None + self.bit_locker_key = None + + +class Error(Model): + """Top level error for the job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code that can be used to programmatically identify the + error. + :vartype code: str + :ivar message: Describes the error in detail and provides debugging + information. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.code = None + self.message = None + + +class JobErrorDetails(Model): + """Job Error Details for providing the information and recommended action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_message: Message for the error. + :vartype error_message: str + :ivar error_code: Code for the error. + :vartype error_code: int + :ivar recommended_action: Recommended action for the error. + :vartype recommended_action: str + :ivar exception_message: Contains the non localized exception message + :vartype exception_message: str + """ + + _validation = { + 'error_message': {'readonly': True}, + 'error_code': {'readonly': True}, + 'recommended_action': {'readonly': True}, + 'exception_message': {'readonly': True}, + } + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'recommended_action': {'key': 'recommendedAction', 'type': 'str'}, + 'exception_message': {'key': 'exceptionMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobErrorDetails, self).__init__(**kwargs) + self.error_message = None + self.error_code = None + self.recommended_action = None + self.exception_message = None + + +class Resource(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: 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.models.Sku + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.sku = sku + + +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: 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.models.Sku + :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 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' + :vartype status: str or ~azure.mgmt.databox.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 + format. + :vartype start_time: datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.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 + :ivar cancellation_reason: Reason for cancellation. + :vartype cancellation_reason: str + :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 = { + 'location': {'required': True}, + 'sku': {'required': True}, + 'is_cancellable': {'readonly': True}, + 'is_deletable': {'readonly': True}, + 'is_shipping_address_editable': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'error': {'readonly': True}, + 'cancellation_reason': {'readonly': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + 'is_deletable': {'key': 'properties.isDeletable', 'type': 'bool'}, + 'is_shipping_address_editable': {'key': 'properties.isShippingAddressEditable', 'type': 'bool'}, + 'status': {'key': 'properties.status', 'type': 'StageName'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'Error'}, + 'details': {'key': 'properties.details', 'type': 'JobDetails'}, + 'cancellation_reason': {'key': 'properties.cancellationReason', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, location: str, sku, tags=None, details=None, **kwargs) -> None: + super(JobResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.is_cancellable = None + self.is_deletable = None + self.is_shipping_address_editable = None + self.status = None + self.start_time = None + self.error = None + self.details = details + self.cancellation_reason = None + self.name = None + self.id = None + self.type = None + + +class JobResourceUpdateParameter(Model): + """The JobResourceUpdateParameter. + + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :param destination_account_details: Destination account details. + :type destination_account_details: + list[~azure.mgmt.databox.models.DestinationAccountDetails] + :param 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] + """ + + _attribute_map = { + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + 'destination_account_details': {'key': 'properties.destinationAccountDetails', 'type': '[DestinationAccountDetails]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, details=None, destination_account_details=None, tags=None, **kwargs) -> None: + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.details = details + self.destination_account_details = destination_account_details + self.tags = tags + + +class JobStages(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' + :vartype stage_name: str or ~azure.mgmt.databox.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 + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: datetime + :ivar job_stage_details: Job Stage Details + :vartype job_stage_details: object + :ivar error_details: Error details for the stage. + :vartype error_details: list[~azure.mgmt.databox.models.JobErrorDetails] + """ + + _validation = { + 'stage_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'stage_status': {'readonly': True}, + 'stage_time': {'readonly': True}, + 'job_stage_details': {'readonly': True}, + 'error_details': {'readonly': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'StageName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'StageStatus'}, + 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, + 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorDetails]'}, + } + + def __init__(self, **kwargs) -> None: + 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 + self.error_details = None + + +class NotificationPreference(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.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + Default value: True . + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'NotificationStageName'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__(self, *, stage_name, send_notification: bool=True, **kwargs) -> None: + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = stage_name + self.send_notification = send_notification + + +class Operation(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.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: object + :ivar origin: Origin of the operation. Can be : user|system|user,system + :vartype origin: str + """ + + _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'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.properties = None + self.origin = None + + +class OperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PackageShippingDetails(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) -> None: + super(PackageShippingDetails, self).__init__(**kwargs) + self.carrier_name = None + self.tracking_id = None + self.tracking_url = None + + +class Preferences(Model): + """Preferences related to the order. + + :param preferred_data_center_region: + :type preferred_data_center_region: list[str] + """ + + _attribute_map = { + 'preferred_data_center_region': {'key': 'preferredDataCenterRegion', 'type': '[str]'}, + } + + def __init__(self, *, preferred_data_center_region=None, **kwargs) -> None: + super(Preferences, self).__init__(**kwargs) + self.preferred_data_center_region = preferred_data_center_region + + +class ShareCredentialDetails(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.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] + """ + + _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': 'ShareDestinationFormatType'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[AccessProtocol]'}, + } + + def __init__(self, **kwargs) -> None: + 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(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 + :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 + :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, end_time, shipment_location: str, **kwargs) -> None: + super(ShipmentPickUpRequest, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.shipment_location = shipment_location + + +class ShipmentPickUpResponse(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 + """ + + _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) -> None: + super(ShipmentPickUpResponse, self).__init__(**kwargs) + self.confirmation_number = None + self.ready_by_time = None + + +class ShippingAddress(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: Required. 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.models.AddressType + """ + + _validation = { + 'street_address1': {'required': True}, + 'country': {'required': True}, + 'postal_code': {'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': 'AddressType'}, + } + + def __init__(self, *, street_address1: str, country: str, postal_code: str, street_address2: str=None, street_address3: str=None, city: str=None, state_or_province: str=None, zip_extended_code: str=None, company_name: str=None, address_type="None", **kwargs) -> None: + 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(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.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': 'SkuName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__(self, *, name, display_name: str=None, family: str=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.family = family + + +class SkuCapacity(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) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.usable = None + self.maximum = None + + +class SkuCost(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 + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'meter_type': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_type': {'key': 'meterType', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.meter_type = None + + +class SkuInformation(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.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] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.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 + :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}, + 'destination_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'}, + 'destination_to_service_location_map': {'key': 'properties.destinationToServiceLocationMap', 'type': '[DestinationToServiceLocationMap]'}, + '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': 'SkuDisabledReason'}, + 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, + 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuInformation, self).__init__(**kwargs) + self.sku = None + self.enabled = None + self.destination_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 UnencryptedCredentials(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.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) -> None: + super(UnencryptedCredentials, self).__init__(**kwargs) + self.job_name = None + self.job_secrets = None + + +class UpdateJobDetails(Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + """ + + _attribute_map = { + 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + } + + def __init__(self, *, contact_details=None, shipping_address=None, **kwargs) -> None: + super(UpdateJobDetails, self).__init__(**kwargs) + self.contact_details = contact_details + self.shipping_address = shipping_address + + +class ValidateAddress(Model): + """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 shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.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 + """ + + _validation = { + 'shipping_address': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, + 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + } + + def __init__(self, *, shipping_address, device_type, **kwargs) -> None: + super(ValidateAddress, self).__init__(**kwargs) + self.shipping_address = shipping_address + self.device_type = device_type diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_paged_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_paged_models.py similarity index 100% rename from sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_paged_models.py rename to sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/models/_paged_models.py diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/__init__.py similarity index 100% rename from sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/__init__.py rename to sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/__init__.py 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 new file mode 100644 index 000000000000..05ffeaa4115f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_jobs_operations.py @@ -0,0 +1,758 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class JobsOperations(object): + """JobsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API Version. Constant value: "2018-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-01" + + self.config = config + + def list( + self, skip_token=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobResource + :rtype: + ~azure.mgmt.databox.models.JobResourcePaged[~azure.mgmt.databox.models.JobResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} + + def list_by_resource_group( + self, resource_group_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobResource + :rtype: + ~azure.mgmt.databox.models.JobResourcePaged[~azure.mgmt.databox.models.JobResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} + + def get( + self, resource_group_name, job_name, expand=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.JobResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + + def _create_initial( + self, resource_group_name, job_name, job_resource, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(job_resource, 'JobResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, job_name, job_resource, custom_headers=None, raw=False, polling=True, **operation_config): + """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.models.JobResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns JobResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databox.models.JobResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databox.models.JobResource]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + + def _delete_initial( + self, resource_group_name, job_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, job_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + + def _update_initial( + self, resource_group_name, job_name, job_resource_update_parameter, if_match=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, job_name, job_resource_update_parameter, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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.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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns JobResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databox.models.JobResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databox.models.JobResource]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + def book_shipment_pick_up( + self, resource_group_name, job_name, shipment_pick_up_request, custom_headers=None, raw=False, **operation_config): + """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.models.ShipmentPickUpRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ShipmentPickUpResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShipmentPickUpResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} + + def cancel( + self, resource_group_name, job_name, reason, custom_headers=None, raw=False, **operation_config): + """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 reason: Reason for cancellation. + :type reason: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + cancellation_reason = models.CancellationReason(reason=reason) + + # Construct URL + url = self.cancel.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} + + def list_credentials( + self, resource_group_name, job_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of UnencryptedCredentials + :rtype: + ~azure.mgmt.databox.models.UnencryptedCredentialsPaged[~azure.mgmt.databox.models.UnencryptedCredentials] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UnencryptedCredentialsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} 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 new file mode 100644 index 000000000000..3983edf1f59c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API Version. Constant value: "2018-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """This method gets all the operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.databox.models.OperationPaged[~azure.mgmt.databox.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} 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 new file mode 100644 index 000000000000..5f41844ca88b --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/operations/_service_operations.py @@ -0,0 +1,187 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ServiceOperations(object): + """ServiceOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API Version. Constant value: "2018-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-01-01" + + self.config = config + + def list_available_skus( + self, location, available_sku_request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInformation + :rtype: + ~azure.mgmt.databox.models.SkuInformationPaged[~azure.mgmt.databox.models.SkuInformation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_skus.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInformationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} + + def validate_address_method( + self, location, shipping_address, device_type, custom_headers=None, raw=False, **operation_config): + """This method validates the customer shipping address and provide + alternate addresses if any. + + :param location: The location of the resource + :type location: str + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :param device_type: Device type to be used for the job. Possible + values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :type device_type: str or ~azure.mgmt.databox.models.SkuName + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AddressValidationOutput or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.AddressValidationOutput or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + validate_address = models.ValidateAddress(shipping_address=shipping_address, device_type=device_type) + + # Construct URL + url = self.validate_address_method.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_address, 'ValidateAddress') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressValidationOutput', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate_address_method.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} 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 new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2018_01_01/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/__init__.py new file mode 100644 index 000000000000..1c85885ae27c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_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 ._configuration import DataBoxManagementClientConfiguration +from ._data_box_management_client import DataBoxManagementClient +__all__ = ['DataBoxManagementClient', 'DataBoxManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_configuration.py new file mode 100644 index 000000000000..adf67e024e24 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_configuration.py @@ -0,0 +1,48 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class DataBoxManagementClientConfiguration(AzureConfiguration): + """Configuration for DataBoxManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Subscription Id + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DataBoxManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-databox/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id 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 new file mode 100644 index 000000000000..7c2f11f5e82f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/_data_box_management_client.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.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import ServiceOperations +from . import models + + +class DataBoxManagementClient(SDKClient): + """DataBoxManagementClient + + :ivar config: Configuration for client. + :vartype config: DataBoxManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.operations.Operations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.databox.operations.JobsOperations + :ivar service: Service operations + :vartype service: azure.mgmt.databox.operations.ServiceOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Subscription Id + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DataBoxManagementClientConfiguration(credentials, subscription_id, base_url) + super(DataBoxManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-09-01' + self._serialize = Serializer(client_models) + 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) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/__init__.py similarity index 100% rename from sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/__init__.py rename to sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/__init__.py diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/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 similarity index 100% rename from sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_data_box_management_client_enums.py rename to sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_data_box_management_client_enums.py diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models.py similarity index 98% rename from sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models.py rename to sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models.py index 34a4d7aa419d..1dd6dd64284e 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models.py @@ -756,9 +756,9 @@ class JobDetails(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, + :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] :param contact_details: Required. Contact details for notification and @@ -805,7 +805,7 @@ class JobDetails(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'}, @@ -826,7 +826,7 @@ class JobDetails(Model): def __init__(self, **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.get('contact_details', None) self.shipping_address = kwargs.get('shipping_address', None) @@ -849,9 +849,9 @@ 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, + :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] :param contact_details: Required. Contact details for notification and @@ -913,7 +913,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'}, @@ -1065,9 +1065,9 @@ 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, + :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] :param contact_details: Required. Contact details for notification and @@ -1119,7 +1119,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'}, @@ -1234,9 +1234,9 @@ 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, + :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] :param contact_details: Required. Contact details for notification and @@ -1288,7 +1288,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'}, @@ -1533,8 +1533,8 @@ class DcAccessSecurityCode(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__(self, **kwargs): @@ -1696,26 +1696,26 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Constant filled by server. :type sku_name: 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'}, - 'expected_data_size_in_terabytes': {'key': 'expectedDataSizeInTerabytes', 'type': 'int'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, } def __init__(self, **kwargs): super(DiskScheduleAvailabilityRequest, 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.sku_name = 'DataBoxDisk' @@ -1942,7 +1942,7 @@ class JobResource(Resource): :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str :param delivery_type: Delivery type of Job. Possible values include: - 'NonScheduled', 'Scheduled' + 'NonScheduled', 'Scheduled'. Default value: "NonScheduled" . :type delivery_type: str or ~azure.mgmt.databox.models.JobDeliveryType :param delivery_info: Delivery Info of Job. :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo @@ -2003,7 +2003,7 @@ def __init__(self, **kwargs): 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 self.name = None @@ -2103,6 +2103,7 @@ class NotificationPreference(Model): 'DataCopy' :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName :param send_notification: Required. Notification is required or not. + Default value: True . :type send_notification: bool """ @@ -2119,7 +2120,7 @@ class NotificationPreference(Model): def __init__(self, **kwargs): super(NotificationPreference, self).__init__(**kwargs) self.stage_name = kwargs.get('stage_name', None) - self.send_notification = kwargs.get('send_notification', None) + self.send_notification = kwargs.get('send_notification', True) class Operation(Model): @@ -2527,7 +2528,7 @@ class ShippingAddress(Model): :param company_name: Name of the company. :type company_name: str :param address_type: Type of address. Possible values include: 'None', - 'Residential', 'Commercial' + 'Residential', 'Commercial'. Default value: "None" . :type address_type: str or ~azure.mgmt.databox.models.AddressType """ @@ -2561,7 +2562,7 @@ def __init__(self, **kwargs): 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(Model): diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models_py3.py similarity index 97% rename from sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models_py3.py rename to sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models_py3.py index a96c0dc5c495..c720f9119409 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models_py3.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models_py3.py @@ -756,9 +756,9 @@ class JobDetails(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, + :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] :param contact_details: Required. Contact details for notification and @@ -805,7 +805,7 @@ class JobDetails(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'}, @@ -824,9 +824,9 @@ class JobDetails(Model): 'job_details_type': {'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails', 'DataBox': 'DataBoxJobDetails'} } - def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_terabytes: int=None, preferences=None, **kwargs) -> None: + def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_tera_bytes: int=None, preferences=None, **kwargs) -> None: 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 @@ -849,9 +849,9 @@ 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, + :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] :param contact_details: Required. Contact details for notification and @@ -913,7 +913,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'}, @@ -932,8 +932,8 @@ class DataBoxDiskJobDetails(JobDetails): 'passkey': {'key': 'passkey', 'type': 'str'}, } - def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_terabytes: int=None, preferences=None, preferred_disks=None, passkey: str=None, **kwargs) -> None: - 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) + def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_tera_bytes: int=None, preferences=None, preferred_disks=None, passkey: str=None, **kwargs) -> None: + 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.preferred_disks = preferred_disks self.copy_progress = None self.disks_and_size_details = None @@ -1065,9 +1065,9 @@ 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, + :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] :param contact_details: Required. Contact details for notification and @@ -1119,7 +1119,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'}, @@ -1136,8 +1136,8 @@ class DataBoxHeavyJobDetails(JobDetails): 'device_password': {'key': 'devicePassword', 'type': 'str'}, } - def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_terabytes: int=None, preferences=None, device_password: str=None, **kwargs) -> None: - 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) + def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_tera_bytes: int=None, preferences=None, device_password: str=None, **kwargs) -> None: + 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.copy_progress = None self.device_password = device_password self.job_details_type = 'DataBoxHeavy' @@ -1234,9 +1234,9 @@ 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, + :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] :param contact_details: Required. Contact details for notification and @@ -1288,7 +1288,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'}, @@ -1305,8 +1305,8 @@ class DataBoxJobDetails(JobDetails): 'device_password': {'key': 'devicePassword', 'type': 'str'}, } - def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_terabytes: int=None, preferences=None, device_password: str=None, **kwargs) -> None: - 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) + def __init__(self, *, contact_details, shipping_address, destination_account_details, expected_data_size_in_tera_bytes: int=None, preferences=None, device_password: str=None, **kwargs) -> None: + 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.copy_progress = None self.device_password = device_password self.job_details_type = 'DataBox' @@ -1533,8 +1533,8 @@ class DcAccessSecurityCode(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__(self, *, forward_dc_access_code: str=None, reverse_dc_access_code: str=None, **kwargs) -> None: @@ -1696,26 +1696,26 @@ class DiskScheduleAvailabilityRequest(ScheduleAvailabilityRequest): :type storage_location: str :param sku_name: Required. Constant filled by server. :type sku_name: 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'}, - '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, **kwargs) -> None: + def __init__(self, *, storage_location: str, expected_data_size_in_tera_bytes: int, **kwargs) -> None: super(DiskScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, **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.sku_name = 'DataBoxDisk' @@ -1942,7 +1942,7 @@ class JobResource(Resource): :ivar cancellation_reason: Reason for cancellation. :vartype cancellation_reason: str :param delivery_type: Delivery type of Job. Possible values include: - 'NonScheduled', 'Scheduled' + 'NonScheduled', 'Scheduled'. Default value: "NonScheduled" . :type delivery_type: str or ~azure.mgmt.databox.models.JobDeliveryType :param delivery_info: Delivery Info of Job. :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo @@ -1993,7 +1993,7 @@ class JobResource(Resource): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, location: str, sku, tags=None, details=None, delivery_type=None, delivery_info=None, **kwargs) -> None: + def __init__(self, *, location: str, sku, tags=None, details=None, delivery_type="NonScheduled", delivery_info=None, **kwargs) -> None: super(JobResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) self.is_cancellable = None self.is_deletable = None @@ -2103,6 +2103,7 @@ class NotificationPreference(Model): 'DataCopy' :type stage_name: str or ~azure.mgmt.databox.models.NotificationStageName :param send_notification: Required. Notification is required or not. + Default value: True . :type send_notification: bool """ @@ -2116,7 +2117,7 @@ class NotificationPreference(Model): 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, } - def __init__(self, *, stage_name, send_notification: bool, **kwargs) -> None: + def __init__(self, *, stage_name, send_notification: bool=True, **kwargs) -> None: super(NotificationPreference, self).__init__(**kwargs) self.stage_name = stage_name self.send_notification = send_notification @@ -2527,7 +2528,7 @@ class ShippingAddress(Model): :param company_name: Name of the company. :type company_name: str :param address_type: Type of address. Possible values include: 'None', - 'Residential', 'Commercial' + 'Residential', 'Commercial'. Default value: "None" . :type address_type: str or ~azure.mgmt.databox.models.AddressType """ @@ -2550,7 +2551,7 @@ class ShippingAddress(Model): 'address_type': {'key': 'addressType', 'type': 'AddressType'}, } - def __init__(self, *, street_address1: str, country: str, postal_code: str, street_address2: str=None, street_address3: str=None, city: str=None, state_or_province: str=None, zip_extended_code: str=None, company_name: str=None, address_type=None, **kwargs) -> None: + def __init__(self, *, street_address1: str, country: str, postal_code: str, street_address2: str=None, street_address3: str=None, city: str=None, state_or_province: str=None, zip_extended_code: str=None, company_name: str=None, address_type="None", **kwargs) -> None: super(ShippingAddress, self).__init__(**kwargs) self.street_address1 = street_address1 self.street_address2 = street_address2 diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_paged_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_paged_models.py new file mode 100644 index 000000000000..0396852889e1 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_paged_models.py @@ -0,0 +1,66 @@ +# 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.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class JobResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`JobResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobResource]'} + } + + def __init__(self, *args, **kwargs): + + super(JobResourcePaged, self).__init__(*args, **kwargs) +class UnencryptedCredentialsPaged(Paged): + """ + A paging container for iterating over a list of :class:`UnencryptedCredentials ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UnencryptedCredentials]'} + } + + def __init__(self, *args, **kwargs): + + super(UnencryptedCredentialsPaged, self).__init__(*args, **kwargs) +class SkuInformationPaged(Paged): + """ + A paging container for iterating over a list of :class:`SkuInformation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SkuInformation]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuInformationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/__init__.py new file mode 100644 index 000000000000..034974abbcce --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/__init__.py @@ -0,0 +1,20 @@ +# 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 ._service_operations import ServiceOperations + +__all__ = [ + 'Operations', + 'JobsOperations', + 'ServiceOperations', +] diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_jobs_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_jobs_operations.py similarity index 100% rename from sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_jobs_operations.py rename to sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_jobs_operations.py diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_operations.py similarity index 100% rename from sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_operations.py rename to sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_operations.py diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_service_operations.py similarity index 100% rename from sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_service_operations.py rename to sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/operations/_service_operations.py 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 new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/__init__.py new file mode 100644 index 000000000000..1c85885ae27c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_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 ._configuration import DataBoxManagementClientConfiguration +from ._data_box_management_client import DataBoxManagementClient +__all__ = ['DataBoxManagementClient', 'DataBoxManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_configuration.py new file mode 100644 index 000000000000..adf67e024e24 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_configuration.py @@ -0,0 +1,48 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class DataBoxManagementClientConfiguration(AzureConfiguration): + """Configuration for DataBoxManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Subscription Id + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DataBoxManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-databox/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id 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 new file mode 100644 index 000000000000..233f1adcc73d --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/_data_box_management_client.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.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import ServiceOperations +from . import models + + +class DataBoxManagementClient(SDKClient): + """DataBoxManagementClient + + :ivar config: Configuration for client. + :vartype config: DataBoxManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.operations.Operations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.databox.operations.JobsOperations + :ivar service: Service operations + :vartype service: azure.mgmt.databox.operations.ServiceOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Subscription Id + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DataBoxManagementClientConfiguration(credentials, subscription_id, base_url) + super(DataBoxManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2020-04-01' + self._serialize = Serializer(client_models) + 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) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/__init__.py new file mode 100644 index 000000000000..178e280b9226 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/__init__.py @@ -0,0 +1,342 @@ +# 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 ApiError, ApiErrorException + from ._models_py3 import ApplianceNetworkConfiguration + from ._models_py3 import ArmBaseObject + from ._models_py3 import AvailableSkuRequest + from ._models_py3 import AzureFileFilterDetails + from ._models_py3 import BlobFilterDetails + from ._models_py3 import CancellationReason + 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 DataboxJobSecrets + 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 DcAccessSecurityCode + from ._models_py3 import Details + from ._models_py3 import DiskScheduleAvailabilityRequest + from ._models_py3 import DiskSecret + from ._models_py3 import ErrorDetail + from ._models_py3 import FilterFileDetails + from ._models_py3 import HeavyScheduleAvailabilityRequest + from ._models_py3 import JobDeliveryInfo + from ._models_py3 import JobDetails + from ._models_py3 import JobResource + from ._models_py3 import JobResourceUpdateParameter + from ._models_py3 import JobSecrets + from ._models_py3 import JobStages + from ._models_py3 import KeyEncryptionKey + from ._models_py3 import ManagedDiskDetails + from ._models_py3 import NotificationPreference + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + 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 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 UpdateJobDetails + 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 + from ._models import AdditionalErrorInfo + from ._models import AddressValidationOutput + from ._models import ApiError, ApiErrorException + from ._models import ApplianceNetworkConfiguration + from ._models import ArmBaseObject + from ._models import AvailableSkuRequest + from ._models import AzureFileFilterDetails + from ._models import BlobFilterDetails + from ._models import CancellationReason + from ._models import ContactDetails + from ._models import CopyLogDetails + from ._models import CopyProgress + from ._models import CreateJobValidations + from ._models import CreateOrderLimitForSubscriptionValidationRequest + from ._models import CreateOrderLimitForSubscriptionValidationResponseProperties + from ._models import DataAccountDetails + from ._models import DataBoxAccountCopyLogDetails + from ._models import DataBoxDiskCopyLogDetails + from ._models import DataBoxDiskCopyProgress + from ._models import DataBoxDiskJobDetails + from ._models import DataBoxDiskJobSecrets + from ._models import DataBoxHeavyAccountCopyLogDetails + from ._models import DataBoxHeavyJobDetails + from ._models import DataBoxHeavyJobSecrets + from ._models import DataBoxHeavySecret + from ._models import DataBoxJobDetails + from ._models import DataboxJobSecrets + from ._models import DataBoxScheduleAvailabilityRequest + from ._models import DataBoxSecret + from ._models import DataExportDetails + from ._models import DataImportDetails + from ._models import DataLocationToServiceLocationMap + from ._models import DataTransferDetailsValidationRequest + from ._models import DataTransferDetailsValidationResponseProperties + from ._models import DcAccessSecurityCode + from ._models import Details + from ._models import DiskScheduleAvailabilityRequest + from ._models import DiskSecret + from ._models import ErrorDetail + from ._models import FilterFileDetails + from ._models import HeavyScheduleAvailabilityRequest + from ._models import JobDeliveryInfo + from ._models import JobDetails + from ._models import JobResource + from ._models import JobResourceUpdateParameter + from ._models import JobSecrets + from ._models import JobStages + from ._models import KeyEncryptionKey + from ._models import ManagedDiskDetails + from ._models import NotificationPreference + from ._models import Operation + from ._models import OperationDisplay + from ._models import PackageShippingDetails + from ._models import Preferences + from ._models import PreferencesValidationRequest + from ._models import PreferencesValidationResponseProperties + from ._models import RegionConfigurationRequest + from ._models import RegionConfigurationResponse + from ._models import Resource + from ._models import ResourceIdentity + from ._models import ScheduleAvailabilityRequest + from ._models import ScheduleAvailabilityResponse + from ._models import ShareCredentialDetails + from ._models import ShipmentPickUpRequest + from ._models import ShipmentPickUpResponse + from ._models import ShippingAddress + from ._models import Sku + from ._models import SkuAvailabilityValidationRequest + from ._models import SkuAvailabilityValidationResponseProperties + from ._models import SkuCapacity + from ._models import SkuCost + from ._models import SkuInformation + from ._models import StorageAccountDetails + from ._models import SubscriptionIsAllowedToCreateJobValidationRequest + from ._models import SubscriptionIsAllowedToCreateJobValidationResponseProperties + from ._models import TransferAllDetails + from ._models import TransferConfiguration + from ._models import TransferConfigurationTransferAllDetails + from ._models import TransferConfigurationTransferFilterDetails + from ._models import TransferFilterDetails + from ._models import TransportAvailabilityDetails + from ._models import TransportAvailabilityRequest + from ._models import TransportAvailabilityResponse + from ._models import TransportPreferences + from ._models import UnencryptedCredentials + from ._models import UpdateJobDetails + from ._models import ValidateAddress + from ._models import ValidationInputRequest + from ._models import ValidationInputResponse + from ._models import ValidationRequest + from ._models import ValidationResponse +from ._paged_models import JobResourcePaged +from ._paged_models import OperationPaged +from ._paged_models import SkuInformationPaged +from ._paged_models import UnencryptedCredentialsPaged +from ._data_box_management_client_enums import ( + DataAccountType, + ShareDestinationFormatType, + AccessProtocol, + AddressValidationStatus, + AddressType, + TransferType, + SkuName, + SkuDisabledReason, + NotificationStageName, + ValidationStatus, + CopyStatus, + TransferConfigurationType, + FilterFileType, + LogCollectionLevel, + StageName, + StageStatus, + TransportShipmentTypes, + KekType, + JobDeliveryType, + OverallValidationStatus, +) + +__all__ = [ + 'AccountCredentialDetails', + 'AdditionalErrorInfo', + 'AddressValidationOutput', + 'ApiError', 'ApiErrorException', + 'ApplianceNetworkConfiguration', + 'ArmBaseObject', + 'AvailableSkuRequest', + 'AzureFileFilterDetails', + 'BlobFilterDetails', + 'CancellationReason', + 'ContactDetails', + 'CopyLogDetails', + 'CopyProgress', + 'CreateJobValidations', + 'CreateOrderLimitForSubscriptionValidationRequest', + 'CreateOrderLimitForSubscriptionValidationResponseProperties', + 'DataAccountDetails', + 'DataBoxAccountCopyLogDetails', + 'DataBoxDiskCopyLogDetails', + 'DataBoxDiskCopyProgress', + 'DataBoxDiskJobDetails', + 'DataBoxDiskJobSecrets', + 'DataBoxHeavyAccountCopyLogDetails', + 'DataBoxHeavyJobDetails', + 'DataBoxHeavyJobSecrets', + 'DataBoxHeavySecret', + 'DataBoxJobDetails', + 'DataboxJobSecrets', + 'DataBoxScheduleAvailabilityRequest', + 'DataBoxSecret', + 'DataExportDetails', + 'DataImportDetails', + 'DataLocationToServiceLocationMap', + 'DataTransferDetailsValidationRequest', + 'DataTransferDetailsValidationResponseProperties', + 'DcAccessSecurityCode', + 'Details', + 'DiskScheduleAvailabilityRequest', + 'DiskSecret', + 'ErrorDetail', + 'FilterFileDetails', + 'HeavyScheduleAvailabilityRequest', + 'JobDeliveryInfo', + 'JobDetails', + 'JobResource', + 'JobResourceUpdateParameter', + 'JobSecrets', + 'JobStages', + 'KeyEncryptionKey', + 'ManagedDiskDetails', + 'NotificationPreference', + 'Operation', + 'OperationDisplay', + 'PackageShippingDetails', + 'Preferences', + 'PreferencesValidationRequest', + 'PreferencesValidationResponseProperties', + 'RegionConfigurationRequest', + 'RegionConfigurationResponse', + 'Resource', + 'ResourceIdentity', + 'ScheduleAvailabilityRequest', + 'ScheduleAvailabilityResponse', + 'ShareCredentialDetails', + 'ShipmentPickUpRequest', + 'ShipmentPickUpResponse', + 'ShippingAddress', + 'Sku', + 'SkuAvailabilityValidationRequest', + 'SkuAvailabilityValidationResponseProperties', + 'SkuCapacity', + 'SkuCost', + 'SkuInformation', + 'StorageAccountDetails', + 'SubscriptionIsAllowedToCreateJobValidationRequest', + 'SubscriptionIsAllowedToCreateJobValidationResponseProperties', + 'TransferAllDetails', + 'TransferConfiguration', + 'TransferConfigurationTransferAllDetails', + 'TransferConfigurationTransferFilterDetails', + 'TransferFilterDetails', + 'TransportAvailabilityDetails', + 'TransportAvailabilityRequest', + 'TransportAvailabilityResponse', + 'TransportPreferences', + 'UnencryptedCredentials', + 'UpdateJobDetails', + 'ValidateAddress', + 'ValidationInputRequest', + 'ValidationInputResponse', + 'ValidationRequest', + 'ValidationResponse', + 'OperationPaged', + 'JobResourcePaged', + 'UnencryptedCredentialsPaged', + 'SkuInformationPaged', + 'DataAccountType', + 'ShareDestinationFormatType', + 'AccessProtocol', + 'AddressValidationStatus', + 'AddressType', + 'TransferType', + 'SkuName', + 'SkuDisabledReason', + 'NotificationStageName', + 'ValidationStatus', + 'CopyStatus', + 'TransferConfigurationType', + 'FilterFileType', + 'LogCollectionLevel', + 'StageName', + 'StageStatus', + 'TransportShipmentTypes', + 'KekType', + 'JobDeliveryType', + 'OverallValidationStatus', +] 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 new file mode 100644 index 000000000000..5859d59b7712 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_data_box_management_client_enums.py @@ -0,0 +1,179 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DataAccountType(str, Enum): + + storage_account = "StorageAccount" #: Storage Accounts . + managed_disk = "ManagedDisk" #: Azure Managed disk storage. + + +class ShareDestinationFormatType(str, Enum): + + 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. + + +class AccessProtocol(str, Enum): + + smb = "SMB" #: Server Message Block protocol(SMB). + nfs = "NFS" #: Network File System protocol(NFS). + + +class AddressValidationStatus(str, Enum): + + 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. + + +class AddressType(str, Enum): + + none = "None" #: Address type not known. + residential = "Residential" #: Residential Address. + commercial = "Commercial" #: Commercial Address. + + +class TransferType(str, Enum): + + import_to_azure = "ImportToAzure" #: Import data to azure. + export_from_azure = "ExportFromAzure" #: Export data from azure. + + +class SkuName(str, Enum): + + data_box = "DataBox" #: Data Box. + data_box_disk = "DataBoxDisk" #: Data Box Disk. + data_box_heavy = "DataBoxHeavy" #: Data Box Heavy. + + +class SkuDisabledReason(str, Enum): + + 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. + + +class NotificationStageName(str, Enum): + + 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. + + +class ValidationStatus(str, Enum): + + valid = "Valid" #: Validation is successful + invalid = "Invalid" #: Validation is not successful + skipped = "Skipped" #: Validation is skipped + + +class CopyStatus(str, Enum): + + 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. + + +class TransferConfigurationType(str, Enum): + + transfer_all = "TransferAll" #: Transfer all the data. + transfer_using_filter = "TransferUsingFilter" #: Transfer using filter. + + +class FilterFileType(str, Enum): + + azure_blob = "AzureBlob" #: Filter file is of the type AzureBlob. + azure_file = "AzureFile" #: Filter file is of the type AzureFiles. + + +class LogCollectionLevel(str, Enum): + + error = "Error" #: Only Errors will be collected in the logs. + verbose = "Verbose" #: Verbose logging (includes Errors, CRC, size information and others). + + +class StageName(str, Enum): + + 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. + + +class StageStatus(str, Enum): + + 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. + + +class TransportShipmentTypes(str, Enum): + + customer_managed = "CustomerManaged" #: Shipment Logistics is handled by the customer. + microsoft_managed = "MicrosoftManaged" #: Shipment Logistics is handled by Microsoft. + + +class KekType(str, Enum): + + microsoft_managed = "MicrosoftManaged" #: Key encryption key is managed by Microsoft. + customer_managed = "CustomerManaged" #: Key encryption key is managed by the Customer. + + +class JobDeliveryType(str, Enum): + + non_scheduled = "NonScheduled" #: Non Scheduled job. + scheduled = "Scheduled" #: Scheduled job. + + +class OverallValidationStatus(str, Enum): + + 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. 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 new file mode 100644 index 000000000000..6636cd53fed4 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models.py @@ -0,0 +1,3604 @@ +# 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.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccountCredentialDetails(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.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] + """ + + _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': 'DataAccountType'}, + '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(Model): + """Additional error info. + + :param type: Additional error type. + :type type: str + :param info: Additional error info. + :type info: object + """ + + _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(Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.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 + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: + list[~azure.mgmt.databox.models.ShippingAddress] + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'AddressValidationStatus'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__(self, **kwargs): + super(AddressValidationOutput, self).__init__(**kwargs) + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ApiError(Model): + """ApiError. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. + :type error: ~azure.mgmt.databox.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.get('error', None) + + +class ApiErrorException(HttpOperationError): + """Server responsed with exception of type: 'ApiError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) + + +class ApplianceNetworkConfiguration(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(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(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.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.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku_names': {'key': 'skuNames', 'type': '[SkuName]'}, + } + + def __init__(self, **kwargs): + super(AvailableSkuRequest, self).__init__(**kwargs) + self.transfer_type = kwargs.get('transfer_type', None) + self.country = kwargs.get('country', None) + self.location = kwargs.get('location', None) + self.sku_names = kwargs.get('sku_names', None) + + +class AzureFileFilterDetails(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(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(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.get('reason', None) + + +class CloudError(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.models.CloudError] + :ivar additional_info: Cloud error additional info. + :vartype additional_info: + list[~azure.mgmt.databox.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(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.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.get('contact_name', None) + self.phone = kwargs.get('phone', None) + self.phone_extension = kwargs.get('phone_extension', None) + self.mobile = kwargs.get('mobile', None) + self.email_list = kwargs.get('email_list', None) + self.notification_preference = kwargs.get('notification_preference', None) + + +class CopyLogDetails(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. Constant filled by server. + :type copy_log_details_type: str + """ + + _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 + + +class CopyProgress(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.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 + :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': 'TransferType'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'DataAccountType'}, + '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(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 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] + :param validation_category: Required. Constant filled by server. + :type validation_category: str + """ + + _validation = { + 'individual_request_details': {'required': True}, + 'validation_category': {'required': True}, + } + + _attribute_map = { + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + } + + _subtype_map = { + 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} + } + + def __init__(self, **kwargs): + super(ValidationRequest, self).__init__(**kwargs) + self.individual_request_details = kwargs.get('individual_request_details', None) + self.validation_category = None + + +class CreateJobValidations(ValidationRequest): + """It does all pre-job creation validations. + + All required parameters must be populated in order to send to Azure. + + :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] + :param validation_category: Required. Constant filled by server. + :type validation_category: str + """ + + _validation = { + 'individual_request_details': {'required': True}, + 'validation_category': {'required': True}, + } + + _attribute_map = { + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateJobValidations, self).__init__(**kwargs) + self.validation_category = 'JobCreationValidation' + + +class ValidationInputRequest(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: CreateOrderLimitForSubscriptionValidationRequest, + DataTransferDetailsValidationRequest, PreferencesValidationRequest, + SkuAvailabilityValidationRequest, + SubscriptionIsAllowedToCreateJobValidationRequest, ValidateAddress + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Constant filled by server. + :type validation_type: str + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest', 'ValidateAddress': 'ValidateAddress'} + } + + def __init__(self, **kwargs): + super(ValidationInputRequest, self).__init__(**kwargs) + self.validation_type = None + + +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. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + } + + def __init__(self, **kwargs): + super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.device_type = kwargs.get('device_type', None) + self.validation_type = 'ValidateCreateOrderLimit' + + +class ValidationInputResponse(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: + 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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__(self, **kwargs): + super(ValidationInputResponse, self).__init__(**kwargs) + self.error = None + self.validation_type = None + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Create order limit validation status. Possible values + include: 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs): + super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateCreateOrderLimit' + + +class DataAccountDetails(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 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 data_account_type: Required. Constant filled by server. + :type data_account_type: str + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + } + + _subtype_map = { + 'data_account_type': {'ManagedDisk': 'ManagedDiskDetails', 'StorageAccount': 'StorageAccountDetails'} + } + + def __init__(self, **kwargs): + super(DataAccountDetails, self).__init__(**kwargs) + self.share_password = kwargs.get('share_password', None) + self.data_account_type = 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. Constant filled by server. + :type copy_log_details_type: str + :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.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + self.copy_log_details_type = 'DataBox' + + +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. Constant filled by server. + :type copy_log_details_type: str + :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.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + self.copy_log_details_type = 'DataBoxDisk' + + +class DataBoxDiskCopyProgress(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.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': 'CopyStatus'}, + } + + 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(Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobDetails, DataBoxHeavyJobDetails, + DataBoxJobDetails + + 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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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_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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'key_encryption_key': {'readonly': True}, + 'job_details_type': {'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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_details_type': {'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails', 'DataBox': 'DataBoxJobDetails'} + } + + def __init__(self, **kwargs): + super(JobDetails, self).__init__(**kwargs) + self.job_stages = None + self.contact_details = kwargs.get('contact_details', None) + 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.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 = None + self.expected_data_size_in_tera_bytes = kwargs.get('expected_data_size_in_tera_bytes', None) + self.job_details_type = 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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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_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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :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] + :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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'key_encryption_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', '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.preferred_disks = kwargs.get('preferred_disks', None) + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = kwargs.get('passkey', None) + self.job_details_type = 'DataBoxDisk' + + +class JobSecrets(Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets, + DataboxJobSecrets + + 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 dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets', 'DataBox': 'DataboxJobSecrets'} + } + + def __init__(self, **kwargs): + super(JobSecrets, self).__init__(**kwargs) + self.dc_access_security_code = None + self.error = None + self.job_secrets_type = 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. + + :ivar dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.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 = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + '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.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + self.job_secrets_type = 'DataBoxDisk' + + +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. Constant filled by server. + :type copy_log_details_type: str + :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.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + self.copy_log_details_type = 'DataBoxHeavy' + + +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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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_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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'key_encryption_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataBoxHeavyJobDetails, self).__init__(**kwargs) + self.copy_progress = None + self.device_password = kwargs.get('device_password', None) + self.job_details_type = 'DataBoxHeavy' + + +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. + + :ivar dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :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] + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__(self, **kwargs): + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.cabinet_pod_secrets = None + self.job_secrets_type = 'DataBoxHeavy' + + +class DataBoxHeavySecret(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.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] + """ + + _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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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_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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'key_encryption_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataBoxJobDetails, self).__init__(**kwargs) + self.copy_progress = None + self.device_password = kwargs.get('device_password', None) + self.job_details_type = 'DataBox' + + +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 dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__(self, **kwargs): + super(DataboxJobSecrets, self).__init__(**kwargs) + self.pod_secrets = kwargs.get('pod_secrets', None) + self.job_secrets_type = 'DataBox' + + +class ScheduleAvailabilityRequest(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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', '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.get('storage_location', None) + self.country = kwargs.get('country', None) + self.sku_name = 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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataBoxScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBox' + + +class DataBoxSecret(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.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] + """ + + _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(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.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.models.LogCollectionLevel + :param account_details: Required. Account details of the data to be + transferred + :type account_details: ~azure.mgmt.databox.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': 'LogCollectionLevel'}, + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__(self, **kwargs): + super(DataExportDetails, self).__init__(**kwargs) + self.transfer_configuration = kwargs.get('transfer_configuration', None) + self.log_collection_level = kwargs.get('log_collection_level', "Error") + self.account_details = kwargs.get('account_details', None) + + +class DataImportDetails(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.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.get('account_details', None) + + +class DataLocationToServiceLocationMap(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. Constant filled by server. + :type validation_type: str + :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] + :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] + :param device_type: Required. Device type. Possible values include: + 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :type device_type: str or ~azure.mgmt.databox.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 + """ + + _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': 'SkuName'}, + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + } + + def __init__(self, **kwargs): + super(DataTransferDetailsValidationRequest, self).__init__(**kwargs) + self.data_export_details = kwargs.get('data_export_details', None) + self.data_import_details = kwargs.get('data_import_details', None) + self.device_type = kwargs.get('device_type', None) + self.transfer_type = kwargs.get('transfer_type', None) + self.validation_type = 'ValidateDataTransferDetails' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Data transfer details validation status. Possible values + include: 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs): + super(DataTransferDetailsValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateDataTransferDetails' + + +class DcAccessSecurityCode(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(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.get('code', None) + self.message = kwargs.get('message', None) + + +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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: 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'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DiskScheduleAvailabilityRequest, self).__init__(**kwargs) + self.expected_data_size_in_tera_bytes = kwargs.get('expected_data_size_in_tera_bytes', None) + self.sku_name = 'DataBoxDisk' + + +class DiskSecret(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 ErrorDetail(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.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.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + self.target = kwargs.get('target', None) + + +class FilterFileDetails(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.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': 'FilterFileType'}, + 'filter_file_path': {'key': 'filterFilePath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FilterFileDetails, self).__init__(**kwargs) + self.filter_file_type = kwargs.get('filter_file_type', None) + self.filter_file_path = kwargs.get('filter_file_path', None) + + +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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HeavyScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBoxHeavy' + + +class JobDeliveryInfo(Model): + """Additional delivery info. + + :param scheduled_date_time: Scheduled date time. + :type scheduled_date_time: 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(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: 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.models.Sku + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databox.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.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + 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: 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.models.Sku + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :param transfer_type: Required. Type of the data transfer. Possible values + include: 'ImportToAzure', 'ExportFromAzure' + :type transfer_type: str or ~azure.mgmt.databox.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.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 + format. + :vartype start_time: datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.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 + :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.models.JobDeliveryType + :param delivery_info: Delivery Info of Job. + :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo + :ivar is_cancellable_without_fee: Flag to indicate cancellation of + scheduled job. + :vartype is_cancellable_without_fee: bool + :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 = { + 'location': {'required': True}, + 'sku': {'required': 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}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'transfer_type': {'key': 'properties.transferType', 'type': 'TransferType'}, + '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': 'StageName'}, + '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': 'JobDeliveryType'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, + 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobResource, self).__init__(**kwargs) + self.transfer_type = kwargs.get('transfer_type', None) + 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 + self.name = None + self.id = None + self.type = None + + +class JobResourceUpdateParameter(Model): + """The JobResourceUpdateParameter. + + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :param 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.models.ResourceIdentity + """ + + _attribute_map = { + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + } + + def __init__(self, **kwargs): + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + + +class JobStages(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.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 + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: datetime + :ivar job_stage_details: Job Stage Details + :vartype job_stage_details: object + """ + + _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': 'StageName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'StageStatus'}, + '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(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.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 KekType. + :type kek_vault_resource_id: str + """ + + _validation = { + 'kek_type': {'required': True}, + } + + _attribute_map = { + 'kek_type': {'key': 'kekType', 'type': 'KekType'}, + '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.kek_url = kwargs.get('kek_url', None) + self.kek_vault_resource_id = kwargs.get('kek_vault_resource_id', None) + + +class ManagedDiskDetails(DataAccountDetails): + """Details of the managed disks. + + All required parameters must be populated in order to send to Azure. + + :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 data_account_type: Required. Constant filled by server. + :type data_account_type: 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 = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', '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.resource_group_id = kwargs.get('resource_group_id', None) + self.staging_storage_account_id = kwargs.get('staging_storage_account_id', None) + self.data_account_type = 'ManagedDisk' + + +class NotificationPreference(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.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + Default value: True . + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'NotificationStageName'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = kwargs.get('stage_name', None) + self.send_notification = kwargs.get('send_notification', True) + + +class Operation(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.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: object + :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(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 PackageShippingDetails(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(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.models.TransportPreferences + """ + + _attribute_map = { + 'preferred_data_center_region': {'key': 'preferredDataCenterRegion', 'type': '[str]'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + 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) + + +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. Constant filled by server. + :type validation_type: str + :param preference: Preference of transport and data center. + :type preference: ~azure.mgmt.databox.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 + """ + + _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': 'SkuName'}, + } + + def __init__(self, **kwargs): + super(PreferencesValidationRequest, self).__init__(**kwargs) + self.preference = kwargs.get('preference', None) + self.device_type = kwargs.get('device_type', None) + self.validation_type = 'ValidatePreferences' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs): + super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidatePreferences' + + +class RegionConfigurationRequest(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.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 + """ + + _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(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.models.ScheduleAvailabilityResponse + :ivar transport_availability_response: Transport options available for + given sku in a region. + :vartype transport_availability_response: + ~azure.mgmt.databox.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(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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = None + self.tenant_id = None + + +class ScheduleAvailabilityResponse(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] + """ + + _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(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.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] + """ + + _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': 'ShareDestinationFormatType'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[AccessProtocol]'}, + } + + 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(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 + :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 + :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.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.shipment_location = kwargs.get('shipment_location', None) + + +class ShipmentPickUpResponse(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 + """ + + _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(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: Required. 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.models.AddressType + """ + + _validation = { + 'street_address1': {'required': True}, + 'country': {'required': True}, + 'postal_code': {'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': 'AddressType'}, + } + + def __init__(self, **kwargs): + super(ShippingAddress, self).__init__(**kwargs) + self.street_address1 = kwargs.get('street_address1', None) + 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.get('country', None) + 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(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.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': 'SkuName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + 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. Constant filled by server. + :type validation_type: str + :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 + :param transfer_type: Required. Type of the transfer. Possible values + include: 'ImportToAzure', 'ExportFromAzure' + :type transfer_type: str or ~azure.mgmt.databox.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': 'SkuName'}, + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.device_type = kwargs.get('device_type', None) + self.transfer_type = kwargs.get('transfer_type', None) + self.country = kwargs.get('country', None) + self.location = kwargs.get('location', None) + self.validation_type = 'ValidateSkuAvailability' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Sku availability validation status. Possible values include: + 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs): + super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateSkuAvailability' + + +class SkuCapacity(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(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(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.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] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.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 + :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': 'SkuDisabledReason'}, + '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 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 data_account_type: Required. Constant filled by server. + :type data_account_type: 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 = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccountDetails, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.data_account_type = 'StorageAccount' + + +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. Constant filled by server. + :type validation_type: str + """ + + _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' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs): + super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' + + +class TransferAllDetails(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'. Default value: + "StorageAccount" . + :type data_account_type: str or ~azure.mgmt.databox.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': 'DataAccountType'}, + '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.get('data_account_type', "StorageAccount") + self.transfer_all_blobs = kwargs.get('transfer_all_blobs', None) + self.transfer_all_files = kwargs.get('transfer_all_files', None) + + +class TransferConfiguration(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.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 + :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 + """ + + _validation = { + 'transfer_configuration_type': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration_type': {'key': 'transferConfigurationType', 'type': 'TransferConfigurationType'}, + '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.get('transfer_configuration_type', None) + self.transfer_filter_details = kwargs.get('transfer_filter_details', None) + self.transfer_all_details = kwargs.get('transfer_all_details', None) + + +class TransferConfigurationTransferAllDetails(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 + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferAllDetails'}, + } + + def __init__(self, **kwargs): + super(TransferConfigurationTransferAllDetails, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + + +class TransferConfigurationTransferFilterDetails(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 + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferFilterDetails'}, + } + + def __init__(self, **kwargs): + super(TransferConfigurationTransferFilterDetails, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + + +class TransferFilterDetails(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'. Default value: + "StorageAccount" . + :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :param blob_filter_details: Filter details to transfer blobs. + :type blob_filter_details: ~azure.mgmt.databox.models.BlobFilterDetails + :param azure_file_filter_details: Filter details to transfer Azure files. + :type azure_file_filter_details: + ~azure.mgmt.databox.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] + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'DataAccountType'}, + '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.get('data_account_type', "StorageAccount") + 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(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.models.TransportShipmentTypes + """ + + _validation = { + 'shipment_type': {'readonly': True}, + } + + _attribute_map = { + 'shipment_type': {'key': 'shipmentType', 'type': 'TransportShipmentTypes'}, + } + + def __init__(self, **kwargs): + super(TransportAvailabilityDetails, self).__init__(**kwargs) + self.shipment_type = None + + +class TransportAvailabilityRequest(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.models.SkuName + """ + + _attribute_map = { + 'sku_name': {'key': 'skuName', 'type': 'SkuName'}, + } + + def __init__(self, **kwargs): + super(TransportAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = kwargs.get('sku_name', None) + + +class TransportAvailabilityResponse(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.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(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.models.TransportShipmentTypes + """ + + _validation = { + 'preferred_shipment_type': {'required': True}, + } + + _attribute_map = { + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'TransportShipmentTypes'}, + } + + def __init__(self, **kwargs): + super(TransportPreferences, self).__init__(**kwargs) + self.preferred_shipment_type = kwargs.get('preferred_shipment_type', None) + + +class UnencryptedCredentials(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.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 UpdateJobDetails(Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :param key_encryption_key: Key encryption key for the job. + :type key_encryption_key: ~azure.mgmt.databox.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 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. Constant filled by server. + :type validation_type: str + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.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 + :param transport_preferences: Preferences related to the shipment + logistics of the sku. + :type transport_preferences: + ~azure.mgmt.databox.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': 'SkuName'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__(self, **kwargs): + super(ValidateAddress, self).__init__(**kwargs) + self.shipping_address = kwargs.get('shipping_address', None) + self.device_type = kwargs.get('device_type', None) + self.transport_preferences = kwargs.get('transport_preferences', None) + self.validation_type = 'ValidateAddress' + + +class ValidationResponse(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.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] + """ + + _validation = { + 'status': {'readonly': True}, + 'individual_response_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'OverallValidationStatus'}, + '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/v2020_04_01/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models_py3.py new file mode 100644 index 000000000000..e506e5cbcfb9 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_models_py3.py @@ -0,0 +1,3604 @@ +# 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.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccountCredentialDetails(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.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] + """ + + _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': 'DataAccountType'}, + 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, + 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, + } + + def __init__(self, **kwargs) -> None: + 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(Model): + """Additional error info. + + :param type: Additional error type. + :type type: str + :param info: Additional error info. + :type info: object + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, *, type: str=None, info=None, **kwargs) -> None: + super(AdditionalErrorInfo, self).__init__(**kwargs) + self.type = type + self.info = info + + +class AddressValidationOutput(Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.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 + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: + list[~azure.mgmt.databox.models.ShippingAddress] + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'AddressValidationStatus'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__(self, **kwargs) -> None: + super(AddressValidationOutput, self).__init__(**kwargs) + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ApiError(Model): + """ApiError. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. + :type error: ~azure.mgmt.databox.models.ErrorDetail + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__(self, *, error, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.error = error + + +class ApiErrorException(HttpOperationError): + """Server responsed with exception of type: 'ApiError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) + + +class ApplianceNetworkConfiguration(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) -> None: + super(ApplianceNetworkConfiguration, self).__init__(**kwargs) + self.name = None + self.mac_address = None + + +class ArmBaseObject(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) -> None: + super(ArmBaseObject, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + + +class AvailableSkuRequest(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.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.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku_names': {'key': 'skuNames', 'type': '[SkuName]'}, + } + + def __init__(self, *, transfer_type, country: str, location: str, sku_names=None, **kwargs) -> None: + super(AvailableSkuRequest, self).__init__(**kwargs) + self.transfer_type = transfer_type + self.country = country + self.location = location + self.sku_names = sku_names + + +class AzureFileFilterDetails(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=None, file_path_list=None, file_share_list=None, **kwargs) -> None: + 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(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=None, blob_path_list=None, container_list=None, **kwargs) -> None: + 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(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) -> None: + super(CancellationReason, self).__init__(**kwargs) + self.reason = reason + + +class CloudError(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.models.CloudError] + :ivar additional_info: Cloud error additional info. + :vartype additional_info: + list[~azure.mgmt.databox.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: str=None, message: str=None, target: str=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = None + self.additional_info = None + + +class ContactDetails(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.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, phone_extension: str=None, mobile: str=None, notification_preference=None, **kwargs) -> None: + 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(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. Constant filled by server. + :type copy_log_details_type: str + """ + + _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) -> None: + super(CopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = None + + +class CopyProgress(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.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 + :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': 'TransferType'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'DataAccountType'}, + '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) -> None: + 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(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 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] + :param validation_category: Required. Constant filled by server. + :type validation_category: str + """ + + _validation = { + 'individual_request_details': {'required': True}, + 'validation_category': {'required': True}, + } + + _attribute_map = { + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + } + + _subtype_map = { + 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} + } + + def __init__(self, *, individual_request_details, **kwargs) -> None: + super(ValidationRequest, self).__init__(**kwargs) + self.individual_request_details = individual_request_details + self.validation_category = None + + +class CreateJobValidations(ValidationRequest): + """It does all pre-job creation validations. + + All required parameters must be populated in order to send to Azure. + + :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] + :param validation_category: Required. Constant filled by server. + :type validation_category: str + """ + + _validation = { + 'individual_request_details': {'required': True}, + 'validation_category': {'required': True}, + } + + _attribute_map = { + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + } + + def __init__(self, *, individual_request_details, **kwargs) -> None: + super(CreateJobValidations, self).__init__(individual_request_details=individual_request_details, **kwargs) + self.validation_category = 'JobCreationValidation' + + +class ValidationInputRequest(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: CreateOrderLimitForSubscriptionValidationRequest, + DataTransferDetailsValidationRequest, PreferencesValidationRequest, + SkuAvailabilityValidationRequest, + SubscriptionIsAllowedToCreateJobValidationRequest, ValidateAddress + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Constant filled by server. + :type validation_type: str + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest', 'ValidateAddress': 'ValidateAddress'} + } + + def __init__(self, **kwargs) -> None: + super(ValidationInputRequest, self).__init__(**kwargs) + self.validation_type = None + + +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. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + } + + def __init__(self, *, device_type, **kwargs) -> None: + super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.device_type = device_type + self.validation_type = 'ValidateCreateOrderLimit' + + +class ValidationInputResponse(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: + 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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__(self, **kwargs) -> None: + super(ValidationInputResponse, self).__init__(**kwargs) + self.error = None + self.validation_type = None + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Create order limit validation status. Possible values + include: 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateCreateOrderLimit' + + +class DataAccountDetails(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 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 data_account_type: Required. Constant filled by server. + :type data_account_type: str + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + } + + _subtype_map = { + 'data_account_type': {'ManagedDisk': 'ManagedDiskDetails', 'StorageAccount': 'StorageAccountDetails'} + } + + def __init__(self, *, share_password: str=None, **kwargs) -> None: + super(DataAccountDetails, self).__init__(**kwargs) + self.share_password = share_password + self.data_account_type = 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. Constant filled by server. + :type copy_log_details_type: str + :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) -> None: + super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + self.copy_log_details_type = 'DataBox' + + +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. Constant filled by server. + :type copy_log_details_type: str + :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) -> None: + super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + self.copy_log_details_type = 'DataBoxDisk' + + +class DataBoxDiskCopyProgress(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.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': 'CopyStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.bytes_copied = None + self.percent_complete = None + self.status = None + + +class JobDetails(Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobDetails, DataBoxHeavyJobDetails, + DataBoxJobDetails + + 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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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_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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'key_encryption_key': {'readonly': True}, + 'job_details_type': {'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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_details_type': {'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails', 'DataBox': 'DataBoxJobDetails'} + } + + def __init__(self, *, contact_details, shipping_address=None, data_import_details=None, data_export_details=None, preferences=None, expected_data_size_in_tera_bytes: int=None, **kwargs) -> None: + 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.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 = None + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes + self.job_details_type = 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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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_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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :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] + :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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'key_encryption_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', '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, shipping_address=None, data_import_details=None, data_export_details=None, preferences=None, expected_data_size_in_tera_bytes: int=None, preferred_disks=None, passkey: str=None, **kwargs) -> None: + 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.preferred_disks = preferred_disks + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = passkey + self.job_details_type = 'DataBoxDisk' + + +class JobSecrets(Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets, + DataboxJobSecrets + + 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 dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets', 'DataBox': 'DataboxJobSecrets'} + } + + def __init__(self, **kwargs) -> None: + super(JobSecrets, self).__init__(**kwargs) + self.dc_access_security_code = None + self.error = None + self.job_secrets_type = 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. + + :ivar dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.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 = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'pass_key': {'key': 'passKey', 'type': 'str'}, + 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxDiskJobSecrets, self).__init__(**kwargs) + self.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + self.job_secrets_type = 'DataBoxDisk' + + +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. Constant filled by server. + :type copy_log_details_type: str + :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) -> None: + super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + self.copy_log_details_type = 'DataBoxHeavy' + + +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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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_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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'key_encryption_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__(self, *, contact_details, shipping_address=None, data_import_details=None, data_export_details=None, preferences=None, expected_data_size_in_tera_bytes: int=None, device_password: str=None, **kwargs) -> None: + 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.copy_progress = None + self.device_password = device_password + self.job_details_type = 'DataBoxHeavy' + + +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. + + :ivar dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :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] + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.cabinet_pod_secrets = None + self.job_secrets_type = 'DataBoxHeavy' + + +class DataBoxHeavySecret(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.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] + """ + + _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) -> None: + 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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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_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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'key_encryption_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__(self, *, contact_details, shipping_address=None, data_import_details=None, data_export_details=None, preferences=None, expected_data_size_in_tera_bytes: int=None, device_password: str=None, **kwargs) -> None: + 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.copy_progress = None + self.device_password = device_password + self.job_details_type = 'DataBox' + + +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 dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__(self, *, pod_secrets=None, **kwargs) -> None: + super(DataboxJobSecrets, self).__init__(**kwargs) + self.pod_secrets = pod_secrets + self.job_secrets_type = 'DataBox' + + +class ScheduleAvailabilityRequest(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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + _subtype_map = { + 'sku_name': {'DataBox': 'DataBoxScheduleAvailabilityRequest', 'DataBoxDisk': 'DiskScheduleAvailabilityRequest', 'DataBoxHeavy': 'HeavyScheduleAvailabilityRequest'} + } + + def __init__(self, *, storage_location: str, country: str=None, **kwargs) -> None: + super(ScheduleAvailabilityRequest, self).__init__(**kwargs) + self.storage_location = storage_location + self.country = country + self.sku_name = 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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__(self, *, storage_location: str, country: str=None, **kwargs) -> None: + super(DataBoxScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBox' + + +class DataBoxSecret(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.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] + """ + + _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) -> None: + 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(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.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.models.LogCollectionLevel + :param account_details: Required. Account details of the data to be + transferred + :type account_details: ~azure.mgmt.databox.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': 'LogCollectionLevel'}, + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__(self, *, transfer_configuration, account_details, log_collection_level="Error", **kwargs) -> None: + super(DataExportDetails, self).__init__(**kwargs) + self.transfer_configuration = transfer_configuration + self.log_collection_level = log_collection_level + self.account_details = account_details + + +class DataImportDetails(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.models.DataAccountDetails + """ + + _validation = { + 'account_details': {'required': True}, + } + + _attribute_map = { + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__(self, *, account_details, **kwargs) -> None: + super(DataImportDetails, self).__init__(**kwargs) + self.account_details = account_details + + +class DataLocationToServiceLocationMap(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) -> None: + 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. Constant filled by server. + :type validation_type: str + :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] + :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] + :param device_type: Required. Device type. Possible values include: + 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :type device_type: str or ~azure.mgmt.databox.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 + """ + + _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': 'SkuName'}, + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + } + + def __init__(self, *, device_type, transfer_type, data_export_details=None, data_import_details=None, **kwargs) -> None: + super(DataTransferDetailsValidationRequest, self).__init__(**kwargs) + self.data_export_details = data_export_details + self.data_import_details = data_import_details + self.device_type = device_type + self.transfer_type = transfer_type + self.validation_type = 'ValidateDataTransferDetails' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Data transfer details validation status. Possible values + include: 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(DataTransferDetailsValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateDataTransferDetails' + + +class DcAccessSecurityCode(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: str=None, forward_dc_access_code: str=None, **kwargs) -> None: + 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(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) -> None: + 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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: 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'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', '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: str=None, **kwargs) -> None: + super(DiskScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes + self.sku_name = 'DataBoxDisk' + + +class DiskSecret(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) -> None: + super(DiskSecret, self).__init__(**kwargs) + self.disk_serial_number = None + self.bit_locker_key = None + + +class ErrorDetail(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.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=None, target: str=None, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + self.target = target + + +class FilterFileDetails(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.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': 'FilterFileType'}, + 'filter_file_path': {'key': 'filterFilePath', 'type': 'str'}, + } + + def __init__(self, *, filter_file_type, filter_file_path: str, **kwargs) -> None: + 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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__(self, *, storage_location: str, country: str=None, **kwargs) -> None: + super(HeavyScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBoxHeavy' + + +class JobDeliveryInfo(Model): + """Additional delivery info. + + :param scheduled_date_time: Scheduled date time. + :type scheduled_date_time: datetime + """ + + _attribute_map = { + 'scheduled_date_time': {'key': 'scheduledDateTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, scheduled_date_time=None, **kwargs) -> None: + super(JobDeliveryInfo, self).__init__(**kwargs) + self.scheduled_date_time = scheduled_date_time + + +class Resource(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: 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.models.Sku + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databox.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, tags=None, identity=None, **kwargs) -> None: + 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: 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.models.Sku + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :param transfer_type: Required. Type of the data transfer. Possible values + include: 'ImportToAzure', 'ExportFromAzure' + :type transfer_type: str or ~azure.mgmt.databox.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.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 + format. + :vartype start_time: datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.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 + :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.models.JobDeliveryType + :param delivery_info: Delivery Info of Job. + :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo + :ivar is_cancellable_without_fee: Flag to indicate cancellation of + scheduled job. + :vartype is_cancellable_without_fee: bool + :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 = { + 'location': {'required': True}, + 'sku': {'required': 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}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'transfer_type': {'key': 'properties.transferType', 'type': 'TransferType'}, + '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': 'StageName'}, + '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': 'JobDeliveryType'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, + 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, location: str, sku, transfer_type, tags=None, identity=None, details=None, delivery_type="NonScheduled", delivery_info=None, **kwargs) -> None: + super(JobResource, self).__init__(location=location, tags=tags, sku=sku, identity=identity, **kwargs) + 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 + self.name = None + self.id = None + self.type = None + + +class JobResourceUpdateParameter(Model): + """The JobResourceUpdateParameter. + + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :param 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.models.ResourceIdentity + """ + + _attribute_map = { + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + } + + def __init__(self, *, details=None, tags=None, identity=None, **kwargs) -> None: + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.details = details + self.tags = tags + self.identity = identity + + +class JobStages(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.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 + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: datetime + :ivar job_stage_details: Job Stage Details + :vartype job_stage_details: object + """ + + _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': 'StageName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'StageStatus'}, + 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, + 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, + } + + def __init__(self, **kwargs) -> None: + 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(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.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 KekType. + :type kek_vault_resource_id: str + """ + + _validation = { + 'kek_type': {'required': True}, + } + + _attribute_map = { + 'kek_type': {'key': 'kekType', 'type': 'KekType'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'kek_vault_resource_id': {'key': 'kekVaultResourceID', 'type': 'str'}, + } + + def __init__(self, *, kek_type="MicrosoftManaged", kek_url: str=None, kek_vault_resource_id: str=None, **kwargs) -> None: + super(KeyEncryptionKey, self).__init__(**kwargs) + self.kek_type = kek_type + self.kek_url = kek_url + self.kek_vault_resource_id = kek_vault_resource_id + + +class ManagedDiskDetails(DataAccountDetails): + """Details of the managed disks. + + All required parameters must be populated in order to send to Azure. + + :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 data_account_type: Required. Constant filled by server. + :type data_account_type: 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 = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', '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: str=None, **kwargs) -> None: + super(ManagedDiskDetails, self).__init__(share_password=share_password, **kwargs) + self.resource_group_id = resource_group_id + self.staging_storage_account_id = staging_storage_account_id + self.data_account_type = 'ManagedDisk' + + +class NotificationPreference(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.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + Default value: True . + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'NotificationStageName'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__(self, *, stage_name, send_notification: bool=True, **kwargs) -> None: + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = stage_name + self.send_notification = send_notification + + +class Operation(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.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: object + :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: bool=None, **kwargs) -> None: + 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(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PackageShippingDetails(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) -> None: + super(PackageShippingDetails, self).__init__(**kwargs) + self.carrier_name = None + self.tracking_id = None + self.tracking_url = None + + +class Preferences(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.models.TransportPreferences + """ + + _attribute_map = { + 'preferred_data_center_region': {'key': 'preferredDataCenterRegion', 'type': '[str]'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__(self, *, preferred_data_center_region=None, transport_preferences=None, **kwargs) -> None: + super(Preferences, self).__init__(**kwargs) + self.preferred_data_center_region = preferred_data_center_region + self.transport_preferences = transport_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. Constant filled by server. + :type validation_type: str + :param preference: Preference of transport and data center. + :type preference: ~azure.mgmt.databox.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 + """ + + _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': 'SkuName'}, + } + + def __init__(self, *, device_type, preference=None, **kwargs) -> None: + super(PreferencesValidationRequest, self).__init__(**kwargs) + self.preference = preference + self.device_type = device_type + self.validation_type = 'ValidatePreferences' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidatePreferences' + + +class RegionConfigurationRequest(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.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 + """ + + _attribute_map = { + 'schedule_availability_request': {'key': 'scheduleAvailabilityRequest', 'type': 'ScheduleAvailabilityRequest'}, + 'transport_availability_request': {'key': 'transportAvailabilityRequest', 'type': 'TransportAvailabilityRequest'}, + } + + def __init__(self, *, schedule_availability_request=None, transport_availability_request=None, **kwargs) -> None: + super(RegionConfigurationRequest, self).__init__(**kwargs) + self.schedule_availability_request = schedule_availability_request + self.transport_availability_request = transport_availability_request + + +class RegionConfigurationResponse(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.models.ScheduleAvailabilityResponse + :ivar transport_availability_response: Transport options available for + given sku in a region. + :vartype transport_availability_response: + ~azure.mgmt.databox.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) -> None: + super(RegionConfigurationResponse, self).__init__(**kwargs) + self.schedule_availability_response = None + self.transport_availability_response = None + + +class ResourceIdentity(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 + """ + + _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'}, + } + + def __init__(self, *, type: str=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = None + self.tenant_id = None + + +class ScheduleAvailabilityResponse(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] + """ + + _validation = { + 'available_dates': {'readonly': True}, + } + + _attribute_map = { + 'available_dates': {'key': 'availableDates', 'type': '[iso-8601]'}, + } + + def __init__(self, **kwargs) -> None: + super(ScheduleAvailabilityResponse, self).__init__(**kwargs) + self.available_dates = None + + +class ShareCredentialDetails(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.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] + """ + + _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': 'ShareDestinationFormatType'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[AccessProtocol]'}, + } + + def __init__(self, **kwargs) -> None: + 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(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 + :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 + :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, end_time, shipment_location: str, **kwargs) -> None: + super(ShipmentPickUpRequest, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.shipment_location = shipment_location + + +class ShipmentPickUpResponse(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 + """ + + _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) -> None: + super(ShipmentPickUpResponse, self).__init__(**kwargs) + self.confirmation_number = None + self.ready_by_time = None + + +class ShippingAddress(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: Required. 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.models.AddressType + """ + + _validation = { + 'street_address1': {'required': True}, + 'country': {'required': True}, + 'postal_code': {'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': 'AddressType'}, + } + + def __init__(self, *, street_address1: str, country: str, postal_code: str, street_address2: str=None, street_address3: str=None, city: str=None, state_or_province: str=None, zip_extended_code: str=None, company_name: str=None, address_type="None", **kwargs) -> None: + 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(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.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': 'SkuName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__(self, *, name, display_name: str=None, family: str=None, **kwargs) -> None: + 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. Constant filled by server. + :type validation_type: str + :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 + :param transfer_type: Required. Type of the transfer. Possible values + include: 'ImportToAzure', 'ExportFromAzure' + :type transfer_type: str or ~azure.mgmt.databox.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': 'SkuName'}, + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, device_type, transfer_type, country: str, location: str, **kwargs) -> None: + super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.device_type = device_type + self.transfer_type = transfer_type + self.country = country + self.location = location + self.validation_type = 'ValidateSkuAvailability' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Sku availability validation status. Possible values include: + 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateSkuAvailability' + + +class SkuCapacity(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) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.usable = None + self.maximum = None + + +class SkuCost(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) -> None: + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.meter_type = None + self.multiplier = None + + +class SkuInformation(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.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] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.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 + :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': 'SkuDisabledReason'}, + 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, + 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + 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 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 data_account_type: Required. Constant filled by server. + :type data_account_type: 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 = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, *, storage_account_id: str, share_password: str=None, **kwargs) -> None: + super(StorageAccountDetails, self).__init__(share_password=share_password, **kwargs) + self.storage_account_id = storage_account_id + self.data_account_type = 'StorageAccount' + + +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. Constant filled by server. + :type validation_type: str + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionIsAllowedToCreateJobValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' + + +class TransferAllDetails(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'. Default value: + "StorageAccount" . + :type data_account_type: str or ~azure.mgmt.databox.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': 'DataAccountType'}, + 'transfer_all_blobs': {'key': 'transferAllBlobs', 'type': 'bool'}, + 'transfer_all_files': {'key': 'transferAllFiles', 'type': 'bool'}, + } + + def __init__(self, *, data_account_type="StorageAccount", transfer_all_blobs: bool=None, transfer_all_files: bool=None, **kwargs) -> None: + 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(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.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 + :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 + """ + + _validation = { + 'transfer_configuration_type': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration_type': {'key': 'transferConfigurationType', 'type': 'TransferConfigurationType'}, + 'transfer_filter_details': {'key': 'transferFilterDetails', 'type': 'TransferConfigurationTransferFilterDetails'}, + 'transfer_all_details': {'key': 'transferAllDetails', 'type': 'TransferConfigurationTransferAllDetails'}, + } + + def __init__(self, *, transfer_configuration_type, transfer_filter_details=None, transfer_all_details=None, **kwargs) -> None: + 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(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 + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferAllDetails'}, + } + + def __init__(self, *, include=None, **kwargs) -> None: + super(TransferConfigurationTransferAllDetails, self).__init__(**kwargs) + self.include = include + + +class TransferConfigurationTransferFilterDetails(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 + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferFilterDetails'}, + } + + def __init__(self, *, include=None, **kwargs) -> None: + super(TransferConfigurationTransferFilterDetails, self).__init__(**kwargs) + self.include = include + + +class TransferFilterDetails(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'. Default value: + "StorageAccount" . + :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :param blob_filter_details: Filter details to transfer blobs. + :type blob_filter_details: ~azure.mgmt.databox.models.BlobFilterDetails + :param azure_file_filter_details: Filter details to transfer Azure files. + :type azure_file_filter_details: + ~azure.mgmt.databox.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] + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'DataAccountType'}, + '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="StorageAccount", blob_filter_details=None, azure_file_filter_details=None, filter_file_details=None, **kwargs) -> None: + 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(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.models.TransportShipmentTypes + """ + + _validation = { + 'shipment_type': {'readonly': True}, + } + + _attribute_map = { + 'shipment_type': {'key': 'shipmentType', 'type': 'TransportShipmentTypes'}, + } + + def __init__(self, **kwargs) -> None: + super(TransportAvailabilityDetails, self).__init__(**kwargs) + self.shipment_type = None + + +class TransportAvailabilityRequest(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.models.SkuName + """ + + _attribute_map = { + 'sku_name': {'key': 'skuName', 'type': 'SkuName'}, + } + + def __init__(self, *, sku_name=None, **kwargs) -> None: + super(TransportAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = sku_name + + +class TransportAvailabilityResponse(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.models.TransportAvailabilityDetails] + """ + + _validation = { + 'transport_availability_details': {'readonly': True}, + } + + _attribute_map = { + 'transport_availability_details': {'key': 'transportAvailabilityDetails', 'type': '[TransportAvailabilityDetails]'}, + } + + def __init__(self, **kwargs) -> None: + super(TransportAvailabilityResponse, self).__init__(**kwargs) + self.transport_availability_details = None + + +class TransportPreferences(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.models.TransportShipmentTypes + """ + + _validation = { + 'preferred_shipment_type': {'required': True}, + } + + _attribute_map = { + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'TransportShipmentTypes'}, + } + + def __init__(self, *, preferred_shipment_type, **kwargs) -> None: + super(TransportPreferences, self).__init__(**kwargs) + self.preferred_shipment_type = preferred_shipment_type + + +class UnencryptedCredentials(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.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) -> None: + super(UnencryptedCredentials, self).__init__(**kwargs) + self.job_name = None + self.job_secrets = None + + +class UpdateJobDetails(Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :param key_encryption_key: Key encryption key for the job. + :type key_encryption_key: ~azure.mgmt.databox.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=None, shipping_address=None, key_encryption_key=None, **kwargs) -> None: + super(UpdateJobDetails, self).__init__(**kwargs) + self.contact_details = contact_details + self.shipping_address = shipping_address + self.key_encryption_key = key_encryption_key + + +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. Constant filled by server. + :type validation_type: str + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.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 + :param transport_preferences: Preferences related to the shipment + logistics of the sku. + :type transport_preferences: + ~azure.mgmt.databox.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': 'SkuName'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__(self, *, shipping_address, device_type, transport_preferences=None, **kwargs) -> None: + super(ValidateAddress, self).__init__(**kwargs) + self.shipping_address = shipping_address + self.device_type = device_type + self.transport_preferences = transport_preferences + self.validation_type = 'ValidateAddress' + + +class ValidationResponse(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.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] + """ + + _validation = { + 'status': {'readonly': True}, + 'individual_response_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'OverallValidationStatus'}, + 'individual_response_details': {'key': 'properties.individualResponseDetails', 'type': '[ValidationInputResponse]'}, + } + + def __init__(self, **kwargs) -> None: + super(ValidationResponse, self).__init__(**kwargs) + self.status = None + self.individual_response_details = None diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_paged_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_paged_models.py new file mode 100644 index 000000000000..0396852889e1 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/models/_paged_models.py @@ -0,0 +1,66 @@ +# 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.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class JobResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`JobResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobResource]'} + } + + def __init__(self, *args, **kwargs): + + super(JobResourcePaged, self).__init__(*args, **kwargs) +class UnencryptedCredentialsPaged(Paged): + """ + A paging container for iterating over a list of :class:`UnencryptedCredentials ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UnencryptedCredentials]'} + } + + def __init__(self, *args, **kwargs): + + super(UnencryptedCredentialsPaged, self).__init__(*args, **kwargs) +class SkuInformationPaged(Paged): + """ + A paging container for iterating over a list of :class:`SkuInformation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SkuInformation]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuInformationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/__init__.py new file mode 100644 index 000000000000..034974abbcce --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/__init__.py @@ -0,0 +1,20 @@ +# 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 ._service_operations import ServiceOperations + +__all__ = [ + 'Operations', + 'JobsOperations', + 'ServiceOperations', +] 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 new file mode 100644 index 000000000000..8ee0ffeb0231 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_jobs_operations.py @@ -0,0 +1,748 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class JobsOperations(object): + """JobsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API Version. Constant value: "2020-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-04-01" + + self.config = config + + def list( + self, skip_token=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobResource + :rtype: + ~azure.mgmt.databox.models.JobResourcePaged[~azure.mgmt.databox.models.JobResource] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} + + def list_by_resource_group( + self, resource_group_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobResource + :rtype: + ~azure.mgmt.databox.models.JobResourcePaged[~azure.mgmt.databox.models.JobResource] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} + + def get( + self, resource_group_name, job_name, expand=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.JobResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + + def _create_initial( + self, resource_group_name, job_name, job_resource, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(job_resource, 'JobResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, job_name, job_resource, custom_headers=None, raw=False, polling=True, **operation_config): + """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.models.JobResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns JobResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databox.models.JobResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databox.models.JobResource]] + :raises: + :class:`ApiErrorException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + + def _delete_initial( + self, resource_group_name, job_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, job_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ApiErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + + def _update_initial( + self, resource_group_name, job_name, job_resource_update_parameter, if_match=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, job_name, job_resource_update_parameter, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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.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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns JobResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databox.models.JobResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databox.models.JobResource]] + :raises: + :class:`ApiErrorException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + def book_shipment_pick_up( + self, resource_group_name, job_name, shipment_pick_up_request, custom_headers=None, raw=False, **operation_config): + """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.models.ShipmentPickUpRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ShipmentPickUpResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShipmentPickUpResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} + + def cancel( + self, resource_group_name, job_name, reason, custom_headers=None, raw=False, **operation_config): + """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 reason: Reason for cancellation. + :type reason: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + cancellation_reason = models.CancellationReason(reason=reason) + + # Construct URL + url = self.cancel.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} + + def list_credentials( + self, resource_group_name, job_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of UnencryptedCredentials + :rtype: + ~azure.mgmt.databox.models.UnencryptedCredentialsPaged[~azure.mgmt.databox.models.UnencryptedCredentials] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UnencryptedCredentialsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} 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 new file mode 100644 index 000000000000..0c6a0e64ec4d --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_operations.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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API Version. Constant value: "2020-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-04-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """This method gets all the operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.databox.models.OperationPaged[~azure.mgmt.databox.models.Operation] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} 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 new file mode 100644 index 000000000000..160c3236b0dc --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/operations/_service_operations.py @@ -0,0 +1,461 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ServiceOperations(object): + """ServiceOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API Version. Constant value: "2020-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-04-01" + + self.config = config + + def list_available_skus_by_resource_group( + self, resource_group_name, location, available_sku_request, custom_headers=None, raw=False, **operation_config): + """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.models.AvailableSkuRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInformation + :rtype: + ~azure.mgmt.databox.models.SkuInformationPaged[~azure.mgmt.databox.models.SkuInformation] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_skus_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInformationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} + + def validate_address_method( + self, location, validate_address, custom_headers=None, raw=False, **operation_config): + """[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.models.ValidateAddress + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AddressValidationOutput or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.AddressValidationOutput or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.validate_address_method.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_address, 'ValidateAddress') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressValidationOutput', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate_address_method.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} + + def validate_inputs_by_resource_group( + self, resource_group_name, location, validation_request, custom_headers=None, raw=False, **operation_config): + """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.models.ValidationRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidationResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.ValidationResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.validate_inputs_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validation_request, 'ValidationRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} + + def validate_inputs( + self, location, validation_request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidationResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.ValidationResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.validate_inputs.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validation_request, 'ValidationRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} + + def region_configuration( + self, location, schedule_availability_request=None, transport_availability_request=None, custom_headers=None, raw=False, **operation_config): + """This API provides configuration details specific to given + region/location at Subscription level. + + :param location: The location of the resource + :type location: str + :param schedule_availability_request: Request body to get the + availability for scheduling orders. + :type schedule_availability_request: + ~azure.mgmt.databox.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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegionConfigurationResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + region_configuration_request = models.RegionConfigurationRequest(schedule_availability_request=schedule_availability_request, transport_availability_request=transport_availability_request) + + # Construct URL + url = self.region_configuration.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegionConfigurationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} + + def region_configuration_by_resource_group( + self, resource_group_name, location, schedule_availability_request=None, transport_availability_request=None, custom_headers=None, raw=False, **operation_config): + """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 schedule_availability_request: Request body to get the + availability for scheduling orders. + :type schedule_availability_request: + ~azure.mgmt.databox.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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegionConfigurationResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + region_configuration_request = models.RegionConfigurationRequest(schedule_availability_request=schedule_availability_request, transport_availability_request=transport_availability_request) + + # Construct URL + url = self.region_configuration_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegionConfigurationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + region_configuration_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} 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 new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_04_01/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/__init__.py new file mode 100644 index 000000000000..1c85885ae27c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_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 ._configuration import DataBoxManagementClientConfiguration +from ._data_box_management_client import DataBoxManagementClient +__all__ = ['DataBoxManagementClient', 'DataBoxManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_configuration.py new file mode 100644 index 000000000000..adf67e024e24 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_configuration.py @@ -0,0 +1,48 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class DataBoxManagementClientConfiguration(AzureConfiguration): + """Configuration for DataBoxManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Subscription Id + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DataBoxManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-databox/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id 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 new file mode 100644 index 000000000000..2a763f48fc4c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/_data_box_management_client.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.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import DataBoxManagementClientConfiguration +from .operations import Operations +from .operations import JobsOperations +from .operations import ServiceOperations +from . import models + + +class DataBoxManagementClient(SDKClient): + """DataBoxManagementClient + + :ivar config: Configuration for client. + :vartype config: DataBoxManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databox.operations.Operations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.databox.operations.JobsOperations + :ivar service: Service operations + :vartype service: azure.mgmt.databox.operations.ServiceOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Subscription Id + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DataBoxManagementClientConfiguration(credentials, subscription_id, base_url) + super(DataBoxManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2020-11-01' + self._serialize = Serializer(client_models) + 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) 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 new file mode 100644 index 000000000000..8aac5b988fc1 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/__init__.py @@ -0,0 +1,359 @@ +# 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 ApiError, ApiErrorException + from ._models_py3 import ApplianceNetworkConfiguration + from ._models_py3 import ArmBaseObject + from ._models_py3 import AvailableSkuRequest + from ._models_py3 import AzureFileFilterDetails + from ._models_py3 import BlobFilterDetails + from ._models_py3 import CancellationReason + 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 DataboxJobSecrets + 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 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 JobResourceUpdateParameter + from ._models_py3 import JobSecrets + from ._models_py3 import JobStages + from ._models_py3 import KeyEncryptionKey + from ._models_py3 import ManagedDiskDetails + from ._models_py3 import NotificationPreference + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + 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 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 + from ._models import AdditionalErrorInfo + from ._models import AddressValidationOutput + from ._models import ApiError, ApiErrorException + from ._models import ApplianceNetworkConfiguration + from ._models import ArmBaseObject + from ._models import AvailableSkuRequest + from ._models import AzureFileFilterDetails + from ._models import BlobFilterDetails + from ._models import CancellationReason + from ._models import ContactDetails + from ._models import CopyLogDetails + from ._models import CopyProgress + from ._models import CreateJobValidations + from ._models import CreateOrderLimitForSubscriptionValidationRequest + from ._models import CreateOrderLimitForSubscriptionValidationResponseProperties + from ._models import DataAccountDetails + from ._models import DataBoxAccountCopyLogDetails + from ._models import DataBoxDiskCopyLogDetails + from ._models import DataBoxDiskCopyProgress + from ._models import DataBoxDiskJobDetails + from ._models import DataBoxDiskJobSecrets + from ._models import DataBoxHeavyAccountCopyLogDetails + from ._models import DataBoxHeavyJobDetails + from ._models import DataBoxHeavyJobSecrets + from ._models import DataBoxHeavySecret + from ._models import DataBoxJobDetails + from ._models import DataboxJobSecrets + from ._models import DataBoxScheduleAvailabilityRequest + from ._models import DataBoxSecret + from ._models import DataExportDetails + from ._models import DataImportDetails + from ._models import DataLocationToServiceLocationMap + from ._models import DataTransferDetailsValidationRequest + from ._models import DataTransferDetailsValidationResponseProperties + from ._models import DcAccessSecurityCode + from ._models import Details + from ._models import DiskScheduleAvailabilityRequest + from ._models import DiskSecret + from ._models import EncryptionPreferences + from ._models import ErrorDetail + from ._models import FilterFileDetails + from ._models import HeavyScheduleAvailabilityRequest + from ._models import IdentityProperties + from ._models import JobDeliveryInfo + from ._models import JobDetails + from ._models import JobResource + from ._models import JobResourceUpdateParameter + from ._models import JobSecrets + from ._models import JobStages + from ._models import KeyEncryptionKey + from ._models import ManagedDiskDetails + from ._models import NotificationPreference + from ._models import Operation + from ._models import OperationDisplay + from ._models import PackageShippingDetails + from ._models import Preferences + from ._models import PreferencesValidationRequest + from ._models import PreferencesValidationResponseProperties + from ._models import RegionConfigurationRequest + from ._models import RegionConfigurationResponse + from ._models import Resource + from ._models import ResourceIdentity + from ._models import ScheduleAvailabilityRequest + from ._models import ScheduleAvailabilityResponse + from ._models import ShareCredentialDetails + from ._models import ShipmentPickUpRequest + from ._models import ShipmentPickUpResponse + from ._models import ShippingAddress + from ._models import Sku + from ._models import SkuAvailabilityValidationRequest + from ._models import SkuAvailabilityValidationResponseProperties + from ._models import SkuCapacity + from ._models import SkuCost + from ._models import SkuInformation + from ._models import StorageAccountDetails + from ._models import SubscriptionIsAllowedToCreateJobValidationRequest + from ._models import SubscriptionIsAllowedToCreateJobValidationResponseProperties + from ._models import SystemData + from ._models import TransferAllDetails + from ._models import TransferConfiguration + from ._models import TransferConfigurationTransferAllDetails + from ._models import TransferConfigurationTransferFilterDetails + from ._models import TransferFilterDetails + from ._models import TransportAvailabilityDetails + from ._models import TransportAvailabilityRequest + from ._models import TransportAvailabilityResponse + from ._models import TransportPreferences + from ._models import UnencryptedCredentials + from ._models import UpdateJobDetails + from ._models import UserAssignedIdentity + from ._models import UserAssignedProperties + from ._models import ValidateAddress + from ._models import ValidationInputRequest + from ._models import ValidationInputResponse + from ._models import ValidationRequest + from ._models import ValidationResponse +from ._paged_models import JobResourcePaged +from ._paged_models import OperationPaged +from ._paged_models import SkuInformationPaged +from ._paged_models import UnencryptedCredentialsPaged +from ._data_box_management_client_enums import ( + DataAccountType, + ShareDestinationFormatType, + AccessProtocol, + AddressValidationStatus, + AddressType, + TransferType, + SkuName, + SkuDisabledReason, + NotificationStageName, + ValidationStatus, + CopyStatus, + TransferConfigurationType, + FilterFileType, + LogCollectionLevel, + DoubleEncryption, + StageName, + StageStatus, + TransportShipmentTypes, + KekType, + JobDeliveryType, + OverallValidationStatus, +) + +__all__ = [ + 'AccountCredentialDetails', + 'AdditionalErrorInfo', + 'AddressValidationOutput', + 'ApiError', 'ApiErrorException', + 'ApplianceNetworkConfiguration', + 'ArmBaseObject', + 'AvailableSkuRequest', + 'AzureFileFilterDetails', + 'BlobFilterDetails', + 'CancellationReason', + 'ContactDetails', + 'CopyLogDetails', + 'CopyProgress', + 'CreateJobValidations', + 'CreateOrderLimitForSubscriptionValidationRequest', + 'CreateOrderLimitForSubscriptionValidationResponseProperties', + 'DataAccountDetails', + 'DataBoxAccountCopyLogDetails', + 'DataBoxDiskCopyLogDetails', + 'DataBoxDiskCopyProgress', + 'DataBoxDiskJobDetails', + 'DataBoxDiskJobSecrets', + 'DataBoxHeavyAccountCopyLogDetails', + 'DataBoxHeavyJobDetails', + 'DataBoxHeavyJobSecrets', + 'DataBoxHeavySecret', + 'DataBoxJobDetails', + 'DataboxJobSecrets', + 'DataBoxScheduleAvailabilityRequest', + 'DataBoxSecret', + 'DataExportDetails', + 'DataImportDetails', + 'DataLocationToServiceLocationMap', + 'DataTransferDetailsValidationRequest', + 'DataTransferDetailsValidationResponseProperties', + 'DcAccessSecurityCode', + 'Details', + 'DiskScheduleAvailabilityRequest', + 'DiskSecret', + 'EncryptionPreferences', + 'ErrorDetail', + 'FilterFileDetails', + 'HeavyScheduleAvailabilityRequest', + 'IdentityProperties', + 'JobDeliveryInfo', + 'JobDetails', + 'JobResource', + 'JobResourceUpdateParameter', + 'JobSecrets', + 'JobStages', + 'KeyEncryptionKey', + 'ManagedDiskDetails', + 'NotificationPreference', + 'Operation', + 'OperationDisplay', + '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', + 'UpdateJobDetails', + 'UserAssignedIdentity', + 'UserAssignedProperties', + 'ValidateAddress', + 'ValidationInputRequest', + 'ValidationInputResponse', + 'ValidationRequest', + 'ValidationResponse', + 'OperationPaged', + 'JobResourcePaged', + 'UnencryptedCredentialsPaged', + 'SkuInformationPaged', + 'DataAccountType', + 'ShareDestinationFormatType', + 'AccessProtocol', + 'AddressValidationStatus', + 'AddressType', + 'TransferType', + 'SkuName', + 'SkuDisabledReason', + 'NotificationStageName', + 'ValidationStatus', + 'CopyStatus', + 'TransferConfigurationType', + 'FilterFileType', + 'LogCollectionLevel', + 'DoubleEncryption', + 'StageName', + 'StageStatus', + 'TransportShipmentTypes', + 'KekType', + 'JobDeliveryType', + 'OverallValidationStatus', +] 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 new file mode 100644 index 000000000000..048523019298 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_data_box_management_client_enums.py @@ -0,0 +1,185 @@ +# 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 + + +class DataAccountType(str, Enum): + + storage_account = "StorageAccount" #: Storage Accounts . + managed_disk = "ManagedDisk" #: Azure Managed disk storage. + + +class ShareDestinationFormatType(str, Enum): + + 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. + + +class AccessProtocol(str, Enum): + + smb = "SMB" #: Server Message Block protocol(SMB). + nfs = "NFS" #: Network File System protocol(NFS). + + +class AddressValidationStatus(str, Enum): + + 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. + + +class AddressType(str, Enum): + + none = "None" #: Address type not known. + residential = "Residential" #: Residential Address. + commercial = "Commercial" #: Commercial Address. + + +class TransferType(str, Enum): + + import_to_azure = "ImportToAzure" #: Import data to azure. + export_from_azure = "ExportFromAzure" #: Export data from azure. + + +class SkuName(str, Enum): + + data_box = "DataBox" #: Data Box. + data_box_disk = "DataBoxDisk" #: Data Box Disk. + data_box_heavy = "DataBoxHeavy" #: Data Box Heavy. + + +class SkuDisabledReason(str, Enum): + + 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. + + +class NotificationStageName(str, Enum): + + 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. + + +class ValidationStatus(str, Enum): + + valid = "Valid" #: Validation is successful + invalid = "Invalid" #: Validation is not successful + skipped = "Skipped" #: Validation is skipped + + +class CopyStatus(str, Enum): + + 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. + + +class TransferConfigurationType(str, Enum): + + transfer_all = "TransferAll" #: Transfer all the data. + transfer_using_filter = "TransferUsingFilter" #: Transfer using filter. + + +class FilterFileType(str, Enum): + + azure_blob = "AzureBlob" #: Filter file is of the type AzureBlob. + azure_file = "AzureFile" #: Filter file is of the type AzureFiles. + + +class LogCollectionLevel(str, Enum): + + error = "Error" #: Only Errors will be collected in the logs. + verbose = "Verbose" #: Verbose logging (includes Errors, CRC, size information and others). + + +class DoubleEncryption(str, Enum): + + enabled = "Enabled" #: Software-based encryption is enabled. + disabled = "Disabled" #: Software-based encryption is disabled. + + +class StageName(str, Enum): + + 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. + + +class StageStatus(str, Enum): + + 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. + + +class TransportShipmentTypes(str, Enum): + + customer_managed = "CustomerManaged" #: Shipment Logistics is handled by the customer. + microsoft_managed = "MicrosoftManaged" #: Shipment Logistics is handled by Microsoft. + + +class KekType(str, Enum): + + microsoft_managed = "MicrosoftManaged" #: Key encryption key is managed by Microsoft. + customer_managed = "CustomerManaged" #: Key encryption key is managed by the Customer. + + +class JobDeliveryType(str, Enum): + + non_scheduled = "NonScheduled" #: Non Scheduled job. + scheduled = "Scheduled" #: Scheduled job. + + +class OverallValidationStatus(str, Enum): + + 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. 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 new file mode 100644 index 000000000000..a22356fcbc95 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models.py @@ -0,0 +1,3756 @@ +# 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.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccountCredentialDetails(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.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] + """ + + _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': 'DataAccountType'}, + '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(Model): + """Additional error info. + + :param type: Additional error type. + :type type: str + :param info: Additional error info. + :type info: object + """ + + _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(Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.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 + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: + list[~azure.mgmt.databox.models.ShippingAddress] + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'AddressValidationStatus'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__(self, **kwargs): + super(AddressValidationOutput, self).__init__(**kwargs) + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ApiError(Model): + """ApiError. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. + :type error: ~azure.mgmt.databox.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.get('error', None) + + +class ApiErrorException(HttpOperationError): + """Server responsed with exception of type: 'ApiError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) + + +class ApplianceNetworkConfiguration(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(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(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.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.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku_names': {'key': 'skuNames', 'type': '[SkuName]'}, + } + + def __init__(self, **kwargs): + super(AvailableSkuRequest, self).__init__(**kwargs) + self.transfer_type = kwargs.get('transfer_type', None) + self.country = kwargs.get('country', None) + self.location = kwargs.get('location', None) + self.sku_names = kwargs.get('sku_names', None) + + +class AzureFileFilterDetails(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(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(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.get('reason', None) + + +class CloudError(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.models.CloudError] + :ivar additional_info: Cloud error additional info. + :vartype additional_info: + list[~azure.mgmt.databox.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(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.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.get('contact_name', None) + self.phone = kwargs.get('phone', None) + self.phone_extension = kwargs.get('phone_extension', None) + self.mobile = kwargs.get('mobile', None) + self.email_list = kwargs.get('email_list', None) + self.notification_preference = kwargs.get('notification_preference', None) + + +class CopyLogDetails(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. Constant filled by server. + :type copy_log_details_type: str + """ + + _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 + + +class CopyProgress(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.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 + :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': 'TransferType'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'DataAccountType'}, + '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(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 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] + :param validation_category: Required. Constant filled by server. + :type validation_category: str + """ + + _validation = { + 'individual_request_details': {'required': True}, + 'validation_category': {'required': True}, + } + + _attribute_map = { + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + } + + _subtype_map = { + 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} + } + + def __init__(self, **kwargs): + super(ValidationRequest, self).__init__(**kwargs) + self.individual_request_details = kwargs.get('individual_request_details', None) + self.validation_category = None + + +class CreateJobValidations(ValidationRequest): + """It does all pre-job creation validations. + + All required parameters must be populated in order to send to Azure. + + :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] + :param validation_category: Required. Constant filled by server. + :type validation_category: str + """ + + _validation = { + 'individual_request_details': {'required': True}, + 'validation_category': {'required': True}, + } + + _attribute_map = { + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateJobValidations, self).__init__(**kwargs) + self.validation_category = 'JobCreationValidation' + + +class ValidationInputRequest(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: CreateOrderLimitForSubscriptionValidationRequest, + DataTransferDetailsValidationRequest, PreferencesValidationRequest, + SkuAvailabilityValidationRequest, + SubscriptionIsAllowedToCreateJobValidationRequest, ValidateAddress + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Constant filled by server. + :type validation_type: str + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest', 'ValidateAddress': 'ValidateAddress'} + } + + def __init__(self, **kwargs): + super(ValidationInputRequest, self).__init__(**kwargs) + self.validation_type = None + + +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. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + } + + def __init__(self, **kwargs): + super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.device_type = kwargs.get('device_type', None) + self.validation_type = 'ValidateCreateOrderLimit' + + +class ValidationInputResponse(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: + 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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__(self, **kwargs): + super(ValidationInputResponse, self).__init__(**kwargs) + self.error = None + self.validation_type = None + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Create order limit validation status. Possible values + include: 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs): + super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateCreateOrderLimit' + + +class DataAccountDetails(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 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 data_account_type: Required. Constant filled by server. + :type data_account_type: str + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + } + + _subtype_map = { + 'data_account_type': {'ManagedDisk': 'ManagedDiskDetails', 'StorageAccount': 'StorageAccountDetails'} + } + + def __init__(self, **kwargs): + super(DataAccountDetails, self).__init__(**kwargs) + self.share_password = kwargs.get('share_password', None) + self.data_account_type = 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. Constant filled by server. + :type copy_log_details_type: str + :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.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + self.copy_log_details_type = 'DataBox' + + +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. Constant filled by server. + :type copy_log_details_type: str + :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.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + self.copy_log_details_type = 'DataBoxDisk' + + +class DataBoxDiskCopyProgress(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.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': 'CopyStatus'}, + } + + 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(Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobDetails, DataBoxHeavyJobDetails, + DataBoxJobDetails + + 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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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.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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_details_type': {'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails', 'DataBox': 'DataBoxJobDetails'} + } + + def __init__(self, **kwargs): + super(JobDetails, self).__init__(**kwargs) + self.job_stages = None + self.contact_details = kwargs.get('contact_details', None) + 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.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.job_details_type = 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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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.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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :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] + :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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', '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.preferred_disks = kwargs.get('preferred_disks', None) + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = kwargs.get('passkey', None) + self.job_details_type = 'DataBoxDisk' + + +class JobSecrets(Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets, + DataboxJobSecrets + + 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 dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets', 'DataBox': 'DataboxJobSecrets'} + } + + def __init__(self, **kwargs): + super(JobSecrets, self).__init__(**kwargs) + self.dc_access_security_code = None + self.error = None + self.job_secrets_type = 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. + + :ivar dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.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 = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + '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.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + self.job_secrets_type = 'DataBoxDisk' + + +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. Constant filled by server. + :type copy_log_details_type: str + :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.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + self.copy_log_details_type = 'DataBoxHeavy' + + +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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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.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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataBoxHeavyJobDetails, self).__init__(**kwargs) + self.copy_progress = None + self.device_password = kwargs.get('device_password', None) + self.job_details_type = 'DataBoxHeavy' + + +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. + + :ivar dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :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] + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__(self, **kwargs): + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.cabinet_pod_secrets = None + self.job_secrets_type = 'DataBoxHeavy' + + +class DataBoxHeavySecret(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.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] + """ + + _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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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.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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataBoxJobDetails, self).__init__(**kwargs) + self.copy_progress = None + self.device_password = kwargs.get('device_password', None) + self.job_details_type = 'DataBox' + + +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 dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__(self, **kwargs): + super(DataboxJobSecrets, self).__init__(**kwargs) + self.pod_secrets = kwargs.get('pod_secrets', None) + self.job_secrets_type = 'DataBox' + + +class ScheduleAvailabilityRequest(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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', '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.get('storage_location', None) + self.country = kwargs.get('country', None) + self.sku_name = 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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataBoxScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBox' + + +class DataBoxSecret(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.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] + """ + + _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(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.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.models.LogCollectionLevel + :param account_details: Required. Account details of the data to be + transferred + :type account_details: ~azure.mgmt.databox.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': 'LogCollectionLevel'}, + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__(self, **kwargs): + super(DataExportDetails, self).__init__(**kwargs) + self.transfer_configuration = kwargs.get('transfer_configuration', None) + self.log_collection_level = kwargs.get('log_collection_level', "Error") + self.account_details = kwargs.get('account_details', None) + + +class DataImportDetails(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.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.get('account_details', None) + + +class DataLocationToServiceLocationMap(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. Constant filled by server. + :type validation_type: str + :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] + :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] + :param device_type: Required. Device type. Possible values include: + 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :type device_type: str or ~azure.mgmt.databox.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 + """ + + _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': 'SkuName'}, + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + } + + def __init__(self, **kwargs): + super(DataTransferDetailsValidationRequest, self).__init__(**kwargs) + self.data_export_details = kwargs.get('data_export_details', None) + self.data_import_details = kwargs.get('data_import_details', None) + self.device_type = kwargs.get('device_type', None) + self.transfer_type = kwargs.get('transfer_type', None) + self.validation_type = 'ValidateDataTransferDetails' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Data transfer details validation status. Possible values + include: 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs): + super(DataTransferDetailsValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateDataTransferDetails' + + +class DcAccessSecurityCode(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(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.get('code', None) + self.message = kwargs.get('message', None) + + +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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: 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'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'expected_data_size_in_tera_bytes': {'key': 'expectedDataSizeInTeraBytes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DiskScheduleAvailabilityRequest, self).__init__(**kwargs) + self.expected_data_size_in_tera_bytes = kwargs.get('expected_data_size_in_tera_bytes', None) + self.sku_name = 'DataBoxDisk' + + +class DiskSecret(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(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.models.DoubleEncryption + """ + + _attribute_map = { + 'double_encryption': {'key': 'doubleEncryption', 'type': 'DoubleEncryption'}, + } + + def __init__(self, **kwargs): + super(EncryptionPreferences, self).__init__(**kwargs) + self.double_encryption = kwargs.get('double_encryption', "Disabled") + + +class ErrorDetail(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.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.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + self.target = kwargs.get('target', None) + + +class FilterFileDetails(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.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': 'FilterFileType'}, + 'filter_file_path': {'key': 'filterFilePath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FilterFileDetails, self).__init__(**kwargs) + self.filter_file_type = kwargs.get('filter_file_type', None) + self.filter_file_path = kwargs.get('filter_file_path', None) + + +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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HeavyScheduleAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = 'DataBoxHeavy' + + +class IdentityProperties(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.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(Model): + """Additional delivery info. + + :param scheduled_date_time: Scheduled date time. + :type scheduled_date_time: 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(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: 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.models.Sku + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databox.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.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + 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: 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.models.Sku + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :param transfer_type: Required. Type of the data transfer. Possible values + include: 'ImportToAzure', 'ExportFromAzure' + :type transfer_type: str or ~azure.mgmt.databox.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.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 + format. + :vartype start_time: datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.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 + :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.models.JobDeliveryType + :param delivery_info: Delivery Info of Job. + :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo + :ivar is_cancellable_without_fee: Flag to indicate cancellation of + scheduled job. + :vartype is_cancellable_without_fee: bool + :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.models.SystemData + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': 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}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'transfer_type': {'key': 'properties.transferType', 'type': 'TransferType'}, + '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': 'StageName'}, + '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': 'JobDeliveryType'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, + 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(JobResource, self).__init__(**kwargs) + self.transfer_type = kwargs.get('transfer_type', None) + 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 + self.name = None + self.id = None + self.type = None + self.system_data = None + + +class JobResourceUpdateParameter(Model): + """The JobResourceUpdateParameter. + + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :param 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.models.ResourceIdentity + """ + + _attribute_map = { + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + } + + def __init__(self, **kwargs): + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.details = kwargs.get('details', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + + +class JobStages(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.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 + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: datetime + :ivar job_stage_details: Job Stage Details + :vartype job_stage_details: object + """ + + _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': 'StageName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'StageStatus'}, + '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(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.models.KekType + :param identity_properties: Managed identity properties used for key + encryption. + :type identity_properties: ~azure.mgmt.databox.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': 'KekType'}, + '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 ManagedDiskDetails(DataAccountDetails): + """Details of the managed disks. + + All required parameters must be populated in order to send to Azure. + + :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 data_account_type: Required. Constant filled by server. + :type data_account_type: 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 = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', '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.resource_group_id = kwargs.get('resource_group_id', None) + self.staging_storage_account_id = kwargs.get('staging_storage_account_id', None) + self.data_account_type = 'ManagedDisk' + + +class NotificationPreference(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.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + Default value: True . + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'NotificationStageName'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = kwargs.get('stage_name', None) + self.send_notification = kwargs.get('send_notification', True) + + +class Operation(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.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: object + :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(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 PackageShippingDetails(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(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.models.TransportPreferences + :param encryption_preferences: Preferences related to the Encryption. + :type encryption_preferences: + ~azure.mgmt.databox.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. Constant filled by server. + :type validation_type: str + :param preference: Preference of transport and data center. + :type preference: ~azure.mgmt.databox.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 + """ + + _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': 'SkuName'}, + } + + def __init__(self, **kwargs): + super(PreferencesValidationRequest, self).__init__(**kwargs) + self.preference = kwargs.get('preference', None) + self.device_type = kwargs.get('device_type', None) + self.validation_type = 'ValidatePreferences' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs): + super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidatePreferences' + + +class RegionConfigurationRequest(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.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 + """ + + _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(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.models.ScheduleAvailabilityResponse + :ivar transport_availability_response: Transport options available for + given sku in a region. + :vartype transport_availability_response: + ~azure.mgmt.databox.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(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. Default value: "None" . + :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.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(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] + """ + + _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(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.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] + """ + + _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': 'ShareDestinationFormatType'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[AccessProtocol]'}, + } + + 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(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 + :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 + :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.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.shipment_location = kwargs.get('shipment_location', None) + + +class ShipmentPickUpResponse(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 + """ + + _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(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.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': 'AddressType'}, + } + + def __init__(self, **kwargs): + super(ShippingAddress, self).__init__(**kwargs) + self.street_address1 = kwargs.get('street_address1', None) + 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.get('country', None) + 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(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.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': 'SkuName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + 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. Constant filled by server. + :type validation_type: str + :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 + :param transfer_type: Required. Type of the transfer. Possible values + include: 'ImportToAzure', 'ExportFromAzure' + :type transfer_type: str or ~azure.mgmt.databox.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': 'SkuName'}, + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.device_type = kwargs.get('device_type', None) + self.transfer_type = kwargs.get('transfer_type', None) + self.country = kwargs.get('country', None) + self.location = kwargs.get('location', None) + self.validation_type = 'ValidateSkuAvailability' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Sku availability validation status. Possible values include: + 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs): + super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateSkuAvailability' + + +class SkuCapacity(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(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(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.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] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.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 + :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': 'SkuDisabledReason'}, + '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 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 data_account_type: Required. Constant filled by server. + :type data_account_type: 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 = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccountDetails, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.data_account_type = 'StorageAccount' + + +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. Constant filled by server. + :type validation_type: str + """ + + _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' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs): + super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' + + +class SystemData(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 + :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 + """ + + _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(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'. Default value: + "StorageAccount" . + :type data_account_type: str or ~azure.mgmt.databox.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': 'DataAccountType'}, + '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.get('data_account_type', "StorageAccount") + self.transfer_all_blobs = kwargs.get('transfer_all_blobs', None) + self.transfer_all_files = kwargs.get('transfer_all_files', None) + + +class TransferConfiguration(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.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 + :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 + """ + + _validation = { + 'transfer_configuration_type': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration_type': {'key': 'transferConfigurationType', 'type': 'TransferConfigurationType'}, + '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.get('transfer_configuration_type', None) + self.transfer_filter_details = kwargs.get('transfer_filter_details', None) + self.transfer_all_details = kwargs.get('transfer_all_details', None) + + +class TransferConfigurationTransferAllDetails(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 + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferAllDetails'}, + } + + def __init__(self, **kwargs): + super(TransferConfigurationTransferAllDetails, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + + +class TransferConfigurationTransferFilterDetails(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 + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferFilterDetails'}, + } + + def __init__(self, **kwargs): + super(TransferConfigurationTransferFilterDetails, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + + +class TransferFilterDetails(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'. Default value: + "StorageAccount" . + :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :param blob_filter_details: Filter details to transfer blobs. + :type blob_filter_details: ~azure.mgmt.databox.models.BlobFilterDetails + :param azure_file_filter_details: Filter details to transfer Azure files. + :type azure_file_filter_details: + ~azure.mgmt.databox.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] + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'DataAccountType'}, + '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.get('data_account_type', "StorageAccount") + 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(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.models.TransportShipmentTypes + """ + + _validation = { + 'shipment_type': {'readonly': True}, + } + + _attribute_map = { + 'shipment_type': {'key': 'shipmentType', 'type': 'TransportShipmentTypes'}, + } + + def __init__(self, **kwargs): + super(TransportAvailabilityDetails, self).__init__(**kwargs) + self.shipment_type = None + + +class TransportAvailabilityRequest(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.models.SkuName + """ + + _attribute_map = { + 'sku_name': {'key': 'skuName', 'type': 'SkuName'}, + } + + def __init__(self, **kwargs): + super(TransportAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = kwargs.get('sku_name', None) + + +class TransportAvailabilityResponse(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.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(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.models.TransportShipmentTypes + """ + + _validation = { + 'preferred_shipment_type': {'required': True}, + } + + _attribute_map = { + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'TransportShipmentTypes'}, + } + + def __init__(self, **kwargs): + super(TransportPreferences, self).__init__(**kwargs) + self.preferred_shipment_type = kwargs.get('preferred_shipment_type', None) + + +class UnencryptedCredentials(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.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 UpdateJobDetails(Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :param key_encryption_key: Key encryption key for the job. + :type key_encryption_key: ~azure.mgmt.databox.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(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(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. Constant filled by server. + :type validation_type: str + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.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 + :param transport_preferences: Preferences related to the shipment + logistics of the sku. + :type transport_preferences: + ~azure.mgmt.databox.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': 'SkuName'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__(self, **kwargs): + super(ValidateAddress, self).__init__(**kwargs) + self.shipping_address = kwargs.get('shipping_address', None) + self.device_type = kwargs.get('device_type', None) + self.transport_preferences = kwargs.get('transport_preferences', None) + self.validation_type = 'ValidateAddress' + + +class ValidationResponse(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.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] + """ + + _validation = { + 'status': {'readonly': True}, + 'individual_response_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'OverallValidationStatus'}, + '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/v2020_11_01/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models_py3.py new file mode 100644 index 000000000000..61a02cd0477d --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_models_py3.py @@ -0,0 +1,3756 @@ +# 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.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccountCredentialDetails(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.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] + """ + + _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': 'DataAccountType'}, + 'account_connection_string': {'key': 'accountConnectionString', 'type': 'str'}, + 'share_credential_details': {'key': 'shareCredentialDetails', 'type': '[ShareCredentialDetails]'}, + } + + def __init__(self, **kwargs) -> None: + 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(Model): + """Additional error info. + + :param type: Additional error type. + :type type: str + :param info: Additional error info. + :type info: object + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, *, type: str=None, info=None, **kwargs) -> None: + super(AdditionalErrorInfo, self).__init__(**kwargs) + self.type = type + self.info = info + + +class AddressValidationOutput(Model): + """Output of the address validation api. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.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 + :ivar alternate_addresses: List of alternate addresses. + :vartype alternate_addresses: + list[~azure.mgmt.databox.models.ShippingAddress] + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_status': {'readonly': True}, + 'alternate_addresses': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'properties.error', 'type': 'CloudError'}, + 'validation_status': {'key': 'properties.validationStatus', 'type': 'AddressValidationStatus'}, + 'alternate_addresses': {'key': 'properties.alternateAddresses', 'type': '[ShippingAddress]'}, + } + + def __init__(self, **kwargs) -> None: + super(AddressValidationOutput, self).__init__(**kwargs) + self.error = None + self.validation_status = None + self.alternate_addresses = None + + +class ApiError(Model): + """ApiError. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. + :type error: ~azure.mgmt.databox.models.ErrorDetail + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__(self, *, error, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.error = error + + +class ApiErrorException(HttpOperationError): + """Server responsed with exception of type: 'ApiError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) + + +class ApplianceNetworkConfiguration(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) -> None: + super(ApplianceNetworkConfiguration, self).__init__(**kwargs) + self.name = None + self.mac_address = None + + +class ArmBaseObject(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) -> None: + super(ArmBaseObject, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + + +class AvailableSkuRequest(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.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.models.SkuName] + """ + + _validation = { + 'transfer_type': {'required': True}, + 'country': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku_names': {'key': 'skuNames', 'type': '[SkuName]'}, + } + + def __init__(self, *, transfer_type, country: str, location: str, sku_names=None, **kwargs) -> None: + super(AvailableSkuRequest, self).__init__(**kwargs) + self.transfer_type = transfer_type + self.country = country + self.location = location + self.sku_names = sku_names + + +class AzureFileFilterDetails(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=None, file_path_list=None, file_share_list=None, **kwargs) -> None: + 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(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=None, blob_path_list=None, container_list=None, **kwargs) -> None: + 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(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) -> None: + super(CancellationReason, self).__init__(**kwargs) + self.reason = reason + + +class CloudError(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.models.CloudError] + :ivar additional_info: Cloud error additional info. + :vartype additional_info: + list[~azure.mgmt.databox.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: str=None, message: str=None, target: str=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = None + self.additional_info = None + + +class ContactDetails(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.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, phone_extension: str=None, mobile: str=None, notification_preference=None, **kwargs) -> None: + 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(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. Constant filled by server. + :type copy_log_details_type: str + """ + + _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) -> None: + super(CopyLogDetails, self).__init__(**kwargs) + self.copy_log_details_type = None + + +class CopyProgress(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.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 + :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': 'TransferType'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'DataAccountType'}, + '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) -> None: + 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(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 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] + :param validation_category: Required. Constant filled by server. + :type validation_category: str + """ + + _validation = { + 'individual_request_details': {'required': True}, + 'validation_category': {'required': True}, + } + + _attribute_map = { + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + } + + _subtype_map = { + 'validation_category': {'JobCreationValidation': 'CreateJobValidations'} + } + + def __init__(self, *, individual_request_details, **kwargs) -> None: + super(ValidationRequest, self).__init__(**kwargs) + self.individual_request_details = individual_request_details + self.validation_category = None + + +class CreateJobValidations(ValidationRequest): + """It does all pre-job creation validations. + + All required parameters must be populated in order to send to Azure. + + :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] + :param validation_category: Required. Constant filled by server. + :type validation_category: str + """ + + _validation = { + 'individual_request_details': {'required': True}, + 'validation_category': {'required': True}, + } + + _attribute_map = { + 'individual_request_details': {'key': 'individualRequestDetails', 'type': '[ValidationInputRequest]'}, + 'validation_category': {'key': 'validationCategory', 'type': 'str'}, + } + + def __init__(self, *, individual_request_details, **kwargs) -> None: + super(CreateJobValidations, self).__init__(individual_request_details=individual_request_details, **kwargs) + self.validation_category = 'JobCreationValidation' + + +class ValidationInputRequest(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: CreateOrderLimitForSubscriptionValidationRequest, + DataTransferDetailsValidationRequest, PreferencesValidationRequest, + SkuAvailabilityValidationRequest, + SubscriptionIsAllowedToCreateJobValidationRequest, ValidateAddress + + All required parameters must be populated in order to send to Azure. + + :param validation_type: Required. Constant filled by server. + :type validation_type: str + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationRequest', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationRequest', 'ValidatePreferences': 'PreferencesValidationRequest', 'ValidateSkuAvailability': 'SkuAvailabilityValidationRequest', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationRequest', 'ValidateAddress': 'ValidateAddress'} + } + + def __init__(self, **kwargs) -> None: + super(ValidationInputRequest, self).__init__(**kwargs) + self.validation_type = None + + +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. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'validation_type': {'required': True}, + 'device_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'SkuName'}, + } + + def __init__(self, *, device_type, **kwargs) -> None: + super(CreateOrderLimitForSubscriptionValidationRequest, self).__init__(**kwargs) + self.device_type = device_type + self.validation_type = 'ValidateCreateOrderLimit' + + +class ValidationInputResponse(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: + 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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + _subtype_map = { + 'validation_type': {'ValidateCreateOrderLimit': 'CreateOrderLimitForSubscriptionValidationResponseProperties', 'ValidateDataTransferDetails': 'DataTransferDetailsValidationResponseProperties', 'ValidatePreferences': 'PreferencesValidationResponseProperties', 'ValidateSkuAvailability': 'SkuAvailabilityValidationResponseProperties', 'ValidateSubscriptionIsAllowedToCreateJob': 'SubscriptionIsAllowedToCreateJobValidationResponseProperties'} + } + + def __init__(self, **kwargs) -> None: + super(ValidationInputResponse, self).__init__(**kwargs) + self.error = None + self.validation_type = None + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Create order limit validation status. Possible values + include: 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(CreateOrderLimitForSubscriptionValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateCreateOrderLimit' + + +class DataAccountDetails(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 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 data_account_type: Required. Constant filled by server. + :type data_account_type: str + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + } + + _subtype_map = { + 'data_account_type': {'ManagedDisk': 'ManagedDiskDetails', 'StorageAccount': 'StorageAccountDetails'} + } + + def __init__(self, *, share_password: str=None, **kwargs) -> None: + super(DataAccountDetails, self).__init__(**kwargs) + self.share_password = share_password + self.data_account_type = 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. Constant filled by server. + :type copy_log_details_type: str + :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) -> None: + super(DataBoxAccountCopyLogDetails, self).__init__(**kwargs) + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + self.copy_log_details_type = 'DataBox' + + +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. Constant filled by server. + :type copy_log_details_type: str + :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) -> None: + super(DataBoxDiskCopyLogDetails, self).__init__(**kwargs) + self.disk_serial_number = None + self.error_log_link = None + self.verbose_log_link = None + self.copy_log_details_type = 'DataBoxDisk' + + +class DataBoxDiskCopyProgress(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.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': 'CopyStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxDiskCopyProgress, self).__init__(**kwargs) + self.serial_number = None + self.bytes_copied = None + self.percent_complete = None + self.status = None + + +class JobDetails(Model): + """Job details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobDetails, DataBoxHeavyJobDetails, + DataBoxJobDetails + + 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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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.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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + """ + + _validation = { + 'job_stages': {'readonly': True}, + 'contact_details': {'required': True}, + 'delivery_package': {'readonly': True}, + 'return_package': {'readonly': True}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_details_type': {'DataBoxDisk': 'DataBoxDiskJobDetails', 'DataBoxHeavy': 'DataBoxHeavyJobDetails', 'DataBox': 'DataBoxJobDetails'} + } + + def __init__(self, *, contact_details, shipping_address=None, data_import_details=None, data_export_details=None, preferences=None, key_encryption_key=None, expected_data_size_in_tera_bytes: int=None, **kwargs) -> None: + 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.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.job_details_type = 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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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.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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :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] + :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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', '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, shipping_address=None, data_import_details=None, data_export_details=None, preferences=None, key_encryption_key=None, expected_data_size_in_tera_bytes: int=None, preferred_disks=None, passkey: str=None, **kwargs) -> None: + 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.preferred_disks = preferred_disks + self.copy_progress = None + self.disks_and_size_details = None + self.passkey = passkey + self.job_details_type = 'DataBoxDisk' + + +class JobSecrets(Model): + """The base class for the secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataBoxDiskJobSecrets, DataBoxHeavyJobSecrets, + DataboxJobSecrets + + 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 dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + } + + _subtype_map = { + 'job_secrets_type': {'DataBoxDisk': 'DataBoxDiskJobSecrets', 'DataBoxHeavy': 'DataBoxHeavyJobSecrets', 'DataBox': 'DataboxJobSecrets'} + } + + def __init__(self, **kwargs) -> None: + super(JobSecrets, self).__init__(**kwargs) + self.dc_access_security_code = None + self.error = None + self.job_secrets_type = 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. + + :ivar dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :ivar disk_secrets: Contains the list of secrets object for that device. + :vartype disk_secrets: list[~azure.mgmt.databox.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 = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + 'disk_secrets': {'readonly': True}, + 'pass_key': {'readonly': True}, + 'is_passkey_user_defined': {'readonly': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'disk_secrets': {'key': 'diskSecrets', 'type': '[DiskSecret]'}, + 'pass_key': {'key': 'passKey', 'type': 'str'}, + 'is_passkey_user_defined': {'key': 'isPasskeyUserDefined', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxDiskJobSecrets, self).__init__(**kwargs) + self.disk_secrets = None + self.pass_key = None + self.is_passkey_user_defined = None + self.job_secrets_type = 'DataBoxDisk' + + +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. Constant filled by server. + :type copy_log_details_type: str + :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) -> None: + super(DataBoxHeavyAccountCopyLogDetails, self).__init__(**kwargs) + self.account_name = None + self.copy_log_link = None + self.copy_verbose_log_link = None + self.copy_log_details_type = 'DataBoxHeavy' + + +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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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.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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per account. + :vartype copy_progress: list[~azure.mgmt.databox.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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__(self, *, contact_details, shipping_address=None, data_import_details=None, data_export_details=None, preferences=None, key_encryption_key=None, expected_data_size_in_tera_bytes: int=None, device_password: str=None, **kwargs) -> None: + 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.copy_progress = None + self.device_password = device_password + self.job_details_type = 'DataBoxHeavy' + + +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. + + :ivar dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :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] + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + 'cabinet_pod_secrets': {'readonly': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'cabinet_pod_secrets': {'key': 'cabinetPodSecrets', 'type': '[DataBoxHeavySecret]'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxHeavyJobSecrets, self).__init__(**kwargs) + self.cabinet_pod_secrets = None + self.job_secrets_type = 'DataBoxHeavy' + + +class DataBoxHeavySecret(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.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] + """ + + _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) -> None: + 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.models.JobStages] + :param contact_details: Required. Contact details for notification and + shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :ivar delivery_package: Delivery package shipping details. + :vartype delivery_package: + ~azure.mgmt.databox.models.PackageShippingDetails + :ivar return_package: Return package shipping details. + :vartype return_package: ~azure.mgmt.databox.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] + :param data_export_details: Details of the data to be exported from azure. + :type data_export_details: + list[~azure.mgmt.databox.models.DataExportDetails] + :param preferences: Preferences for the order. + :type preferences: ~azure.mgmt.databox.models.Preferences + :ivar copy_log_details: List of copy log details. + :vartype copy_log_details: list[~azure.mgmt.databox.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.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 + :param job_details_type: Required. Constant filled by server. + :type job_details_type: str + :ivar copy_progress: Copy progress per storage account. + :vartype copy_progress: list[~azure.mgmt.databox.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}, + 'copy_log_details': {'readonly': True}, + 'reverse_shipment_label_sas_key': {'readonly': True}, + 'chain_of_custody_sas_key': {'readonly': True}, + 'job_details_type': {'required': 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]'}, + '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'}, + 'job_details_type': {'key': 'jobDetailsType', 'type': 'str'}, + 'copy_progress': {'key': 'copyProgress', 'type': '[CopyProgress]'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + } + + def __init__(self, *, contact_details, shipping_address=None, data_import_details=None, data_export_details=None, preferences=None, key_encryption_key=None, expected_data_size_in_tera_bytes: int=None, device_password: str=None, **kwargs) -> None: + 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.copy_progress = None + self.device_password = device_password + self.job_details_type = 'DataBox' + + +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 dc_access_security_code: Dc Access Security Code for Customer + Managed Shipping + :vartype dc_access_security_code: + ~azure.mgmt.databox.models.DcAccessSecurityCode + :ivar error: Error while fetching the secrets. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :param pod_secrets: Contains the list of secret objects for a job. + :type pod_secrets: list[~azure.mgmt.databox.models.DataBoxSecret] + """ + + _validation = { + 'dc_access_security_code': {'readonly': True}, + 'error': {'readonly': True}, + 'job_secrets_type': {'required': True}, + } + + _attribute_map = { + 'dc_access_security_code': {'key': 'dcAccessSecurityCode', 'type': 'DcAccessSecurityCode'}, + 'error': {'key': 'error', 'type': 'CloudError'}, + 'job_secrets_type': {'key': 'jobSecretsType', 'type': 'str'}, + 'pod_secrets': {'key': 'podSecrets', 'type': '[DataBoxSecret]'}, + } + + def __init__(self, *, pod_secrets=None, **kwargs) -> None: + super(DataboxJobSecrets, self).__init__(**kwargs) + self.pod_secrets = pod_secrets + self.job_secrets_type = 'DataBox' + + +class ScheduleAvailabilityRequest(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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + _subtype_map = { + 'sku_name': {'DataBox': 'DataBoxScheduleAvailabilityRequest', 'DataBoxDisk': 'DiskScheduleAvailabilityRequest', 'DataBoxHeavy': 'HeavyScheduleAvailabilityRequest'} + } + + def __init__(self, *, storage_location: str, country: str=None, **kwargs) -> None: + super(ScheduleAvailabilityRequest, self).__init__(**kwargs) + self.storage_location = storage_location + self.country = country + self.sku_name = 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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__(self, *, storage_location: str, country: str=None, **kwargs) -> None: + super(DataBoxScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBox' + + +class DataBoxSecret(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.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] + """ + + _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) -> None: + 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(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.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.models.LogCollectionLevel + :param account_details: Required. Account details of the data to be + transferred + :type account_details: ~azure.mgmt.databox.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': 'LogCollectionLevel'}, + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__(self, *, transfer_configuration, account_details, log_collection_level="Error", **kwargs) -> None: + super(DataExportDetails, self).__init__(**kwargs) + self.transfer_configuration = transfer_configuration + self.log_collection_level = log_collection_level + self.account_details = account_details + + +class DataImportDetails(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.models.DataAccountDetails + """ + + _validation = { + 'account_details': {'required': True}, + } + + _attribute_map = { + 'account_details': {'key': 'accountDetails', 'type': 'DataAccountDetails'}, + } + + def __init__(self, *, account_details, **kwargs) -> None: + super(DataImportDetails, self).__init__(**kwargs) + self.account_details = account_details + + +class DataLocationToServiceLocationMap(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) -> None: + 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. Constant filled by server. + :type validation_type: str + :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] + :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] + :param device_type: Required. Device type. Possible values include: + 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + :type device_type: str or ~azure.mgmt.databox.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 + """ + + _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': 'SkuName'}, + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + } + + def __init__(self, *, device_type, transfer_type, data_export_details=None, data_import_details=None, **kwargs) -> None: + super(DataTransferDetailsValidationRequest, self).__init__(**kwargs) + self.data_export_details = data_export_details + self.data_import_details = data_import_details + self.device_type = device_type + self.transfer_type = transfer_type + self.validation_type = 'ValidateDataTransferDetails' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Data transfer details validation status. Possible values + include: 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(DataTransferDetailsValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateDataTransferDetails' + + +class DcAccessSecurityCode(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: str=None, forward_dc_access_code: str=None, **kwargs) -> None: + 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(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) -> None: + 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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: 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'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', '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: str=None, **kwargs) -> None: + super(DiskScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.expected_data_size_in_tera_bytes = expected_data_size_in_tera_bytes + self.sku_name = 'DataBoxDisk' + + +class DiskSecret(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) -> None: + super(DiskSecret, self).__init__(**kwargs) + self.disk_serial_number = None + self.bit_locker_key = None + + +class EncryptionPreferences(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.models.DoubleEncryption + """ + + _attribute_map = { + 'double_encryption': {'key': 'doubleEncryption', 'type': 'DoubleEncryption'}, + } + + def __init__(self, *, double_encryption="Disabled", **kwargs) -> None: + super(EncryptionPreferences, self).__init__(**kwargs) + self.double_encryption = double_encryption + + +class ErrorDetail(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.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=None, target: str=None, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + self.target = target + + +class FilterFileDetails(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.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': 'FilterFileType'}, + 'filter_file_path': {'key': 'filterFilePath', 'type': 'str'}, + } + + def __init__(self, *, filter_file_type, filter_file_path: str, **kwargs) -> None: + 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 country: Country in which storage location should be supported. + :type country: str + :param sku_name: Required. Constant filled by server. + :type sku_name: str + """ + + _validation = { + 'storage_location': {'required': True}, + 'sku_name': {'required': True}, + } + + _attribute_map = { + 'storage_location': {'key': 'storageLocation', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + } + + def __init__(self, *, storage_location: str, country: str=None, **kwargs) -> None: + super(HeavyScheduleAvailabilityRequest, self).__init__(storage_location=storage_location, country=country, **kwargs) + self.sku_name = 'DataBoxHeavy' + + +class IdentityProperties(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.models.UserAssignedProperties + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned': {'key': 'userAssigned', 'type': 'UserAssignedProperties'}, + } + + def __init__(self, *, type: str=None, user_assigned=None, **kwargs) -> None: + super(IdentityProperties, self).__init__(**kwargs) + self.type = type + self.user_assigned = user_assigned + + +class JobDeliveryInfo(Model): + """Additional delivery info. + + :param scheduled_date_time: Scheduled date time. + :type scheduled_date_time: datetime + """ + + _attribute_map = { + 'scheduled_date_time': {'key': 'scheduledDateTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, scheduled_date_time=None, **kwargs) -> None: + super(JobDeliveryInfo, self).__init__(**kwargs) + self.scheduled_date_time = scheduled_date_time + + +class Resource(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: 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.models.Sku + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databox.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, tags=None, identity=None, **kwargs) -> None: + 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: 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.models.Sku + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databox.models.ResourceIdentity + :param transfer_type: Required. Type of the data transfer. Possible values + include: 'ImportToAzure', 'ExportFromAzure' + :type transfer_type: str or ~azure.mgmt.databox.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.models.StageName + :ivar start_time: Time at which the job was started in UTC ISO 8601 + format. + :vartype start_time: datetime + :ivar error: Top level error for the job. + :vartype error: ~azure.mgmt.databox.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 + :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.models.JobDeliveryType + :param delivery_info: Delivery Info of Job. + :type delivery_info: ~azure.mgmt.databox.models.JobDeliveryInfo + :ivar is_cancellable_without_fee: Flag to indicate cancellation of + scheduled job. + :vartype is_cancellable_without_fee: bool + :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.models.SystemData + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': 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}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'transfer_type': {'key': 'properties.transferType', 'type': 'TransferType'}, + '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': 'StageName'}, + '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': 'JobDeliveryType'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'JobDeliveryInfo'}, + 'is_cancellable_without_fee': {'key': 'properties.isCancellableWithoutFee', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, *, location: str, sku, transfer_type, tags=None, identity=None, details=None, delivery_type="NonScheduled", delivery_info=None, **kwargs) -> None: + super(JobResource, self).__init__(location=location, tags=tags, sku=sku, identity=identity, **kwargs) + 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 + self.name = None + self.id = None + self.type = None + self.system_data = None + + +class JobResourceUpdateParameter(Model): + """The JobResourceUpdateParameter. + + :param details: Details of a job to be updated. + :type details: ~azure.mgmt.databox.models.UpdateJobDetails + :param 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.models.ResourceIdentity + """ + + _attribute_map = { + 'details': {'key': 'properties.details', 'type': 'UpdateJobDetails'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + } + + def __init__(self, *, details=None, tags=None, identity=None, **kwargs) -> None: + super(JobResourceUpdateParameter, self).__init__(**kwargs) + self.details = details + self.tags = tags + self.identity = identity + + +class JobStages(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.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 + :ivar stage_time: Time for the job stage in UTC ISO 8601 format. + :vartype stage_time: datetime + :ivar job_stage_details: Job Stage Details + :vartype job_stage_details: object + """ + + _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': 'StageName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'stage_status': {'key': 'stageStatus', 'type': 'StageStatus'}, + 'stage_time': {'key': 'stageTime', 'type': 'iso-8601'}, + 'job_stage_details': {'key': 'jobStageDetails', 'type': 'object'}, + } + + def __init__(self, **kwargs) -> None: + 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(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.models.KekType + :param identity_properties: Managed identity properties used for key + encryption. + :type identity_properties: ~azure.mgmt.databox.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': 'KekType'}, + '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="MicrosoftManaged", identity_properties=None, kek_url: str=None, kek_vault_resource_id: str=None, **kwargs) -> None: + 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 ManagedDiskDetails(DataAccountDetails): + """Details of the managed disks. + + All required parameters must be populated in order to send to Azure. + + :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 data_account_type: Required. Constant filled by server. + :type data_account_type: 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 = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', '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: str=None, **kwargs) -> None: + super(ManagedDiskDetails, self).__init__(share_password=share_password, **kwargs) + self.resource_group_id = resource_group_id + self.staging_storage_account_id = staging_storage_account_id + self.data_account_type = 'ManagedDisk' + + +class NotificationPreference(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.models.NotificationStageName + :param send_notification: Required. Notification is required or not. + Default value: True . + :type send_notification: bool + """ + + _validation = { + 'stage_name': {'required': True}, + 'send_notification': {'required': True}, + } + + _attribute_map = { + 'stage_name': {'key': 'stageName', 'type': 'NotificationStageName'}, + 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, + } + + def __init__(self, *, stage_name, send_notification: bool=True, **kwargs) -> None: + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = stage_name + self.send_notification = send_notification + + +class Operation(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.models.OperationDisplay + :ivar properties: Operation properties. + :vartype properties: object + :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: bool=None, **kwargs) -> None: + 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(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PackageShippingDetails(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) -> None: + super(PackageShippingDetails, self).__init__(**kwargs) + self.carrier_name = None + self.tracking_id = None + self.tracking_url = None + + +class Preferences(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.models.TransportPreferences + :param encryption_preferences: Preferences related to the Encryption. + :type encryption_preferences: + ~azure.mgmt.databox.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=None, transport_preferences=None, encryption_preferences=None, **kwargs) -> None: + 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. Constant filled by server. + :type validation_type: str + :param preference: Preference of transport and data center. + :type preference: ~azure.mgmt.databox.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 + """ + + _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': 'SkuName'}, + } + + def __init__(self, *, device_type, preference=None, **kwargs) -> None: + super(PreferencesValidationRequest, self).__init__(**kwargs) + self.preference = preference + self.device_type = device_type + self.validation_type = 'ValidatePreferences' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(PreferencesValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidatePreferences' + + +class RegionConfigurationRequest(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.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 + """ + + _attribute_map = { + 'schedule_availability_request': {'key': 'scheduleAvailabilityRequest', 'type': 'ScheduleAvailabilityRequest'}, + 'transport_availability_request': {'key': 'transportAvailabilityRequest', 'type': 'TransportAvailabilityRequest'}, + } + + def __init__(self, *, schedule_availability_request=None, transport_availability_request=None, **kwargs) -> None: + super(RegionConfigurationRequest, self).__init__(**kwargs) + self.schedule_availability_request = schedule_availability_request + self.transport_availability_request = transport_availability_request + + +class RegionConfigurationResponse(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.models.ScheduleAvailabilityResponse + :ivar transport_availability_response: Transport options available for + given sku in a region. + :vartype transport_availability_response: + ~azure.mgmt.databox.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) -> None: + super(RegionConfigurationResponse, self).__init__(**kwargs) + self.schedule_availability_response = None + self.transport_availability_response = None + + +class ResourceIdentity(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. Default value: "None" . + :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.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: str="None", user_assigned_identities=None, **kwargs) -> None: + 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(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] + """ + + _validation = { + 'available_dates': {'readonly': True}, + } + + _attribute_map = { + 'available_dates': {'key': 'availableDates', 'type': '[iso-8601]'}, + } + + def __init__(self, **kwargs) -> None: + super(ScheduleAvailabilityResponse, self).__init__(**kwargs) + self.available_dates = None + + +class ShareCredentialDetails(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.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] + """ + + _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': 'ShareDestinationFormatType'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'supported_access_protocols': {'key': 'supportedAccessProtocols', 'type': '[AccessProtocol]'}, + } + + def __init__(self, **kwargs) -> None: + 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(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 + :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 + :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, end_time, shipment_location: str, **kwargs) -> None: + super(ShipmentPickUpRequest, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.shipment_location = shipment_location + + +class ShipmentPickUpResponse(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 + """ + + _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) -> None: + super(ShipmentPickUpResponse, self).__init__(**kwargs) + self.confirmation_number = None + self.ready_by_time = None + + +class ShippingAddress(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.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': 'AddressType'}, + } + + def __init__(self, *, street_address1: str, country: str, street_address2: str=None, street_address3: str=None, city: str=None, state_or_province: str=None, postal_code: str=None, zip_extended_code: str=None, company_name: str=None, address_type="None", **kwargs) -> None: + 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(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.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': 'SkuName'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__(self, *, name, display_name: str=None, family: str=None, **kwargs) -> None: + 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. Constant filled by server. + :type validation_type: str + :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 + :param transfer_type: Required. Type of the transfer. Possible values + include: 'ImportToAzure', 'ExportFromAzure' + :type transfer_type: str or ~azure.mgmt.databox.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': 'SkuName'}, + 'transfer_type': {'key': 'transferType', 'type': 'TransferType'}, + 'country': {'key': 'country', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, device_type, transfer_type, country: str, location: str, **kwargs) -> None: + super(SkuAvailabilityValidationRequest, self).__init__(**kwargs) + self.device_type = device_type + self.transfer_type = transfer_type + self.country = country + self.location = location + self.validation_type = 'ValidateSkuAvailability' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :ivar status: Sku availability validation status. Possible values include: + 'Valid', 'Invalid', 'Skipped' + :vartype status: str or ~azure.mgmt.databox.models.ValidationStatus + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuAvailabilityValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateSkuAvailability' + + +class SkuCapacity(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) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.usable = None + self.maximum = None + + +class SkuCost(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) -> None: + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.meter_type = None + self.multiplier = None + + +class SkuInformation(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.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] + :ivar capacity: Capacity of the Sku. + :vartype capacity: ~azure.mgmt.databox.models.SkuCapacity + :ivar costs: Cost of the Sku. + :vartype costs: list[~azure.mgmt.databox.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 + :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': 'SkuDisabledReason'}, + 'disabled_reason_message': {'key': 'properties.disabledReasonMessage', 'type': 'str'}, + 'required_feature': {'key': 'properties.requiredFeature', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + 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 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 data_account_type: Required. Constant filled by server. + :type data_account_type: 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 = { + 'share_password': {'key': 'sharePassword', 'type': 'str'}, + 'data_account_type': {'key': 'dataAccountType', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, *, storage_account_id: str, share_password: str=None, **kwargs) -> None: + super(StorageAccountDetails, self).__init__(share_password=share_password, **kwargs) + self.storage_account_id = storage_account_id + self.data_account_type = 'StorageAccount' + + +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. Constant filled by server. + :type validation_type: str + """ + + _validation = { + 'validation_type': {'required': True}, + } + + _attribute_map = { + 'validation_type': {'key': 'validationType', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionIsAllowedToCreateJobValidationRequest, self).__init__(**kwargs) + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' + + +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. + + :ivar error: Error code and message of validation response. + :vartype error: ~azure.mgmt.databox.models.CloudError + :param validation_type: Required. Constant filled by server. + :type validation_type: str + :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 + """ + + _validation = { + 'error': {'readonly': True}, + 'validation_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + 'validation_type': {'key': 'validationType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ValidationStatus'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionIsAllowedToCreateJobValidationResponseProperties, self).__init__(**kwargs) + self.status = None + self.validation_type = 'ValidateSubscriptionIsAllowedToCreateJob' + + +class SystemData(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 + :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 + """ + + _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) -> None: + 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(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'. Default value: + "StorageAccount" . + :type data_account_type: str or ~azure.mgmt.databox.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': 'DataAccountType'}, + 'transfer_all_blobs': {'key': 'transferAllBlobs', 'type': 'bool'}, + 'transfer_all_files': {'key': 'transferAllFiles', 'type': 'bool'}, + } + + def __init__(self, *, data_account_type="StorageAccount", transfer_all_blobs: bool=None, transfer_all_files: bool=None, **kwargs) -> None: + 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(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.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 + :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 + """ + + _validation = { + 'transfer_configuration_type': {'required': True}, + } + + _attribute_map = { + 'transfer_configuration_type': {'key': 'transferConfigurationType', 'type': 'TransferConfigurationType'}, + 'transfer_filter_details': {'key': 'transferFilterDetails', 'type': 'TransferConfigurationTransferFilterDetails'}, + 'transfer_all_details': {'key': 'transferAllDetails', 'type': 'TransferConfigurationTransferAllDetails'}, + } + + def __init__(self, *, transfer_configuration_type, transfer_filter_details=None, transfer_all_details=None, **kwargs) -> None: + 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(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 + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferAllDetails'}, + } + + def __init__(self, *, include=None, **kwargs) -> None: + super(TransferConfigurationTransferAllDetails, self).__init__(**kwargs) + self.include = include + + +class TransferConfigurationTransferFilterDetails(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 + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': 'TransferFilterDetails'}, + } + + def __init__(self, *, include=None, **kwargs) -> None: + super(TransferConfigurationTransferFilterDetails, self).__init__(**kwargs) + self.include = include + + +class TransferFilterDetails(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'. Default value: + "StorageAccount" . + :type data_account_type: str or ~azure.mgmt.databox.models.DataAccountType + :param blob_filter_details: Filter details to transfer blobs. + :type blob_filter_details: ~azure.mgmt.databox.models.BlobFilterDetails + :param azure_file_filter_details: Filter details to transfer Azure files. + :type azure_file_filter_details: + ~azure.mgmt.databox.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] + """ + + _validation = { + 'data_account_type': {'required': True}, + } + + _attribute_map = { + 'data_account_type': {'key': 'dataAccountType', 'type': 'DataAccountType'}, + '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="StorageAccount", blob_filter_details=None, azure_file_filter_details=None, filter_file_details=None, **kwargs) -> None: + 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(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.models.TransportShipmentTypes + """ + + _validation = { + 'shipment_type': {'readonly': True}, + } + + _attribute_map = { + 'shipment_type': {'key': 'shipmentType', 'type': 'TransportShipmentTypes'}, + } + + def __init__(self, **kwargs) -> None: + super(TransportAvailabilityDetails, self).__init__(**kwargs) + self.shipment_type = None + + +class TransportAvailabilityRequest(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.models.SkuName + """ + + _attribute_map = { + 'sku_name': {'key': 'skuName', 'type': 'SkuName'}, + } + + def __init__(self, *, sku_name=None, **kwargs) -> None: + super(TransportAvailabilityRequest, self).__init__(**kwargs) + self.sku_name = sku_name + + +class TransportAvailabilityResponse(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.models.TransportAvailabilityDetails] + """ + + _validation = { + 'transport_availability_details': {'readonly': True}, + } + + _attribute_map = { + 'transport_availability_details': {'key': 'transportAvailabilityDetails', 'type': '[TransportAvailabilityDetails]'}, + } + + def __init__(self, **kwargs) -> None: + super(TransportAvailabilityResponse, self).__init__(**kwargs) + self.transport_availability_details = None + + +class TransportPreferences(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.models.TransportShipmentTypes + """ + + _validation = { + 'preferred_shipment_type': {'required': True}, + } + + _attribute_map = { + 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'TransportShipmentTypes'}, + } + + def __init__(self, *, preferred_shipment_type, **kwargs) -> None: + super(TransportPreferences, self).__init__(**kwargs) + self.preferred_shipment_type = preferred_shipment_type + + +class UnencryptedCredentials(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.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) -> None: + super(UnencryptedCredentials, self).__init__(**kwargs) + self.job_name = None + self.job_secrets = None + + +class UpdateJobDetails(Model): + """Job details for update. + + :param contact_details: Contact details for notification and shipping. + :type contact_details: ~azure.mgmt.databox.models.ContactDetails + :param shipping_address: Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.models.ShippingAddress + :param key_encryption_key: Key encryption key for the job. + :type key_encryption_key: ~azure.mgmt.databox.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=None, shipping_address=None, key_encryption_key=None, **kwargs) -> None: + super(UpdateJobDetails, self).__init__(**kwargs) + self.contact_details = contact_details + self.shipping_address = shipping_address + self.key_encryption_key = key_encryption_key + + +class UserAssignedIdentity(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) -> None: + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedProperties(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: str=None, **kwargs) -> None: + 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. Constant filled by server. + :type validation_type: str + :param shipping_address: Required. Shipping address of the customer. + :type shipping_address: ~azure.mgmt.databox.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 + :param transport_preferences: Preferences related to the shipment + logistics of the sku. + :type transport_preferences: + ~azure.mgmt.databox.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': 'SkuName'}, + 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, + } + + def __init__(self, *, shipping_address, device_type, transport_preferences=None, **kwargs) -> None: + super(ValidateAddress, self).__init__(**kwargs) + self.shipping_address = shipping_address + self.device_type = device_type + self.transport_preferences = transport_preferences + self.validation_type = 'ValidateAddress' + + +class ValidationResponse(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.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] + """ + + _validation = { + 'status': {'readonly': True}, + 'individual_response_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'OverallValidationStatus'}, + 'individual_response_details': {'key': 'properties.individualResponseDetails', 'type': '[ValidationInputResponse]'}, + } + + def __init__(self, **kwargs) -> None: + super(ValidationResponse, self).__init__(**kwargs) + self.status = None + self.individual_response_details = None diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_paged_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_paged_models.py new file mode 100644 index 000000000000..0396852889e1 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/models/_paged_models.py @@ -0,0 +1,66 @@ +# 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.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class JobResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`JobResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobResource]'} + } + + def __init__(self, *args, **kwargs): + + super(JobResourcePaged, self).__init__(*args, **kwargs) +class UnencryptedCredentialsPaged(Paged): + """ + A paging container for iterating over a list of :class:`UnencryptedCredentials ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UnencryptedCredentials]'} + } + + def __init__(self, *args, **kwargs): + + super(UnencryptedCredentialsPaged, self).__init__(*args, **kwargs) +class SkuInformationPaged(Paged): + """ + A paging container for iterating over a list of :class:`SkuInformation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SkuInformation]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuInformationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/__init__.py new file mode 100644 index 000000000000..034974abbcce --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/__init__.py @@ -0,0 +1,20 @@ +# 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 ._service_operations import ServiceOperations + +__all__ = [ + 'Operations', + 'JobsOperations', + 'ServiceOperations', +] 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 new file mode 100644 index 000000000000..16beade6521c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_jobs_operations.py @@ -0,0 +1,748 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class JobsOperations(object): + """JobsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API Version. Constant value: "2020-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-11-01" + + self.config = config + + def list( + self, skip_token=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobResource + :rtype: + ~azure.mgmt.databox.models.JobResourcePaged[~azure.mgmt.databox.models.JobResource] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs'} + + def list_by_resource_group( + self, resource_group_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobResource + :rtype: + ~azure.mgmt.databox.models.JobResourcePaged[~azure.mgmt.databox.models.JobResource] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs'} + + def get( + self, resource_group_name, job_name, expand=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.JobResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + + def _create_initial( + self, resource_group_name, job_name, job_resource, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(job_resource, 'JobResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, job_name, job_resource, custom_headers=None, raw=False, polling=True, **operation_config): + """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.models.JobResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns JobResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databox.models.JobResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databox.models.JobResource]] + :raises: + :class:`ApiErrorException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + job_name=job_name, + job_resource=job_resource, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + + def _delete_initial( + self, resource_group_name, job_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, job_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ApiErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + job_name=job_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + + def _update_initial( + self, resource_group_name, job_name, job_resource_update_parameter, if_match=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(job_resource_update_parameter, 'JobResourceUpdateParameter') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, job_name, job_resource_update_parameter, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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.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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns JobResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databox.models.JobResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databox.models.JobResource]] + :raises: + :class:`ApiErrorException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}'} + + def book_shipment_pick_up( + self, resource_group_name, job_name, shipment_pick_up_request, custom_headers=None, raw=False, **operation_config): + """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.models.ShipmentPickUpRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ShipmentPickUpResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.ShipmentPickUpResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.book_shipment_pick_up.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(shipment_pick_up_request, 'ShipmentPickUpRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShipmentPickUpResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + book_shipment_pick_up.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp'} + + def cancel( + self, resource_group_name, job_name, reason, custom_headers=None, raw=False, **operation_config): + """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 reason: Reason for cancellation. + :type reason: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + cancellation_reason = models.CancellationReason(reason=reason) + + # Construct URL + url = self.cancel.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(cancellation_reason, 'CancellationReason') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel'} + + def list_credentials( + self, resource_group_name, job_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of UnencryptedCredentials + :rtype: + ~azure.mgmt.databox.models.UnencryptedCredentialsPaged[~azure.mgmt.databox.models.UnencryptedCredentials] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UnencryptedCredentialsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} 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 new file mode 100644 index 000000000000..50abda1c7fae --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_operations.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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API Version. Constant value: "2020-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-11-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """This method gets all the operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.databox.models.OperationPaged[~azure.mgmt.databox.models.Operation] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} 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 new file mode 100644 index 000000000000..0031d0b35e33 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/operations/_service_operations.py @@ -0,0 +1,461 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ServiceOperations(object): + """ServiceOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API Version. Constant value: "2020-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-11-01" + + self.config = config + + def list_available_skus_by_resource_group( + self, resource_group_name, location, available_sku_request, custom_headers=None, raw=False, **operation_config): + """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.models.AvailableSkuRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInformation + :rtype: + ~azure.mgmt.databox.models.SkuInformationPaged[~azure.mgmt.databox.models.SkuInformation] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_skus_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(available_sku_request, 'AvailableSkuRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInformationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_skus_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus'} + + def validate_address_method( + self, location, validate_address, custom_headers=None, raw=False, **operation_config): + """[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.models.ValidateAddress + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AddressValidationOutput or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.AddressValidationOutput or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.validate_address_method.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_address, 'ValidateAddress') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressValidationOutput', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate_address_method.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress'} + + def validate_inputs_by_resource_group( + self, resource_group_name, location, validation_request, custom_headers=None, raw=False, **operation_config): + """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.models.ValidationRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidationResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.ValidationResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.validate_inputs_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validation_request, 'ValidationRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate_inputs_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} + + def validate_inputs( + self, location, validation_request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidationResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.ValidationResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.validate_inputs.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validation_request, 'ValidationRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate_inputs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs'} + + def region_configuration( + self, location, schedule_availability_request=None, transport_availability_request=None, custom_headers=None, raw=False, **operation_config): + """This API provides configuration details specific to given + region/location at Subscription level. + + :param location: The location of the resource + :type location: str + :param schedule_availability_request: Request body to get the + availability for scheduling orders. + :type schedule_availability_request: + ~azure.mgmt.databox.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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegionConfigurationResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + region_configuration_request = models.RegionConfigurationRequest(schedule_availability_request=schedule_availability_request, transport_availability_request=transport_availability_request) + + # Construct URL + url = self.region_configuration.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegionConfigurationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + region_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} + + def region_configuration_by_resource_group( + self, resource_group_name, location, schedule_availability_request=None, transport_availability_request=None, custom_headers=None, raw=False, **operation_config): + """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 schedule_availability_request: Request body to get the + availability for scheduling orders. + :type schedule_availability_request: + ~azure.mgmt.databox.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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegionConfigurationResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databox.models.RegionConfigurationResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + region_configuration_request = models.RegionConfigurationRequest(schedule_availability_request=schedule_availability_request, transport_availability_request=transport_availability_request) + + # Construct URL + url = self.region_configuration_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(region_configuration_request, 'RegionConfigurationRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegionConfigurationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + region_configuration_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration'} 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 new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2020_11_01/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" +