From 0319073a2f250725e4a13254f36ca3cc5d935cc6 Mon Sep 17 00:00:00 2001 From: Wei Dong <40835867+dw511214992@users.noreply.github.com> Date: Thu, 6 Feb 2020 09:24:54 +0800 Subject: [PATCH] Databox sdk release (#9723) * initial release for databox * Revert "initial release for databox" This reverts commit 1e08e5477b7ab8872880541889b16f13ee5cbf6d. * initial release for databox --- sdk/databox/azure-mgmt-databox/CHANGELOG.md | 5 + sdk/databox/azure-mgmt-databox/MANIFEST.in | 5 + sdk/databox/azure-mgmt-databox/README.md | 21 + .../azure-mgmt-databox/azure/__init__.py | 1 + .../azure-mgmt-databox/azure/mgmt/__init__.py | 1 + .../azure/mgmt/databox/__init__.py | 19 + .../azure/mgmt/databox/_configuration.py | 48 + .../databox/_data_box_management_client.py | 59 + .../azure/mgmt/databox/models/__init__.py | 196 ++ .../_data_box_management_client_enums.py | 107 + .../azure/mgmt/databox/models/_models.py | 2069 +++++++++++++++++ .../azure/mgmt/databox/models/_models_py3.py | 2069 +++++++++++++++++ .../mgmt/databox/models/_paged_models.py | 66 + .../azure/mgmt/databox/operations/__init__.py | 20 + .../databox/operations/_jobs_operations.py | 758 ++++++ .../mgmt/databox/operations/_operations.py | 102 + .../databox/operations/_service_operations.py | 187 ++ .../azure/mgmt/databox/version.py | 12 + .../azure-mgmt-databox/dev_requirements.txt | 1 + .../azure-mgmt-databox/sdk_packaging.toml | 5 + sdk/databox/azure-mgmt-databox/setup.cfg | 2 + sdk/databox/azure-mgmt-databox/setup.py | 88 + sdk/databox/ci.yml | 44 + 23 files changed, 5885 insertions(+) create mode 100644 sdk/databox/azure-mgmt-databox/CHANGELOG.md create mode 100644 sdk/databox/azure-mgmt-databox/MANIFEST.in create mode 100644 sdk/databox/azure-mgmt-databox/README.md create mode 100644 sdk/databox/azure-mgmt-databox/azure/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_configuration.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_data_box_management_client.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_data_box_management_client_enums.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models_py3.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_paged_models.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/__init__.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_jobs_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_service_operations.py create mode 100644 sdk/databox/azure-mgmt-databox/azure/mgmt/databox/version.py create mode 100644 sdk/databox/azure-mgmt-databox/dev_requirements.txt create mode 100644 sdk/databox/azure-mgmt-databox/sdk_packaging.toml create mode 100644 sdk/databox/azure-mgmt-databox/setup.cfg create mode 100644 sdk/databox/azure-mgmt-databox/setup.py create mode 100644 sdk/databox/ci.yml diff --git a/sdk/databox/azure-mgmt-databox/CHANGELOG.md b/sdk/databox/azure-mgmt-databox/CHANGELOG.md new file mode 100644 index 000000000000..bde0fbf6101f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 0.1.0 (2020-02-05) + +* Initial Release diff --git a/sdk/databox/azure-mgmt-databox/MANIFEST.in b/sdk/databox/azure-mgmt-databox/MANIFEST.in new file mode 100644 index 000000000000..a3cb07df8765 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/MANIFEST.in @@ -0,0 +1,5 @@ +recursive-include tests *.py *.yaml +include *.md +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/databox/azure-mgmt-databox/README.md b/sdk/databox/azure-mgmt-databox/README.md new file mode 100644 index 000000000000..0e1793fdab92 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/README.md @@ -0,0 +1,21 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure DataBox Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/sdk) + + +# Usage + +For code examples, see [DataBox Management](https://docs.microsoft.com/python/api/overview/azure/databox) +on docs.microsoft.com. + + +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) +section of the project. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-databox%2FREADME.png) diff --git a/sdk/databox/azure-mgmt-databox/azure/__init__.py b/sdk/databox/azure-mgmt-databox/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/__init__.py new file mode 100644 index 000000000000..1c85885ae27c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/__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/_configuration.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_configuration.py new file mode 100644 index 000000000000..adf67e024e24 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_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/_data_box_management_client.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_data_box_management_client.py new file mode 100644 index 000000000000..dcd36cb5bcd9 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_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/models/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/__init__.py new file mode 100644 index 000000000000..4fe68965fd88 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/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/models/_data_box_management_client_enums.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/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/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/models/_models.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models.py new file mode 100644 index 000000000000..929b1a4b752a --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models.py @@ -0,0 +1,2069 @@ +# 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. + :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', None) + + +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' + :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/models/_models_py3.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models_py3.py new file mode 100644 index 000000000000..3ec22bed51e3 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_models_py3.py @@ -0,0 +1,2069 @@ +# 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. + :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, **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' + :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/models/_paged_models.py new file mode 100644 index 000000000000..0396852889e1 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/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/operations/__init__.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/__init__.py new file mode 100644 index 000000000000..034974abbcce --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/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/operations/_jobs_operations.py new file mode 100644 index 000000000000..05ffeaa4115f --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/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/operations/_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_operations.py new file mode 100644 index 000000000000..3983edf1f59c --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/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/operations/_service_operations.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_service_operations.py new file mode 100644 index 000000000000..5f41844ca88b --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/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/version.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/version.py new file mode 100644 index 000000000000..fb0159ed93d7 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/version.py @@ -0,0 +1,12 @@ +# 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/dev_requirements.txt b/sdk/databox/azure-mgmt-databox/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/databox/azure-mgmt-databox/sdk_packaging.toml b/sdk/databox/azure-mgmt-databox/sdk_packaging.toml new file mode 100644 index 000000000000..2eff15be72f6 --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-databox" +package_pprint_name = "DataBox Management" +package_doc_id = "databox" +is_stable = false diff --git a/sdk/databox/azure-mgmt-databox/setup.cfg b/sdk/databox/azure-mgmt-databox/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/databox/azure-mgmt-databox/setup.py b/sdk/databox/azure-mgmt-databox/setup.py new file mode 100644 index 000000000000..64943b83290e --- /dev/null +++ b/sdk/databox/azure-mgmt-databox/setup.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-databox" +PACKAGE_PPRINT_NAME = "DataBox Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), + install_requires=[ + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', + 'azure-common~=1.1', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +) diff --git a/sdk/databox/ci.yml b/sdk/databox/ci.yml new file mode 100644 index 000000000000..48c2853338f3 --- /dev/null +++ b/sdk/databox/ci.yml @@ -0,0 +1,44 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +resources: + repositories: + - repository: azure-sdk-tools + type: github + name: Azure/azure-sdk-tools + endpoint: azure + - repository: azure-sdk-build-tools + type: git + name: internal/azure-sdk-build-tools + +trigger: + branches: + include: + - master + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/databox/ + +pr: + branches: + include: + - master + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/databox/ + + +stages: +- template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: databox + Artifacts: + - name: azure_mgmt_databox + safeName: azuremgmtdatabox