From 07ba4b9077fab4b2f2f2fa8110c852aaf0a06def Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 17 Sep 2018 16:19:51 +0000 Subject: [PATCH 1/3] Generated from 080d60a60e65dbe37c8cf60da7e033aa86cf4a2a updating readme to include sdk for all languages --- .../azure/mgmt/databox/__init__.py | 18 + .../databox/data_box_management_client.py | 91 +++ .../azure/mgmt/databox/models/__init__.py | 190 +++++ .../models/account_credential_details.py | 48 ++ .../models/account_credential_details_py3.py | 48 ++ .../models/address_validation_output.py | 43 + .../models/address_validation_output_py3.py | 43 + .../models/appliance_network_configuration.py | 40 + .../appliance_network_configuration_py3.py | 40 + .../mgmt/databox/models/arm_base_object.py | 45 ++ .../databox/models/arm_base_object_py3.py | 45 ++ .../databox/models/available_sku_request.py | 53 ++ .../models/available_sku_request_py3.py | 53 ++ .../databox/models/cancellation_reason.py | 34 + .../databox/models/cancellation_reason_py3.py | 34 + .../mgmt/databox/models/contact_details.py | 58 ++ .../databox/models/contact_details_py3.py | 58 ++ .../mgmt/databox/models/copy_log_details.py | 42 + .../databox/models/copy_log_details_py3.py | 42 + .../mgmt/databox/models/copy_progress.py | 52 ++ .../mgmt/databox/models/copy_progress_py3.py | 52 ++ .../data_box_account_copy_log_details.py | 47 ++ .../data_box_account_copy_log_details_py3.py | 47 ++ .../models/data_box_disk_copy_log_details.py | 52 ++ .../data_box_disk_copy_log_details_py3.py | 52 ++ .../models/data_box_disk_copy_progress.py | 53 ++ .../models/data_box_disk_copy_progress_py3.py | 53 ++ .../models/data_box_disk_job_details.py | 112 +++ .../models/data_box_disk_job_details_py3.py | 112 +++ .../models/data_box_disk_job_secrets.py | 52 ++ .../models/data_box_disk_job_secrets_py3.py | 52 ++ ...data_box_heavy_account_copy_log_details.py | 47 ++ ..._box_heavy_account_copy_log_details_py3.py | 47 ++ .../models/data_box_heavy_job_details.py | 94 +++ .../models/data_box_heavy_job_details_py3.py | 94 +++ .../models/data_box_heavy_job_secrets.py | 44 + .../models/data_box_heavy_job_secrets_py3.py | 44 + .../databox/models/data_box_heavy_secret.py | 58 ++ .../models/data_box_heavy_secret_py3.py | 58 ++ .../databox/models/data_box_job_details.py | 94 +++ .../models/data_box_job_details_py3.py | 94 +++ .../data_box_management_client_enums.py | 105 +++ .../mgmt/databox/models/data_box_secret.py | 58 ++ .../databox/models/data_box_secret_py3.py | 58 ++ .../databox/models/databox_job_secrets.py | 38 + .../databox/models/databox_job_secrets_py3.py | 38 + .../models/destination_account_details.py | 34 + .../models/destination_account_details_py3.py | 34 + .../destination_to_service_location_map.py | 40 + ...destination_to_service_location_map_py3.py | 40 + .../azure/mgmt/databox/models/disk_secret.py | 41 + .../mgmt/databox/models/disk_secret_py3.py | 41 + .../azure/mgmt/databox/models/error.py | 42 + .../azure/mgmt/databox/models/error_py3.py | 42 + .../azure/mgmt/databox/models/job_details.py | 109 +++ .../mgmt/databox/models/job_details_py3.py | 109 +++ .../mgmt/databox/models/job_error_details.py | 50 ++ .../databox/models/job_error_details_py3.py | 50 ++ .../azure/mgmt/databox/models/job_resource.py | 110 +++ .../mgmt/databox/models/job_resource_paged.py | 27 + .../mgmt/databox/models/job_resource_py3.py | 110 +++ .../models/job_resource_update_parameter.py | 39 + .../job_resource_update_parameter_py3.py | 39 + .../azure/mgmt/databox/models/job_secrets.py | 42 + .../mgmt/databox/models/job_secrets_py3.py | 42 + .../azure/mgmt/databox/models/job_stages.py | 66 ++ .../mgmt/databox/models/job_stages_py3.py | 66 ++ .../databox/models/notification_preference.py | 41 + .../models/notification_preference_py3.py | 41 + .../azure/mgmt/databox/models/operation.py | 51 ++ .../mgmt/databox/models/operation_display.py | 41 + .../databox/models/operation_display_py3.py | 41 + .../mgmt/databox/models/operation_paged.py | 27 + .../mgmt/databox/models/operation_py3.py | 51 ++ .../models/package_shipping_details.py | 45 ++ .../models/package_shipping_details_py3.py | 45 ++ .../azure/mgmt/databox/models/preferences.py | 28 + .../mgmt/databox/models/preferences_py3.py | 28 + .../azure/mgmt/databox/models/resource.py | 49 ++ .../azure/mgmt/databox/models/resource_py3.py | 49 ++ .../models/share_credential_details.py | 59 ++ .../models/share_credential_details_py3.py | 59 ++ .../models/shipment_pick_up_request.py | 47 ++ .../models/shipment_pick_up_request_py3.py | 47 ++ .../models/shipment_pick_up_response.py | 41 + .../models/shipment_pick_up_response_py3.py | 41 + .../mgmt/databox/models/shipping_address.py | 73 ++ .../databox/models/shipping_address_py3.py | 73 ++ .../azure/mgmt/databox/models/sku.py | 43 + .../azure/mgmt/databox/models/sku_capacity.py | 40 + .../mgmt/databox/models/sku_capacity_py3.py | 40 + .../azure/mgmt/databox/models/sku_cost.py | 40 + .../azure/mgmt/databox/models/sku_cost_py3.py | 40 + .../mgmt/databox/models/sku_information.py | 79 ++ .../databox/models/sku_information_paged.py | 27 + .../databox/models/sku_information_py3.py | 79 ++ .../azure/mgmt/databox/models/sku_py3.py | 43 + .../databox/models/unencrypted_credentials.py | 40 + .../models/unencrypted_credentials_paged.py | 27 + .../models/unencrypted_credentials_py3.py | 40 + .../mgmt/databox/models/update_job_details.py | 32 + .../databox/models/update_job_details_py3.py | 32 + .../mgmt/databox/models/validate_address.py | 41 + .../databox/models/validate_address_py3.py | 41 + .../azure/mgmt/databox/operations/__init__.py | 20 + .../databox/operations/jobs_operations.py | 752 ++++++++++++++++++ .../mgmt/databox/operations/operations.py | 98 +++ .../databox/operations/service_operations.py | 190 +++++ .../azure/mgmt/databox/version.py | 13 + 109 files changed, 6639 insertions(+) create mode 100644 azure-mgmt-databox/azure/mgmt/databox/__init__.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/data_box_management_client.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/__init__.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/account_credential_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/account_credential_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/address_validation_output.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/address_validation_output_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/appliance_network_configuration.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/appliance_network_configuration_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/arm_base_object.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/arm_base_object_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/cancellation_reason.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/cancellation_reason_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/contact_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/contact_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/copy_log_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/copy_log_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/copy_progress.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/copy_progress_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_account_copy_log_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_account_copy_log_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_log_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_log_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_progress.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_progress_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_secrets.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_secrets_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_account_copy_log_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_account_copy_log_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_secrets.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_secrets_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_secret.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_secret_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_job_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_job_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_management_client_enums.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_secret.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/data_box_secret_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/databox_job_secrets.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/databox_job_secrets_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/destination_account_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/destination_account_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/destination_to_service_location_map.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/destination_to_service_location_map_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/disk_secret.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/disk_secret_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/error.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/error_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_error_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_error_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_resource.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_resource_paged.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_resource_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_resource_update_parameter.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_resource_update_parameter_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_secrets.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_secrets_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_stages.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/job_stages_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/notification_preference.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/notification_preference_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/operation.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/operation_display.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/operation_display_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/operation_paged.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/operation_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/package_shipping_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/package_shipping_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/preferences.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/preferences_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/resource.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/resource_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/share_credential_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/share_credential_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_request.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_request_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_response.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_response_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/shipping_address.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/shipping_address_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/sku.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/sku_capacity.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/sku_capacity_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/sku_cost.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/sku_cost_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/sku_information.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/sku_information_paged.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/sku_information_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/sku_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials_paged.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/update_job_details.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/update_job_details_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/validate_address.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/models/validate_address_py3.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/operations/__init__.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/operations/jobs_operations.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/operations/operations.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/operations/service_operations.py create mode 100644 azure-mgmt-databox/azure/mgmt/databox/version.py diff --git a/azure-mgmt-databox/azure/mgmt/databox/__init__.py b/azure-mgmt-databox/azure/mgmt/databox/__init__.py new file mode 100644 index 000000000000..ef25c0a12777 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .data_box_management_client import DataBoxManagementClient +from .version import VERSION + +__all__ = ['DataBoxManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-databox/azure/mgmt/databox/data_box_management_client.py b/azure-mgmt-databox/azure/mgmt/databox/data_box_management_client.py new file mode 100644 index 000000000000..cd6d4eec51cc --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/data_box_management_client.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.operations import Operations +from .operations.jobs_operations import JobsOperations +from .operations.service_operations import ServiceOperations +from . import models + + +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) + + 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 + + +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/azure-mgmt-databox/azure/mgmt/databox/models/__init__.py b/azure-mgmt-databox/azure/mgmt/databox/models/__init__.py new file mode 100644 index 000000000000..98bf53e04107 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/__init__.py @@ -0,0 +1,190 @@ +# 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 .share_credential_details_py3 import ShareCredentialDetails + from .account_credential_details_py3 import AccountCredentialDetails + from .shipping_address_py3 import ShippingAddress + from .address_validation_output_py3 import AddressValidationOutput + from .appliance_network_configuration_py3 import ApplianceNetworkConfiguration + from .arm_base_object_py3 import ArmBaseObject + from .available_sku_request_py3 import AvailableSkuRequest + from .sku_py3 import Sku + from .destination_to_service_location_map_py3 import DestinationToServiceLocationMap + from .sku_capacity_py3 import SkuCapacity + from .sku_cost_py3 import SkuCost + from .sku_information_py3 import SkuInformation + from .cancellation_reason_py3 import CancellationReason + from .notification_preference_py3 import NotificationPreference + from .contact_details_py3 import ContactDetails + from .copy_log_details_py3 import CopyLogDetails + from .copy_progress_py3 import CopyProgress + from .data_box_account_copy_log_details_py3 import DataBoxAccountCopyLogDetails + from .data_box_disk_copy_log_details_py3 import DataBoxDiskCopyLogDetails + from .data_box_disk_copy_progress_py3 import DataBoxDiskCopyProgress + from .data_box_disk_job_details_py3 import DataBoxDiskJobDetails + from .disk_secret_py3 import DiskSecret + from .data_box_disk_job_secrets_py3 import DataBoxDiskJobSecrets + from .data_box_heavy_account_copy_log_details_py3 import DataBoxHeavyAccountCopyLogDetails + from .data_box_heavy_job_details_py3 import DataBoxHeavyJobDetails + from .data_box_heavy_secret_py3 import DataBoxHeavySecret + from .data_box_heavy_job_secrets_py3 import DataBoxHeavyJobSecrets + from .data_box_job_details_py3 import DataBoxJobDetails + from .data_box_secret_py3 import DataBoxSecret + from .databox_job_secrets_py3 import DataboxJobSecrets + from .destination_account_details_py3 import DestinationAccountDetails + from .error_py3 import Error + from .job_error_details_py3 import JobErrorDetails + from .job_stages_py3 import JobStages + from .package_shipping_details_py3 import PackageShippingDetails + from .preferences_py3 import Preferences + from .job_details_py3 import JobDetails + from .job_resource_py3 import JobResource + from .update_job_details_py3 import UpdateJobDetails + from .job_resource_update_parameter_py3 import JobResourceUpdateParameter + from .job_secrets_py3 import JobSecrets + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .resource_py3 import Resource + from .shipment_pick_up_request_py3 import ShipmentPickUpRequest + from .shipment_pick_up_response_py3 import ShipmentPickUpResponse + from .unencrypted_credentials_py3 import UnencryptedCredentials + from .validate_address_py3 import ValidateAddress +except (SyntaxError, ImportError): + from .share_credential_details import ShareCredentialDetails + from .account_credential_details import AccountCredentialDetails + from .shipping_address import ShippingAddress + from .address_validation_output import AddressValidationOutput + from .appliance_network_configuration import ApplianceNetworkConfiguration + from .arm_base_object import ArmBaseObject + from .available_sku_request import AvailableSkuRequest + from .sku import Sku + from .destination_to_service_location_map import DestinationToServiceLocationMap + from .sku_capacity import SkuCapacity + from .sku_cost import SkuCost + from .sku_information import SkuInformation + from .cancellation_reason import CancellationReason + from .notification_preference import NotificationPreference + from .contact_details import ContactDetails + from .copy_log_details import CopyLogDetails + from .copy_progress import CopyProgress + from .data_box_account_copy_log_details import DataBoxAccountCopyLogDetails + from .data_box_disk_copy_log_details import DataBoxDiskCopyLogDetails + from .data_box_disk_copy_progress import DataBoxDiskCopyProgress + from .data_box_disk_job_details import DataBoxDiskJobDetails + from .disk_secret import DiskSecret + from .data_box_disk_job_secrets import DataBoxDiskJobSecrets + from .data_box_heavy_account_copy_log_details import DataBoxHeavyAccountCopyLogDetails + from .data_box_heavy_job_details import DataBoxHeavyJobDetails + from .data_box_heavy_secret import DataBoxHeavySecret + from .data_box_heavy_job_secrets import DataBoxHeavyJobSecrets + from .data_box_job_details import DataBoxJobDetails + from .data_box_secret import DataBoxSecret + from .databox_job_secrets import DataboxJobSecrets + from .destination_account_details import DestinationAccountDetails + from .error import Error + from .job_error_details import JobErrorDetails + from .job_stages import JobStages + from .package_shipping_details import PackageShippingDetails + from .preferences import Preferences + from .job_details import JobDetails + from .job_resource import JobResource + from .update_job_details import UpdateJobDetails + from .job_resource_update_parameter import JobResourceUpdateParameter + from .job_secrets import JobSecrets + from .operation_display import OperationDisplay + from .operation import Operation + from .resource import Resource + from .shipment_pick_up_request import ShipmentPickUpRequest + from .shipment_pick_up_response import ShipmentPickUpResponse + from .unencrypted_credentials import UnencryptedCredentials + from .validate_address import ValidateAddress +from .operation_paged import OperationPaged +from .job_resource_paged import JobResourcePaged +from .unencrypted_credentials_paged import UnencryptedCredentialsPaged +from .sku_information_paged import SkuInformationPaged +from .data_box_management_client_enums import ( + ShareDestinationFormatType, + AccessProtocol, + AddressValidationStatus, + AddressType, + SkuName, + SkuDisabledReason, + NotificationStageName, + CopyStatus, + StageName, + StageStatus, +) + +__all__ = [ + 'ShareCredentialDetails', + 'AccountCredentialDetails', + 'ShippingAddress', + 'AddressValidationOutput', + 'ApplianceNetworkConfiguration', + 'ArmBaseObject', + 'AvailableSkuRequest', + 'Sku', + 'DestinationToServiceLocationMap', + 'SkuCapacity', + 'SkuCost', + 'SkuInformation', + 'CancellationReason', + 'NotificationPreference', + 'ContactDetails', + 'CopyLogDetails', + 'CopyProgress', + 'DataBoxAccountCopyLogDetails', + 'DataBoxDiskCopyLogDetails', + 'DataBoxDiskCopyProgress', + 'DataBoxDiskJobDetails', + 'DiskSecret', + 'DataBoxDiskJobSecrets', + 'DataBoxHeavyAccountCopyLogDetails', + 'DataBoxHeavyJobDetails', + 'DataBoxHeavySecret', + 'DataBoxHeavyJobSecrets', + 'DataBoxJobDetails', + 'DataBoxSecret', + 'DataboxJobSecrets', + 'DestinationAccountDetails', + 'Error', + 'JobErrorDetails', + 'JobStages', + 'PackageShippingDetails', + 'Preferences', + 'JobDetails', + 'JobResource', + 'UpdateJobDetails', + 'JobResourceUpdateParameter', + 'JobSecrets', + 'OperationDisplay', + 'Operation', + 'Resource', + 'ShipmentPickUpRequest', + 'ShipmentPickUpResponse', + 'UnencryptedCredentials', + 'ValidateAddress', + 'OperationPaged', + 'JobResourcePaged', + 'UnencryptedCredentialsPaged', + 'SkuInformationPaged', + 'ShareDestinationFormatType', + 'AccessProtocol', + 'AddressValidationStatus', + 'AddressType', + 'SkuName', + 'SkuDisabledReason', + 'NotificationStageName', + 'CopyStatus', + 'StageName', + 'StageStatus', +] diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/account_credential_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/account_credential_details.py new file mode 100644 index 000000000000..f1536b10272d --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/account_credential_details.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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/account_credential_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/account_credential_details_py3.py new file mode 100644 index 000000000000..2067acdb6c46 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/account_credential_details_py3.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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/address_validation_output.py b/azure-mgmt-databox/azure/mgmt/databox/models/address_validation_output.py new file mode 100644 index 000000000000..e85447b6f9ac --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/address_validation_output.py @@ -0,0 +1,43 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/address_validation_output_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/address_validation_output_py3.py new file mode 100644 index 000000000000..d86db21d1ee6 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/address_validation_output_py3.py @@ -0,0 +1,43 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/appliance_network_configuration.py b/azure-mgmt-databox/azure/mgmt/databox/models/appliance_network_configuration.py new file mode 100644 index 000000000000..e52a76e03246 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/appliance_network_configuration.py @@ -0,0 +1,40 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/appliance_network_configuration_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/appliance_network_configuration_py3.py new file mode 100644 index 000000000000..142ba44a5287 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/appliance_network_configuration_py3.py @@ -0,0 +1,40 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/arm_base_object.py b/azure-mgmt-databox/azure/mgmt/databox/models/arm_base_object.py new file mode 100644 index 000000000000..2f79b3dc4132 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/arm_base_object.py @@ -0,0 +1,45 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/arm_base_object_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/arm_base_object_py3.py new file mode 100644 index 000000000000..fe98c7b91791 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/arm_base_object_py3.py @@ -0,0 +1,45 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request.py b/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request.py new file mode 100644 index 000000000000..169fecad0d74 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request.py @@ -0,0 +1,53 @@ +# 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 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 + """ + + _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'}, + } + + transfer_type = "ImportToAzure" + + def __init__(self, **kwargs): + super(AvailableSkuRequest, self).__init__(**kwargs) + self.country = kwargs.get('country', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request_py3.py new file mode 100644 index 000000000000..315a1e1163f2 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request_py3.py @@ -0,0 +1,53 @@ +# 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 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 + """ + + _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'}, + } + + transfer_type = "ImportToAzure" + + def __init__(self, *, country: str, location: str, **kwargs) -> None: + super(AvailableSkuRequest, self).__init__(**kwargs) + self.country = country + self.location = location diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/cancellation_reason.py b/azure-mgmt-databox/azure/mgmt/databox/models/cancellation_reason.py new file mode 100644 index 000000000000..d70e29ef5cb9 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/cancellation_reason.py @@ -0,0 +1,34 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/cancellation_reason_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/cancellation_reason_py3.py new file mode 100644 index 000000000000..ceddbc89ff08 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/cancellation_reason_py3.py @@ -0,0 +1,34 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/contact_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/contact_details.py new file mode 100644 index 000000000000..83357f960c88 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/contact_details.py @@ -0,0 +1,58 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/contact_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/contact_details_py3.py new file mode 100644 index 000000000000..e38528359cc2 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/contact_details_py3.py @@ -0,0 +1,58 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/copy_log_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/copy_log_details.py new file mode 100644 index 000000000000..75abe8eb35ba --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/copy_log_details.py @@ -0,0 +1,42 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/copy_log_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/copy_log_details_py3.py new file mode 100644 index 000000000000..58150e3bdac1 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/copy_log_details_py3.py @@ -0,0 +1,42 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/copy_progress.py b/azure-mgmt-databox/azure/mgmt/databox/models/copy_progress.py new file mode 100644 index 000000000000..a405c0bc3ba6 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/copy_progress.py @@ -0,0 +1,52 @@ +# 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 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 + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_sent_to_cloud': {'readonly': True}, + 'total_bytes_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'}, + } + + 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/copy_progress_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/copy_progress_py3.py new file mode 100644 index 000000000000..9ccf9606c976 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/copy_progress_py3.py @@ -0,0 +1,52 @@ +# 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 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 + """ + + _validation = { + 'storage_account_name': {'readonly': True}, + 'account_id': {'readonly': True}, + 'bytes_sent_to_cloud': {'readonly': True}, + 'total_bytes_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'}, + } + + 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_account_copy_log_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_account_copy_log_details.py new file mode 100644 index 000000000000..7a13159785e4 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_account_copy_log_details.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .copy_log_details import CopyLogDetails + + +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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_account_copy_log_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_account_copy_log_details_py3.py new file mode 100644 index 000000000000..06146412b40e --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_account_copy_log_details_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .copy_log_details_py3 import CopyLogDetails + + +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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_log_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_log_details.py new file mode 100644 index 000000000000..30faf323ee08 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_log_details.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .copy_log_details import CopyLogDetails + + +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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_log_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_log_details_py3.py new file mode 100644 index 000000000000..a62fb2ca461a --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_log_details_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .copy_log_details_py3 import CopyLogDetails + + +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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_progress.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_progress.py new file mode 100644 index 000000000000..bd5a3f43fc4f --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_progress.py @@ -0,0 +1,53 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_progress_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_progress_py3.py new file mode 100644 index 000000000000..ccdd35d04ea0 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_copy_progress_py3.py @@ -0,0 +1,53 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_details.py new file mode 100644 index 000000000000..090a6a3e96e3 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_details.py @@ -0,0 +1,112 @@ +# 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 .job_details import JobDetails + + +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 transfered in this job, in tera bytes. + :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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_details_py3.py new file mode 100644 index 000000000000..900972baea87 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_details_py3.py @@ -0,0 +1,112 @@ +# 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 .job_details_py3 import JobDetails + + +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 transfered in this job, in tera bytes. + :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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_secrets.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_secrets.py new file mode 100644 index 000000000000..d1ed3b6305ca --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_secrets.py @@ -0,0 +1,52 @@ +# 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 .job_secrets import JobSecrets + + +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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_secrets_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_secrets_py3.py new file mode 100644 index 000000000000..d33369c573f1 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_disk_job_secrets_py3.py @@ -0,0 +1,52 @@ +# 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 .job_secrets_py3 import JobSecrets + + +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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_account_copy_log_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_account_copy_log_details.py new file mode 100644 index 000000000000..7d568a6d5222 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_account_copy_log_details.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .copy_log_details import CopyLogDetails + + +class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account for Databox heavy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Constant filled by server. + :type copy_log_details_type: str + :ivar account_name: 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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_account_copy_log_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_account_copy_log_details_py3.py new file mode 100644 index 000000000000..80893b4ad9fa --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_account_copy_log_details_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .copy_log_details_py3 import CopyLogDetails + + +class DataBoxHeavyAccountCopyLogDetails(CopyLogDetails): + """Copy log details for a storage account for Databox heavy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param copy_log_details_type: Required. Constant filled by server. + :type copy_log_details_type: str + :ivar account_name: 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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_details.py new file mode 100644 index 000000000000..28e90cfa1310 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_details.py @@ -0,0 +1,94 @@ +# 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 .job_details import JobDetails + + +class DataBoxHeavyJobDetails(JobDetails): + """Databox Heavy Device Job Details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param expected_data_size_in_tera_bytes: The expected size of the data, + which needs to be transfered in this job, in tera bytes. + :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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_details_py3.py new file mode 100644 index 000000000000..6d6f52b4b4ee --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_details_py3.py @@ -0,0 +1,94 @@ +# 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 .job_details_py3 import JobDetails + + +class DataBoxHeavyJobDetails(JobDetails): + """Databox Heavy Device Job Details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param expected_data_size_in_tera_bytes: The expected size of the data, + which needs to be transfered in this job, in tera bytes. + :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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_secrets.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_secrets.py new file mode 100644 index 000000000000..24754780e5ef --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_secrets.py @@ -0,0 +1,44 @@ +# 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 .job_secrets import JobSecrets + + +class DataBoxHeavyJobSecrets(JobSecrets): + """The secrets related to a databox heavy job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :ivar cabinet_pod_secrets: Contains the list of secret objects for a + databox heavy job. + :vartype cabinet_pod_secrets: + list[~azure.mgmt.databox.models.DataBoxHeavySecret] + """ + + _validation = { + '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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_secrets_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_secrets_py3.py new file mode 100644 index 000000000000..fb6a47e594f6 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_job_secrets_py3.py @@ -0,0 +1,44 @@ +# 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 .job_secrets_py3 import JobSecrets + + +class DataBoxHeavyJobSecrets(JobSecrets): + """The secrets related to a databox heavy job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param job_secrets_type: Required. Constant filled by server. + :type job_secrets_type: str + :ivar cabinet_pod_secrets: Contains the list of secret objects for a + databox heavy job. + :vartype cabinet_pod_secrets: + list[~azure.mgmt.databox.models.DataBoxHeavySecret] + """ + + _validation = { + '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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_secret.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_secret.py new file mode 100644 index 000000000000..9d8a3cfc433b --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_secret.py @@ -0,0 +1,58 @@ +# 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 DataBoxHeavySecret(Model): + """The secrets related to a databox heavy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to + authenticate with the device + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__(self, **kwargs): + super(DataBoxHeavySecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_secret_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_secret_py3.py new file mode 100644 index 000000000000..044958929837 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_heavy_secret_py3.py @@ -0,0 +1,58 @@ +# 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 DataBoxHeavySecret(Model): + """The secrets related to a databox heavy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_serial_number: Serial number of the assigned device. + :vartype device_serial_number: str + :ivar device_password: Password for out of the box experience on device. + :vartype device_password: str + :ivar network_configurations: Network configuration of the appliance. + :vartype network_configurations: + list[~azure.mgmt.databox.models.ApplianceNetworkConfiguration] + :ivar encoded_validation_cert_pub_key: The base 64 encoded public key to + authenticate with the device + :vartype encoded_validation_cert_pub_key: str + :ivar account_credential_details: Per account level access credentials. + :vartype account_credential_details: + list[~azure.mgmt.databox.models.AccountCredentialDetails] + """ + + _validation = { + 'device_serial_number': {'readonly': True}, + 'device_password': {'readonly': True}, + 'network_configurations': {'readonly': True}, + 'encoded_validation_cert_pub_key': {'readonly': True}, + 'account_credential_details': {'readonly': True}, + } + + _attribute_map = { + 'device_serial_number': {'key': 'deviceSerialNumber', 'type': 'str'}, + 'device_password': {'key': 'devicePassword', 'type': 'str'}, + 'network_configurations': {'key': 'networkConfigurations', 'type': '[ApplianceNetworkConfiguration]'}, + 'encoded_validation_cert_pub_key': {'key': 'encodedValidationCertPubKey', 'type': 'str'}, + 'account_credential_details': {'key': 'accountCredentialDetails', 'type': '[AccountCredentialDetails]'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxHeavySecret, self).__init__(**kwargs) + self.device_serial_number = None + self.device_password = None + self.network_configurations = None + self.encoded_validation_cert_pub_key = None + self.account_credential_details = None diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_job_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_job_details.py new file mode 100644 index 000000000000..76be318b7839 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_job_details.py @@ -0,0 +1,94 @@ +# 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 .job_details import JobDetails + + +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 transfered in this job, in tera bytes. + :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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_job_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_job_details_py3.py new file mode 100644 index 000000000000..933f97758e3c --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_job_details_py3.py @@ -0,0 +1,94 @@ +# 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 .job_details_py3 import JobDetails + + +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 transfered in this job, in tera bytes. + :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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_management_client_enums.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_management_client_enums.py new file mode 100644 index 000000000000..3539f0cd45c1 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_management_client_enums.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from 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. + + +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 storage account region. + feature = "Feature" #: Required features are not enabled for the SKU. + offer_type = "OfferType" #: Subscription does not have required offer types for the SKU. + + +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 hasnt 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/azure-mgmt-databox/azure/mgmt/databox/models/data_box_secret.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_secret.py new file mode 100644 index 000000000000..50c434bff60f --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_secret.py @@ -0,0 +1,58 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/data_box_secret_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_secret_py3.py new file mode 100644 index 000000000000..9b2388a250a4 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/data_box_secret_py3.py @@ -0,0 +1,58 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/databox_job_secrets.py b/azure-mgmt-databox/azure/mgmt/databox/models/databox_job_secrets.py new file mode 100644 index 000000000000..9cd1b6515210 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/databox_job_secrets.py @@ -0,0 +1,38 @@ +# 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 .job_secrets import JobSecrets + + +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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/databox_job_secrets_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/databox_job_secrets_py3.py new file mode 100644 index 000000000000..8ec71143c584 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/databox_job_secrets_py3.py @@ -0,0 +1,38 @@ +# 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 .job_secrets_py3 import JobSecrets + + +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' diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/destination_account_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/destination_account_details.py new file mode 100644 index 000000000000..e94706fa9a6e --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/destination_account_details.py @@ -0,0 +1,34 @@ +# 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 DestinationAccountDetails(Model): + """Details for the destination account. + + All required parameters must be populated in order to send to Azure. + + :param account_id: Required. Destination storage account id. + :type account_id: str + """ + + _validation = { + 'account_id': {'required': True}, + } + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DestinationAccountDetails, self).__init__(**kwargs) + self.account_id = kwargs.get('account_id', None) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/destination_account_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/destination_account_details_py3.py new file mode 100644 index 000000000000..48ef12839450 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/destination_account_details_py3.py @@ -0,0 +1,34 @@ +# 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 DestinationAccountDetails(Model): + """Details for the destination account. + + All required parameters must be populated in order to send to Azure. + + :param account_id: Required. Destination storage account id. + :type account_id: str + """ + + _validation = { + 'account_id': {'required': True}, + } + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + } + + def __init__(self, *, account_id: str, **kwargs) -> None: + super(DestinationAccountDetails, self).__init__(**kwargs) + self.account_id = account_id diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/destination_to_service_location_map.py b/azure-mgmt-databox/azure/mgmt/databox/models/destination_to_service_location_map.py new file mode 100644 index 000000000000..c54529f0cb42 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/destination_to_service_location_map.py @@ -0,0 +1,40 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/destination_to_service_location_map_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/destination_to_service_location_map_py3.py new file mode 100644 index 000000000000..76a59cb29de6 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/destination_to_service_location_map_py3.py @@ -0,0 +1,40 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/disk_secret.py b/azure-mgmt-databox/azure/mgmt/databox/models/disk_secret.py new file mode 100644 index 000000000000..c03460ce5357 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/disk_secret.py @@ -0,0 +1,41 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/disk_secret_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/disk_secret_py3.py new file mode 100644 index 000000000000..b55cdb4564ba --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/disk_secret_py3.py @@ -0,0 +1,41 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/error.py b/azure-mgmt-databox/azure/mgmt/databox/models/error.py new file mode 100644 index 000000000000..ee4bb139b050 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/error.py @@ -0,0 +1,42 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/error_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/error_py3.py new file mode 100644 index 000000000000..c0a10f36c467 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/error_py3.py @@ -0,0 +1,42 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_details.py new file mode 100644 index 000000000000..1a466c006e93 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_details.py @@ -0,0 +1,109 @@ +# 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 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 transfered in this job, in tera bytes. + :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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_details_py3.py new file mode 100644 index 000000000000..ebca205bcb39 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_details_py3.py @@ -0,0 +1,109 @@ +# 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 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 transfered in this job, in tera bytes. + :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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_error_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_error_details.py new file mode 100644 index 000000000000..7ca5f98e0cf0 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_error_details.py @@ -0,0 +1,50 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_error_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_error_details_py3.py new file mode 100644 index 000000000000..4043d53277df --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_error_details_py3.py @@ -0,0 +1,50 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_resource.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_resource.py new file mode 100644 index 000000000000..1adb347629ed --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_resource.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_paged.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_paged.py new file mode 100644 index 000000000000..e5620085292c --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_paged.py @@ -0,0 +1,27 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_py3.py new file mode 100644 index 000000000000..8f63edd247f8 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_py3.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_update_parameter.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_update_parameter.py new file mode 100644 index 000000000000..a5d035649533 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_update_parameter.py @@ -0,0 +1,39 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_update_parameter_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_update_parameter_py3.py new file mode 100644 index 000000000000..327df34efe00 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_resource_update_parameter_py3.py @@ -0,0 +1,39 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_secrets.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_secrets.py new file mode 100644 index 000000000000..dcc90d4c20f5 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_secrets.py @@ -0,0 +1,42 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_secrets_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_secrets_py3.py new file mode 100644 index 000000000000..ae5eccb5dcac --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_secrets_py3.py @@ -0,0 +1,42 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_stages.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_stages.py new file mode 100644 index 000000000000..ad4f066ffacd --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_stages.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.serialization import Model + + +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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/job_stages_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/job_stages_py3.py new file mode 100644 index 000000000000..946080aad56c --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/job_stages_py3.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.serialization import Model + + +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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/notification_preference.py b/azure-mgmt-databox/azure/mgmt/databox/models/notification_preference.py new file mode 100644 index 000000000000..d7a34a0dd98c --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/notification_preference.py @@ -0,0 +1,41 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/notification_preference_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/notification_preference_py3.py new file mode 100644 index 000000000000..14125639fb4a --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/notification_preference_py3.py @@ -0,0 +1,41 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/operation.py b/azure-mgmt-databox/azure/mgmt/databox/models/operation.py new file mode 100644 index 000000000000..147b2a299c43 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/operation.py @@ -0,0 +1,51 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/operation_display.py b/azure-mgmt-databox/azure/mgmt/databox/models/operation_display.py new file mode 100644 index 000000000000..c38a2e9ab21a --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/operation_display.py @@ -0,0 +1,41 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/operation_display_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/operation_display_py3.py new file mode 100644 index 000000000000..31477eda1bf6 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/operation_display_py3.py @@ -0,0 +1,41 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/operation_paged.py b/azure-mgmt-databox/azure/mgmt/databox/models/operation_paged.py new file mode 100644 index 000000000000..3b0f8251668f --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/operation_paged.py @@ -0,0 +1,27 @@ +# 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/operation_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/operation_py3.py new file mode 100644 index 000000000000..42087363c518 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/operation_py3.py @@ -0,0 +1,51 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/package_shipping_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/package_shipping_details.py new file mode 100644 index 000000000000..9108223c28c3 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/package_shipping_details.py @@ -0,0 +1,45 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/package_shipping_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/package_shipping_details_py3.py new file mode 100644 index 000000000000..3d1e764f2217 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/package_shipping_details_py3.py @@ -0,0 +1,45 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/preferences.py b/azure-mgmt-databox/azure/mgmt/databox/models/preferences.py new file mode 100644 index 000000000000..ebd64d1359a1 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/preferences.py @@ -0,0 +1,28 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/preferences_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/preferences_py3.py new file mode 100644 index 000000000000..76c5b09b99ee --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/preferences_py3.py @@ -0,0 +1,28 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/resource.py b/azure-mgmt-databox/azure/mgmt/databox/models/resource.py new file mode 100644 index 000000000000..566f3564e689 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/resource.py @@ -0,0 +1,49 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/resource_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/resource_py3.py new file mode 100644 index 000000000000..2866153f6491 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/resource_py3.py @@ -0,0 +1,49 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/share_credential_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/share_credential_details.py new file mode 100644 index 000000000000..e13ee8ba70f1 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/share_credential_details.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.serialization import Model + + +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' + :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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/share_credential_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/share_credential_details_py3.py new file mode 100644 index 000000000000..1013c8edbbdd --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/share_credential_details_py3.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.serialization import Model + + +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' + :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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_request.py b/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_request.py new file mode 100644 index 000000000000..c688c959b1f3 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_request.py @@ -0,0 +1,47 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_request_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_request_py3.py new file mode 100644 index 000000000000..abcf0a4bd64c --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_request_py3.py @@ -0,0 +1,47 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_response.py b/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_response.py new file mode 100644 index 000000000000..633e6eefb426 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_response.py @@ -0,0 +1,41 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_response_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_response_py3.py new file mode 100644 index 000000000000..e04b62d7f126 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/shipment_pick_up_response_py3.py @@ -0,0 +1,41 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/shipping_address.py b/azure-mgmt-databox/azure/mgmt/databox/models/shipping_address.py new file mode 100644 index 000000000000..e5d8f35fa10b --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/shipping_address.py @@ -0,0 +1,73 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/shipping_address_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/shipping_address_py3.py new file mode 100644 index 000000000000..8b1efffb3db5 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/shipping_address_py3.py @@ -0,0 +1,73 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/sku.py b/azure-mgmt-databox/azure/mgmt/databox/models/sku.py new file mode 100644 index 000000000000..d4454aed93a6 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/sku.py @@ -0,0 +1,43 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/sku_capacity.py b/azure-mgmt-databox/azure/mgmt/databox/models/sku_capacity.py new file mode 100644 index 000000000000..bbb1f67cfd2f --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/sku_capacity.py @@ -0,0 +1,40 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/sku_capacity_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/sku_capacity_py3.py new file mode 100644 index 000000000000..33aed7c082b6 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/sku_capacity_py3.py @@ -0,0 +1,40 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/sku_cost.py b/azure-mgmt-databox/azure/mgmt/databox/models/sku_cost.py new file mode 100644 index 000000000000..f2a5bee005e0 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/sku_cost.py @@ -0,0 +1,40 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/sku_cost_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/sku_cost_py3.py new file mode 100644 index 000000000000..8f257a7df447 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/sku_cost_py3.py @@ -0,0 +1,40 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/sku_information.py b/azure-mgmt-databox/azure/mgmt/databox/models/sku_information.py new file mode 100644 index 000000000000..340805c3899e --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/sku_information.py @@ -0,0 +1,79 @@ +# 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 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' + :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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/sku_information_paged.py b/azure-mgmt-databox/azure/mgmt/databox/models/sku_information_paged.py new file mode 100644 index 000000000000..7eb0866786c0 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/sku_information_paged.py @@ -0,0 +1,27 @@ +# 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 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/azure-mgmt-databox/azure/mgmt/databox/models/sku_information_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/sku_information_py3.py new file mode 100644 index 000000000000..c6d07418e74e --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/sku_information_py3.py @@ -0,0 +1,79 @@ +# 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 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' + :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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/sku_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/sku_py3.py new file mode 100644 index 000000000000..ba6a2d89f651 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/sku_py3.py @@ -0,0 +1,43 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials.py b/azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials.py new file mode 100644 index 000000000000..659c2c81eb98 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials.py @@ -0,0 +1,40 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials_paged.py b/azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials_paged.py new file mode 100644 index 000000000000..45a947d4f19f --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials_paged.py @@ -0,0 +1,27 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials_py3.py new file mode 100644 index 000000000000..b0577227709c --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/unencrypted_credentials_py3.py @@ -0,0 +1,40 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/update_job_details.py b/azure-mgmt-databox/azure/mgmt/databox/models/update_job_details.py new file mode 100644 index 000000000000..8f313b932738 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/update_job_details.py @@ -0,0 +1,32 @@ +# 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 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/update_job_details_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/update_job_details_py3.py new file mode 100644 index 000000000000..5c16e5fd8155 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/update_job_details_py3.py @@ -0,0 +1,32 @@ +# 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 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/validate_address.py b/azure-mgmt-databox/azure/mgmt/databox/models/validate_address.py new file mode 100644 index 000000000000..fab43d48780e --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/validate_address.py @@ -0,0 +1,41 @@ +# 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 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/azure-mgmt-databox/azure/mgmt/databox/models/validate_address_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/validate_address_py3.py new file mode 100644 index 000000000000..29875a8a0a44 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/models/validate_address_py3.py @@ -0,0 +1,41 @@ +# 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 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/azure-mgmt-databox/azure/mgmt/databox/operations/__init__.py b/azure-mgmt-databox/azure/mgmt/databox/operations/__init__.py new file mode 100644 index 000000000000..0144020fe74d --- /dev/null +++ b/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/azure-mgmt-databox/azure/mgmt/databox/operations/jobs_operations.py b/azure-mgmt-databox/azure/mgmt/databox/operations/jobs_operations.py new file mode 100644 index 000000000000..374713c216b0 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/operations/jobs_operations.py @@ -0,0 +1,752 @@ +# 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. + + :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 internal_paging(next_link=None, raw=False): + + 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) + 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 + deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + 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 internal_paging(next_link=None, raw=False): + + 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) + 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 + deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + 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 internal_paging(next_link=None, raw=False): + + 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) + 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 + deserialized = models.UnencryptedCredentialsPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.UnencryptedCredentialsPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials'} diff --git a/azure-mgmt-databox/azure/mgmt/databox/operations/operations.py b/azure-mgmt-databox/azure/mgmt/databox/operations/operations.py new file mode 100644 index 000000000000..483d61d1362a --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/operations/operations.py @@ -0,0 +1,98 @@ +# 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. + + :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 internal_paging(next_link=None, raw=False): + + 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) + 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 + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DataBox/operations'} diff --git a/azure-mgmt-databox/azure/mgmt/databox/operations/service_operations.py b/azure-mgmt-databox/azure/mgmt/databox/operations/service_operations.py new file mode 100644 index 000000000000..6d6382769b18 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/operations/service_operations.py @@ -0,0 +1,190 @@ +# 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. + + :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, country, location1, 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 country: 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 location1: Location for data transfer. For locations check: + https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + :type location1: 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 SkuInformation + :rtype: + ~azure.mgmt.databox.models.SkuInformationPaged[~azure.mgmt.databox.models.SkuInformation] + :raises: :class:`CloudError` + """ + available_sku_request = models.AvailableSkuRequest(country=country, location=location1) + + def internal_paging(next_link=None, raw=False): + + 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) + 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 + deserialized = models.SkuInformationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SkuInformationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + 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/azure-mgmt-databox/azure/mgmt/databox/version.py b/azure-mgmt-databox/azure/mgmt/databox/version.py new file mode 100644 index 000000000000..b8ffb04f789f --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/databox/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.0.1" + From 4f0bd9078b62858f83c2a918b759254081f31902 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Mon, 17 Sep 2018 16:44:25 +0000 Subject: [PATCH 2/3] Packaging update of azure-mgmt-databox --- azure-mgmt-databox/HISTORY.rst | 9 +++ azure-mgmt-databox/MANIFEST.in | 2 + azure-mgmt-databox/README.rst | 49 +++++++++++++ azure-mgmt-databox/azure/__init__.py | 1 + azure-mgmt-databox/azure/mgmt/__init__.py | 1 + azure-mgmt-databox/azure_bdist_wheel.py | 54 ++++++++++++++ azure-mgmt-databox/sdk_packaging.toml | 6 ++ azure-mgmt-databox/setup.cfg | 3 + azure-mgmt-databox/setup.py | 86 +++++++++++++++++++++++ 9 files changed, 211 insertions(+) create mode 100644 azure-mgmt-databox/HISTORY.rst create mode 100644 azure-mgmt-databox/MANIFEST.in create mode 100644 azure-mgmt-databox/README.rst create mode 100644 azure-mgmt-databox/azure/__init__.py create mode 100644 azure-mgmt-databox/azure/mgmt/__init__.py create mode 100644 azure-mgmt-databox/azure_bdist_wheel.py create mode 100644 azure-mgmt-databox/sdk_packaging.toml create mode 100644 azure-mgmt-databox/setup.cfg create mode 100644 azure-mgmt-databox/setup.py diff --git a/azure-mgmt-databox/HISTORY.rst b/azure-mgmt-databox/HISTORY.rst new file mode 100644 index 000000000000..8924d5d6c445 --- /dev/null +++ b/azure-mgmt-databox/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (1970-01-01) +++++++++++++++++++ + +* Initial Release diff --git a/azure-mgmt-databox/MANIFEST.in b/azure-mgmt-databox/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/azure-mgmt-databox/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-databox/README.rst b/azure-mgmt-databox/README.rst new file mode 100644 index 000000000000..45de4e6b43dd --- /dev/null +++ b/azure-mgmt-databox/README.rst @@ -0,0 +1,49 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure MyService Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `MyService Management +`__ +on docs.microsoft.com. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. diff --git a/azure-mgmt-databox/azure/__init__.py b/azure-mgmt-databox/azure/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/azure-mgmt-databox/azure/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/azure-mgmt-databox/azure/mgmt/__init__.py b/azure-mgmt-databox/azure/mgmt/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/azure-mgmt-databox/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/azure-mgmt-databox/azure_bdist_wheel.py b/azure-mgmt-databox/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/azure-mgmt-databox/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/azure-mgmt-databox/sdk_packaging.toml b/azure-mgmt-databox/sdk_packaging.toml new file mode 100644 index 000000000000..504e54fefe8e --- /dev/null +++ b/azure-mgmt-databox/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-mgmt-databox" +package_pprint_name = "MyService Management" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-databox/setup.cfg b/azure-mgmt-databox/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/azure-mgmt-databox/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-databox/setup.py b/azure-mgmt-databox/setup.py new file mode 100644 index 000000000000..505992723791 --- /dev/null +++ b/azure-mgmt-databox/setup.py @@ -0,0 +1,86 @@ +#!/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 +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-databox" +PACKAGE_PPRINT_NAME = "MyService 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.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + 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.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=["tests"]), + install_requires=[ + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', + 'azure-common~=1.1', + ], + cmdclass=cmdclass +) From bf2489d6a41505bfe121df0899b4ed0f2c40ff94 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 18 Sep 2018 08:46:52 +0000 Subject: [PATCH 3/3] Generated from 7f973829ece4bbb07ce56743d36064b46435e531 Addition of optional list of sku names for filter while getting skuinfo --- .../mgmt/databox/models/available_sku_request.py | 4 ++++ .../databox/models/available_sku_request_py3.py | 6 +++++- .../mgmt/databox/operations/service_operations.py | 14 ++++---------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request.py b/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request.py index 169fecad0d74..3033218ef772 100644 --- a/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request.py +++ b/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request.py @@ -31,6 +31,8 @@ class AvailableSkuRequest(Model): 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 = { @@ -43,6 +45,7 @@ class AvailableSkuRequest(Model): '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" @@ -51,3 +54,4 @@ 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) diff --git a/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request_py3.py b/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request_py3.py index 315a1e1163f2..d5aee1fb5aed 100644 --- a/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request_py3.py +++ b/azure-mgmt-databox/azure/mgmt/databox/models/available_sku_request_py3.py @@ -31,6 +31,8 @@ class AvailableSkuRequest(Model): 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 = { @@ -43,11 +45,13 @@ class AvailableSkuRequest(Model): '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, **kwargs) -> None: + 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 diff --git a/azure-mgmt-databox/azure/mgmt/databox/operations/service_operations.py b/azure-mgmt-databox/azure/mgmt/databox/operations/service_operations.py index 6d6382769b18..f3f58cb964b0 100644 --- a/azure-mgmt-databox/azure/mgmt/databox/operations/service_operations.py +++ b/azure-mgmt-databox/azure/mgmt/databox/operations/service_operations.py @@ -38,19 +38,15 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list_available_skus( - self, location, country, location1, custom_headers=None, raw=False, **operation_config): + 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 country: 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 location1: Location for data transfer. For locations check: - https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 - :type location1: 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 @@ -61,8 +57,6 @@ def list_available_skus( ~azure.mgmt.databox.models.SkuInformationPaged[~azure.mgmt.databox.models.SkuInformation] :raises: :class:`CloudError` """ - available_sku_request = models.AvailableSkuRequest(country=country, location=location1) - def internal_paging(next_link=None, raw=False): if not next_link: