diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/MANIFEST.in b/sdk/databoxedge/azure-mgmt-databoxedge/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/MANIFEST.in +++ b/sdk/databoxedge/azure-mgmt-databoxedge/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/_meta.json b/sdk/databoxedge/azure-mgmt-databoxedge/_meta.json new file mode 100644 index 000000000000..3cc4a0282693 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "38910991e30eb2ab469e7b780ec458cca17bd82a", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/databoxedge/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/databoxedge/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_data_box_edge_management_client.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_data_box_edge_management_client.py index 920b903a82af..09a714cb7eee 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_data_box_edge_management_client.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_data_box_edge_management_client.py @@ -46,11 +46,12 @@ class DataBoxEdgeManagementClient(MultiApiClientMixin, SDKClient): :type profile: azure.profiles.KnownProfiles """ - DEFAULT_API_VERSION = '2019-08-01' + DEFAULT_API_VERSION = '2020-12-01' _PROFILE_TAG = "azure.mgmt.databoxedge.DataBoxEdgeManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, + 'skus': '2019-08-01', }}, _PROFILE_TAG + " latest" ) @@ -76,6 +77,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-07-01: :mod:`v2019_07_01.models` * 2019-08-01: :mod:`v2019_08_01.models` * 2020-05-01-preview: :mod:`v2020_05_01_preview.models` + * 2020-09-01: :mod:`v2020_09_01_preview.models` + * 2020-12-01: :mod:`v2020_12_01.models` + * 2021-02-01-preview: :mod:`v2021_02_01_preview.models` """ if api_version == '2019-03-01': from .v2019_03_01 import models @@ -89,8 +93,36 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-05-01-preview': from .v2020_05_01_preview import models return models + elif api_version == '2020-09-01': + from .v2020_09_01_preview import models + return models + elif api_version == '2020-12-01': + from .v2020_12_01 import models + return models + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) + @property + def addons(self): + """Instance depends on the API version: + + * 2020-09-01: :class:`AddonsOperations` + * 2020-12-01: :class:`AddonsOperations` + * 2021-02-01-preview: :class:`AddonsOperations` + """ + api_version = self._get_api_version('addons') + if api_version == '2020-09-01': + from .v2020_09_01_preview.operations import AddonsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import AddonsOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import AddonsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def alerts(self): """Instance depends on the API version: @@ -99,6 +131,9 @@ def alerts(self): * 2019-07-01: :class:`AlertsOperations` * 2019-08-01: :class:`AlertsOperations` * 2020-05-01-preview: :class:`AlertsOperations` + * 2020-09-01: :class:`AlertsOperations` + * 2020-12-01: :class:`AlertsOperations` + * 2021-02-01-preview: :class:`AlertsOperations` """ api_version = self._get_api_version('alerts') if api_version == '2019-03-01': @@ -109,6 +144,12 @@ def alerts(self): from .v2019_08_01.operations import AlertsOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import AlertsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import AlertsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import AlertsOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import AlertsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -118,10 +159,19 @@ def available_skus(self): """Instance depends on the API version: * 2020-05-01-preview: :class:`AvailableSkusOperations` + * 2020-09-01: :class:`AvailableSkusOperations` + * 2020-12-01: :class:`AvailableSkusOperations` + * 2021-02-01-preview: :class:`AvailableSkusOperations` """ api_version = self._get_api_version('available_skus') if api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import AvailableSkusOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import AvailableSkusOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import AvailableSkusOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import AvailableSkusOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -134,6 +184,9 @@ def bandwidth_schedules(self): * 2019-07-01: :class:`BandwidthSchedulesOperations` * 2019-08-01: :class:`BandwidthSchedulesOperations` * 2020-05-01-preview: :class:`BandwidthSchedulesOperations` + * 2020-09-01: :class:`BandwidthSchedulesOperations` + * 2020-12-01: :class:`BandwidthSchedulesOperations` + * 2021-02-01-preview: :class:`BandwidthSchedulesOperations` """ api_version = self._get_api_version('bandwidth_schedules') if api_version == '2019-03-01': @@ -144,6 +197,12 @@ def bandwidth_schedules(self): from .v2019_08_01.operations import BandwidthSchedulesOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import BandwidthSchedulesOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import BandwidthSchedulesOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import BandwidthSchedulesOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import BandwidthSchedulesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -154,12 +213,21 @@ def containers(self): * 2019-08-01: :class:`ContainersOperations` * 2020-05-01-preview: :class:`ContainersOperations` + * 2020-09-01: :class:`ContainersOperations` + * 2020-12-01: :class:`ContainersOperations` + * 2021-02-01-preview: :class:`ContainersOperations` """ api_version = self._get_api_version('containers') if api_version == '2019-08-01': from .v2019_08_01.operations import ContainersOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import ContainersOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import ContainersOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import ContainersOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ContainersOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -172,6 +240,9 @@ def devices(self): * 2019-07-01: :class:`DevicesOperations` * 2019-08-01: :class:`DevicesOperations` * 2020-05-01-preview: :class:`DevicesOperations` + * 2020-09-01: :class:`DevicesOperations` + * 2020-12-01: :class:`DevicesOperations` + * 2021-02-01-preview: :class:`DevicesOperations` """ api_version = self._get_api_version('devices') if api_version == '2019-03-01': @@ -182,6 +253,12 @@ def devices(self): from .v2019_08_01.operations import DevicesOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import DevicesOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import DevicesOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import DevicesOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import DevicesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -194,6 +271,9 @@ def jobs(self): * 2019-07-01: :class:`JobsOperations` * 2019-08-01: :class:`JobsOperations` * 2020-05-01-preview: :class:`JobsOperations` + * 2020-09-01: :class:`JobsOperations` + * 2020-12-01: :class:`JobsOperations` + * 2021-02-01-preview: :class:`JobsOperations` """ api_version = self._get_api_version('jobs') if api_version == '2019-03-01': @@ -204,6 +284,31 @@ def jobs(self): from .v2019_08_01.operations import JobsOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import JobsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import JobsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import JobsOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import JobsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def monitoring_config(self): + """Instance depends on the API version: + + * 2020-09-01: :class:`MonitoringConfigOperations` + * 2020-12-01: :class:`MonitoringConfigOperations` + * 2021-02-01-preview: :class:`MonitoringConfigOperations` + """ + api_version = self._get_api_version('monitoring_config') + if api_version == '2020-09-01': + from .v2020_09_01_preview.operations import MonitoringConfigOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import MonitoringConfigOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import MonitoringConfigOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -215,6 +320,9 @@ def nodes(self): * 2019-07-01: :class:`NodesOperations` * 2019-08-01: :class:`NodesOperations` * 2020-05-01-preview: :class:`NodesOperations` + * 2020-09-01: :class:`NodesOperations` + * 2020-12-01: :class:`NodesOperations` + * 2021-02-01-preview: :class:`NodesOperations` """ api_version = self._get_api_version('nodes') if api_version == '2019-07-01': @@ -223,6 +331,12 @@ def nodes(self): from .v2019_08_01.operations import NodesOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import NodesOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import NodesOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import NodesOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NodesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -235,6 +349,9 @@ def operations(self): * 2019-07-01: :class:`Operations` * 2019-08-01: :class:`Operations` * 2020-05-01-preview: :class:`Operations` + * 2020-09-01: :class:`Operations` + * 2020-12-01: :class:`Operations` + * 2021-02-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2019-03-01': @@ -245,6 +362,12 @@ def operations(self): from .v2019_08_01.operations import Operations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import Operations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import Operations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import Operations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import Operations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -257,6 +380,9 @@ def operations_status(self): * 2019-07-01: :class:`OperationsStatusOperations` * 2019-08-01: :class:`OperationsStatusOperations` * 2020-05-01-preview: :class:`OperationsStatusOperations` + * 2020-09-01: :class:`OperationsStatusOperations` + * 2020-12-01: :class:`OperationsStatusOperations` + * 2021-02-01-preview: :class:`OperationsStatusOperations` """ api_version = self._get_api_version('operations_status') if api_version == '2019-03-01': @@ -267,6 +393,12 @@ def operations_status(self): from .v2019_08_01.operations import OperationsStatusOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import OperationsStatusOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import OperationsStatusOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import OperationsStatusOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import OperationsStatusOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -279,6 +411,9 @@ def orders(self): * 2019-07-01: :class:`OrdersOperations` * 2019-08-01: :class:`OrdersOperations` * 2020-05-01-preview: :class:`OrdersOperations` + * 2020-09-01: :class:`OrdersOperations` + * 2020-12-01: :class:`OrdersOperations` + * 2021-02-01-preview: :class:`OrdersOperations` """ api_version = self._get_api_version('orders') if api_version == '2019-03-01': @@ -289,6 +424,12 @@ def orders(self): from .v2019_08_01.operations import OrdersOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import OrdersOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import OrdersOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import OrdersOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import OrdersOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -301,6 +442,9 @@ def roles(self): * 2019-07-01: :class:`RolesOperations` * 2019-08-01: :class:`RolesOperations` * 2020-05-01-preview: :class:`RolesOperations` + * 2020-09-01: :class:`RolesOperations` + * 2020-12-01: :class:`RolesOperations` + * 2021-02-01-preview: :class:`RolesOperations` """ api_version = self._get_api_version('roles') if api_version == '2019-03-01': @@ -311,6 +455,12 @@ def roles(self): from .v2019_08_01.operations import RolesOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import RolesOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import RolesOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import RolesOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import RolesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -323,6 +473,9 @@ def shares(self): * 2019-07-01: :class:`SharesOperations` * 2019-08-01: :class:`SharesOperations` * 2020-05-01-preview: :class:`SharesOperations` + * 2020-09-01: :class:`SharesOperations` + * 2020-12-01: :class:`SharesOperations` + * 2021-02-01-preview: :class:`SharesOperations` """ api_version = self._get_api_version('shares') if api_version == '2019-03-01': @@ -333,6 +486,12 @@ def shares(self): from .v2019_08_01.operations import SharesOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import SharesOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import SharesOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import SharesOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import SharesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -361,6 +520,9 @@ def storage_account_credentials(self): * 2019-07-01: :class:`StorageAccountCredentialsOperations` * 2019-08-01: :class:`StorageAccountCredentialsOperations` * 2020-05-01-preview: :class:`StorageAccountCredentialsOperations` + * 2020-09-01: :class:`StorageAccountCredentialsOperations` + * 2020-12-01: :class:`StorageAccountCredentialsOperations` + * 2021-02-01-preview: :class:`StorageAccountCredentialsOperations` """ api_version = self._get_api_version('storage_account_credentials') if api_version == '2019-03-01': @@ -371,6 +533,12 @@ def storage_account_credentials(self): from .v2019_08_01.operations import StorageAccountCredentialsOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import StorageAccountCredentialsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import StorageAccountCredentialsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import StorageAccountCredentialsOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import StorageAccountCredentialsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -381,12 +549,21 @@ def storage_accounts(self): * 2019-08-01: :class:`StorageAccountsOperations` * 2020-05-01-preview: :class:`StorageAccountsOperations` + * 2020-09-01: :class:`StorageAccountsOperations` + * 2020-12-01: :class:`StorageAccountsOperations` + * 2021-02-01-preview: :class:`StorageAccountsOperations` """ api_version = self._get_api_version('storage_accounts') if api_version == '2019-08-01': from .v2019_08_01.operations import StorageAccountsOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import StorageAccountsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import StorageAccountsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import StorageAccountsOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import StorageAccountsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -399,6 +576,9 @@ def triggers(self): * 2019-07-01: :class:`TriggersOperations` * 2019-08-01: :class:`TriggersOperations` * 2020-05-01-preview: :class:`TriggersOperations` + * 2020-09-01: :class:`TriggersOperations` + * 2020-12-01: :class:`TriggersOperations` + * 2021-02-01-preview: :class:`TriggersOperations` """ api_version = self._get_api_version('triggers') if api_version == '2019-03-01': @@ -409,6 +589,12 @@ def triggers(self): from .v2019_08_01.operations import TriggersOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import TriggersOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import TriggersOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import TriggersOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import TriggersOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -421,6 +607,9 @@ def users(self): * 2019-07-01: :class:`UsersOperations` * 2019-08-01: :class:`UsersOperations` * 2020-05-01-preview: :class:`UsersOperations` + * 2020-09-01: :class:`UsersOperations` + * 2020-12-01: :class:`UsersOperations` + * 2021-02-01-preview: :class:`UsersOperations` """ api_version = self._get_api_version('users') if api_version == '2019-03-01': @@ -431,6 +620,12 @@ def users(self): from .v2019_08_01.operations import UsersOperations as OperationClass elif api_version == '2020-05-01-preview': from .v2020_05_01_preview.operations import UsersOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01_preview.operations import UsersOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import UsersOperations as OperationClass + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import UsersOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models.py index 11b69d16b48b..1114e942afb8 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models.py @@ -5,3 +5,4 @@ # license information. # -------------------------------------------------------------------------- from .v2019_08_01.models import * +from .v2020_12_01.models import * diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/__init__.py index 73219e469793..9a97433373d3 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/__init__.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/__init__.py @@ -60,7 +60,6 @@ from ._models_py3 import Sku from ._models_py3 import SKUCapability from ._models_py3 import SkuCost - from ._models_py3 import SKUCost from ._models_py3 import SkuInformation from ._models_py3 import SkuLocationInfo from ._models_py3 import SkuRestriction @@ -128,7 +127,6 @@ from ._models import Sku from ._models import SKUCapability from ._models import SkuCost - from ._models import SKUCost from ._models import SkuInformation from ._models import SkuLocationInfo from ._models import SkuRestriction @@ -259,7 +257,6 @@ 'Sku', 'SKUCapability', 'SkuCost', - 'SKUCost', 'SkuInformation', 'SkuLocationInfo', 'SkuRestriction', diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/_models.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/_models.py index df95b322d685..212c679b248c 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/_models.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/_models.py @@ -2412,39 +2412,6 @@ def __init__(self, **kwargs): self.extended_unit = None -class SKUCost(Model): - """The cost of the SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_id: The meter id - :vartype meter_id: str - :ivar quantity: The quantity - :vartype quantity: int - :ivar extended_unit: The extended unit - :vartype extended_unit: str - """ - - _validation = { - 'meter_id': {'readonly': True}, - 'quantity': {'readonly': True}, - 'extended_unit': {'readonly': True}, - } - - _attribute_map = { - 'meter_id': {'key': 'meterId', 'type': 'str'}, - 'quantity': {'key': 'quantity', 'type': 'int'}, - 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SKUCost, self).__init__(**kwargs) - self.meter_id = None - self.quantity = None - self.extended_unit = None - - class SkuInformation(Model): """Sku information. @@ -2476,7 +2443,7 @@ class SkuInformation(Model): available. :vartype required_features: list[str] :ivar costs: The cost of the SKU - :vartype costs: list[~azure.mgmt.databoxedge.models.SKUCost] + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] :ivar capabilities: The capabilities of the SKU :vartype capabilities: list[~azure.mgmt.databoxedge.models.SKUCapability] """ @@ -2507,7 +2474,7 @@ class SkuInformation(Model): 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, 'required_quota_ids': {'key': 'requiredQuotaIds', 'type': '[str]'}, 'required_features': {'key': 'requiredFeatures', 'type': '[str]'}, - 'costs': {'key': 'costs', 'type': '[SKUCost]'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, } diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/_models_py3.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/_models_py3.py index 0f8126a1c92e..63ded995af97 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/_models_py3.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/models/_models_py3.py @@ -2412,39 +2412,6 @@ def __init__(self, **kwargs) -> None: self.extended_unit = None -class SKUCost(Model): - """The cost of the SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_id: The meter id - :vartype meter_id: str - :ivar quantity: The quantity - :vartype quantity: int - :ivar extended_unit: The extended unit - :vartype extended_unit: str - """ - - _validation = { - 'meter_id': {'readonly': True}, - 'quantity': {'readonly': True}, - 'extended_unit': {'readonly': True}, - } - - _attribute_map = { - 'meter_id': {'key': 'meterId', 'type': 'str'}, - 'quantity': {'key': 'quantity', 'type': 'int'}, - 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SKUCost, self).__init__(**kwargs) - self.meter_id = None - self.quantity = None - self.extended_unit = None - - class SkuInformation(Model): """Sku information. @@ -2476,7 +2443,7 @@ class SkuInformation(Model): available. :vartype required_features: list[str] :ivar costs: The cost of the SKU - :vartype costs: list[~azure.mgmt.databoxedge.models.SKUCost] + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] :ivar capabilities: The capabilities of the SKU :vartype capabilities: list[~azure.mgmt.databoxedge.models.SKUCapability] """ @@ -2507,7 +2474,7 @@ class SkuInformation(Model): 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, 'required_quota_ids': {'key': 'requiredQuotaIds', 'type': '[str]'}, 'required_features': {'key': 'requiredFeatures', 'type': '[str]'}, - 'costs': {'key': 'costs', 'type': '[SKUCost]'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, } diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/__init__.py new file mode 100644 index 000000000000..5e369aac5f6e --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._configuration import DataBoxEdgeManagementClientConfiguration +from ._data_box_edge_management_client import DataBoxEdgeManagementClient +__all__ = ['DataBoxEdgeManagementClient', 'DataBoxEdgeManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/_configuration.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/_configuration.py new file mode 100644 index 000000000000..c234603c9bea --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class DataBoxEdgeManagementClientConfiguration(AzureConfiguration): + """Configuration for DataBoxEdgeManagementClient + 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(DataBoxEdgeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-databoxedge/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/_data_box_edge_management_client.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/_data_box_edge_management_client.py new file mode 100644 index 000000000000..463e7e8b9930 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/_data_box_edge_management_client.py @@ -0,0 +1,134 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import DataBoxEdgeManagementClientConfiguration +from .operations import Operations +from .operations import AvailableSkusOperations +from .operations import DevicesOperations +from .operations import AlertsOperations +from .operations import BandwidthSchedulesOperations +from .operations import JobsOperations +from .operations import NodesOperations +from .operations import OperationsStatusOperations +from .operations import OrdersOperations +from .operations import RolesOperations +from .operations import AddonsOperations +from .operations import MonitoringConfigOperations +from .operations import SharesOperations +from .operations import StorageAccountCredentialsOperations +from .operations import StorageAccountsOperations +from .operations import ContainersOperations +from .operations import TriggersOperations +from .operations import UsersOperations +from . import models + + +class DataBoxEdgeManagementClient(SDKClient): + """DataBoxEdgeManagementClient + + :ivar config: Configuration for client. + :vartype config: DataBoxEdgeManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databoxedge.operations.Operations + :ivar available_skus: AvailableSkus operations + :vartype available_skus: azure.mgmt.databoxedge.operations.AvailableSkusOperations + :ivar devices: Devices operations + :vartype devices: azure.mgmt.databoxedge.operations.DevicesOperations + :ivar alerts: Alerts operations + :vartype alerts: azure.mgmt.databoxedge.operations.AlertsOperations + :ivar bandwidth_schedules: BandwidthSchedules operations + :vartype bandwidth_schedules: azure.mgmt.databoxedge.operations.BandwidthSchedulesOperations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.databoxedge.operations.JobsOperations + :ivar nodes: Nodes operations + :vartype nodes: azure.mgmt.databoxedge.operations.NodesOperations + :ivar operations_status: OperationsStatus operations + :vartype operations_status: azure.mgmt.databoxedge.operations.OperationsStatusOperations + :ivar orders: Orders operations + :vartype orders: azure.mgmt.databoxedge.operations.OrdersOperations + :ivar roles: Roles operations + :vartype roles: azure.mgmt.databoxedge.operations.RolesOperations + :ivar addons: Addons operations + :vartype addons: azure.mgmt.databoxedge.operations.AddonsOperations + :ivar monitoring_config: MonitoringConfig operations + :vartype monitoring_config: azure.mgmt.databoxedge.operations.MonitoringConfigOperations + :ivar shares: Shares operations + :vartype shares: azure.mgmt.databoxedge.operations.SharesOperations + :ivar storage_account_credentials: StorageAccountCredentials operations + :vartype storage_account_credentials: azure.mgmt.databoxedge.operations.StorageAccountCredentialsOperations + :ivar storage_accounts: StorageAccounts operations + :vartype storage_accounts: azure.mgmt.databoxedge.operations.StorageAccountsOperations + :ivar containers: Containers operations + :vartype containers: azure.mgmt.databoxedge.operations.ContainersOperations + :ivar triggers: Triggers operations + :vartype triggers: azure.mgmt.databoxedge.operations.TriggersOperations + :ivar users: Users operations + :vartype users: azure.mgmt.databoxedge.operations.UsersOperations + + :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 = DataBoxEdgeManagementClientConfiguration(credentials, subscription_id, base_url) + super(DataBoxEdgeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2020-09-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.available_skus = AvailableSkusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.devices = DevicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.alerts = AlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.bandwidth_schedules = BandwidthSchedulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.nodes = NodesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations_status = OperationsStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.orders = OrdersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.roles = RolesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.addons = AddonsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.monitoring_config = MonitoringConfigOperations( + self._client, self.config, self._serialize, self._deserialize) + self.shares = SharesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.storage_account_credentials = StorageAccountCredentialsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.storage_accounts = StorageAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.containers = ContainersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.triggers = TriggersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.users = UsersOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/__init__.py new file mode 100644 index 000000000000..4cfdeaeed2e2 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/__init__.py @@ -0,0 +1,455 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Addon + from ._models_py3 import Address + from ._models_py3 import Alert + from ._models_py3 import AlertErrorDetails + from ._models_py3 import ArcAddon + from ._models_py3 import ARMBaseModel + from ._models_py3 import AsymmetricEncryptedSecret + from ._models_py3 import Authentication + from ._models_py3 import AzureContainerInfo + from ._models_py3 import BandwidthSchedule + from ._models_py3 import ClientAccessRight + from ._models_py3 import CloudEdgeManagementRole + from ._models_py3 import CniConfig + from ._models_py3 import ComputeResource + from ._models_py3 import ContactDetails + from ._models_py3 import Container + from ._models_py3 import DataBoxEdgeDevice + from ._models_py3 import DataBoxEdgeDeviceExtendedInfo + from ._models_py3 import DataBoxEdgeDeviceExtendedInfoPatch + from ._models_py3 import DataBoxEdgeDevicePatch + from ._models_py3 import DataBoxEdgeMoveRequest + from ._models_py3 import DataBoxEdgeSku + from ._models_py3 import DCAccessCode + from ._models_py3 import EdgeProfile + from ._models_py3 import EdgeProfilePatch + from ._models_py3 import EdgeProfileSubscription + from ._models_py3 import EdgeProfileSubscriptionPatch + from ._models_py3 import EtcdInfo + from ._models_py3 import FileEventTrigger + from ._models_py3 import FileSourceInfo + from ._models_py3 import GenerateCertResponse + from ._models_py3 import ImageRepositoryCredential + from ._models_py3 import IoTAddon + from ._models_py3 import IoTDeviceInfo + from ._models_py3 import IoTEdgeAgentInfo + from ._models_py3 import IoTRole + from ._models_py3 import Ipv4Config + from ._models_py3 import Ipv6Config + from ._models_py3 import Job + from ._models_py3 import JobErrorDetails + from ._models_py3 import JobErrorItem + from ._models_py3 import KubernetesClusterInfo + from ._models_py3 import KubernetesIPConfiguration + from ._models_py3 import KubernetesRole + from ._models_py3 import KubernetesRoleCompute + from ._models_py3 import KubernetesRoleNetwork + from ._models_py3 import KubernetesRoleResources + from ._models_py3 import KubernetesRoleStorage + from ._models_py3 import KubernetesRoleStorageClassInfo + from ._models_py3 import LoadBalancerConfig + from ._models_py3 import MECRole + from ._models_py3 import MetricConfiguration + from ._models_py3 import MetricCounter + from ._models_py3 import MetricCounterSet + from ._models_py3 import MetricDimension + from ._models_py3 import MetricDimensionV1 + from ._models_py3 import MetricSpecificationV1 + from ._models_py3 import MonitoringMetricConfiguration + from ._models_py3 import MountPointMap + from ._models_py3 import NetworkAdapter + from ._models_py3 import NetworkAdapterPosition + from ._models_py3 import NetworkSettings + from ._models_py3 import Node + from ._models_py3 import NodeInfo + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import Order + from ._models_py3 import OrderStatus + from ._models_py3 import PeriodicTimerEventTrigger + from ._models_py3 import PeriodicTimerSourceInfo + from ._models_py3 import RefreshDetails + from ._models_py3 import ResourceIdentity + from ._models_py3 import ResourceMoveDetails + from ._models_py3 import ResourceTypeSku + from ._models_py3 import Role + from ._models_py3 import RoleSinkInfo + from ._models_py3 import SecuritySettings + from ._models_py3 import ServiceSpecification + from ._models_py3 import Share + from ._models_py3 import ShareAccessRight + from ._models_py3 import Sku + from ._models_py3 import SkuCost + from ._models_py3 import SkuInformation + from ._models_py3 import SkuInformationList + from ._models_py3 import SkuLocationInfo + from ._models_py3 import StorageAccount + from ._models_py3 import StorageAccountCredential + from ._models_py3 import SubscriptionRegisteredFeatures + from ._models_py3 import SymmetricKey + from ._models_py3 import SystemData + from ._models_py3 import TrackingInfo + from ._models_py3 import Trigger + from ._models_py3 import UpdateDownloadProgress + from ._models_py3 import UpdateInstallProgress + from ._models_py3 import UpdateSummary + from ._models_py3 import UploadCertificateRequest + from ._models_py3 import UploadCertificateResponse + from ._models_py3 import User + from ._models_py3 import UserAccessRight +except (SyntaxError, ImportError): + from ._models import Addon + from ._models import Address + from ._models import Alert + from ._models import AlertErrorDetails + from ._models import ArcAddon + from ._models import ARMBaseModel + from ._models import AsymmetricEncryptedSecret + from ._models import Authentication + from ._models import AzureContainerInfo + from ._models import BandwidthSchedule + from ._models import ClientAccessRight + from ._models import CloudEdgeManagementRole + from ._models import CniConfig + from ._models import ComputeResource + from ._models import ContactDetails + from ._models import Container + from ._models import DataBoxEdgeDevice + from ._models import DataBoxEdgeDeviceExtendedInfo + from ._models import DataBoxEdgeDeviceExtendedInfoPatch + from ._models import DataBoxEdgeDevicePatch + from ._models import DataBoxEdgeMoveRequest + from ._models import DataBoxEdgeSku + from ._models import DCAccessCode + from ._models import EdgeProfile + from ._models import EdgeProfilePatch + from ._models import EdgeProfileSubscription + from ._models import EdgeProfileSubscriptionPatch + from ._models import EtcdInfo + from ._models import FileEventTrigger + from ._models import FileSourceInfo + from ._models import GenerateCertResponse + from ._models import ImageRepositoryCredential + from ._models import IoTAddon + from ._models import IoTDeviceInfo + from ._models import IoTEdgeAgentInfo + from ._models import IoTRole + from ._models import Ipv4Config + from ._models import Ipv6Config + from ._models import Job + from ._models import JobErrorDetails + from ._models import JobErrorItem + from ._models import KubernetesClusterInfo + from ._models import KubernetesIPConfiguration + from ._models import KubernetesRole + from ._models import KubernetesRoleCompute + from ._models import KubernetesRoleNetwork + from ._models import KubernetesRoleResources + from ._models import KubernetesRoleStorage + from ._models import KubernetesRoleStorageClassInfo + from ._models import LoadBalancerConfig + from ._models import MECRole + from ._models import MetricConfiguration + from ._models import MetricCounter + from ._models import MetricCounterSet + from ._models import MetricDimension + from ._models import MetricDimensionV1 + from ._models import MetricSpecificationV1 + from ._models import MonitoringMetricConfiguration + from ._models import MountPointMap + from ._models import NetworkAdapter + from ._models import NetworkAdapterPosition + from ._models import NetworkSettings + from ._models import Node + from ._models import NodeInfo + from ._models import Operation + from ._models import OperationDisplay + from ._models import Order + from ._models import OrderStatus + from ._models import PeriodicTimerEventTrigger + from ._models import PeriodicTimerSourceInfo + from ._models import RefreshDetails + from ._models import ResourceIdentity + from ._models import ResourceMoveDetails + from ._models import ResourceTypeSku + from ._models import Role + from ._models import RoleSinkInfo + from ._models import SecuritySettings + from ._models import ServiceSpecification + from ._models import Share + from ._models import ShareAccessRight + from ._models import Sku + from ._models import SkuCost + from ._models import SkuInformation + from ._models import SkuInformationList + from ._models import SkuLocationInfo + from ._models import StorageAccount + from ._models import StorageAccountCredential + from ._models import SubscriptionRegisteredFeatures + from ._models import SymmetricKey + from ._models import SystemData + from ._models import TrackingInfo + from ._models import Trigger + from ._models import UpdateDownloadProgress + from ._models import UpdateInstallProgress + from ._models import UpdateSummary + from ._models import UploadCertificateRequest + from ._models import UploadCertificateResponse + from ._models import User + from ._models import UserAccessRight +from ._paged_models import AddonPaged +from ._paged_models import AlertPaged +from ._paged_models import BandwidthSchedulePaged +from ._paged_models import ContainerPaged +from ._paged_models import DataBoxEdgeDevicePaged +from ._paged_models import DataBoxEdgeSkuPaged +from ._paged_models import MonitoringMetricConfigurationPaged +from ._paged_models import NodePaged +from ._paged_models import OperationPaged +from ._paged_models import OrderPaged +from ._paged_models import RolePaged +from ._paged_models import SharePaged +from ._paged_models import StorageAccountCredentialPaged +from ._paged_models import StorageAccountPaged +from ._paged_models import TriggerPaged +from ._paged_models import UserPaged +from ._data_box_edge_management_client_enums import ( + CreatedByType, + AlertSeverity, + PlatformType, + HostPlatformType, + AddonState, + EncryptionAlgorithm, + AzureContainerDataFormat, + DayOfWeek, + ClientPermissionType, + RoleStatus, + SubscriptionState, + ContainerStatus, + SkuName, + SkuTier, + MsiIdentityType, + DataBoxEdgeDeviceKind, + DataBoxEdgeDeviceStatus, + DeviceType, + RoleTypes, + ResourceMoveStatus, + SkuSignupOption, + SkuVersion, + SkuAvailability, + ShipmentType, + MountType, + JobStatus, + JobType, + UpdateOperationStage, + DownloadPhase, + KubernetesNodeType, + KubernetesState, + PosixComplianceStatus, + MetricUnit, + MetricAggregationType, + MetricCategory, + TimeGrain, + NetworkGroup, + NetworkAdapterStatus, + NetworkAdapterRDMAStatus, + NetworkAdapterDHCPStatus, + NodeStatus, + OrderState, + AuthenticationType, + ShareStatus, + MonitoringStatus, + ShareAccessProtocol, + ShareAccessType, + DataPolicy, + StorageAccountStatus, + SSLStatus, + AccountType, + InstallRebootBehavior, + UpdateOperation, + UserType, +) + +__all__ = [ + 'Addon', + 'Address', + 'Alert', + 'AlertErrorDetails', + 'ArcAddon', + 'ARMBaseModel', + 'AsymmetricEncryptedSecret', + 'Authentication', + 'AzureContainerInfo', + 'BandwidthSchedule', + 'ClientAccessRight', + 'CloudEdgeManagementRole', + 'CniConfig', + 'ComputeResource', + 'ContactDetails', + 'Container', + 'DataBoxEdgeDevice', + 'DataBoxEdgeDeviceExtendedInfo', + 'DataBoxEdgeDeviceExtendedInfoPatch', + 'DataBoxEdgeDevicePatch', + 'DataBoxEdgeMoveRequest', + 'DataBoxEdgeSku', + 'DCAccessCode', + 'EdgeProfile', + 'EdgeProfilePatch', + 'EdgeProfileSubscription', + 'EdgeProfileSubscriptionPatch', + 'EtcdInfo', + 'FileEventTrigger', + 'FileSourceInfo', + 'GenerateCertResponse', + 'ImageRepositoryCredential', + 'IoTAddon', + 'IoTDeviceInfo', + 'IoTEdgeAgentInfo', + 'IoTRole', + 'Ipv4Config', + 'Ipv6Config', + 'Job', + 'JobErrorDetails', + 'JobErrorItem', + 'KubernetesClusterInfo', + 'KubernetesIPConfiguration', + 'KubernetesRole', + 'KubernetesRoleCompute', + 'KubernetesRoleNetwork', + 'KubernetesRoleResources', + 'KubernetesRoleStorage', + 'KubernetesRoleStorageClassInfo', + 'LoadBalancerConfig', + 'MECRole', + 'MetricConfiguration', + 'MetricCounter', + 'MetricCounterSet', + 'MetricDimension', + 'MetricDimensionV1', + 'MetricSpecificationV1', + 'MonitoringMetricConfiguration', + 'MountPointMap', + 'NetworkAdapter', + 'NetworkAdapterPosition', + 'NetworkSettings', + 'Node', + 'NodeInfo', + 'Operation', + 'OperationDisplay', + 'Order', + 'OrderStatus', + 'PeriodicTimerEventTrigger', + 'PeriodicTimerSourceInfo', + 'RefreshDetails', + 'ResourceIdentity', + 'ResourceMoveDetails', + 'ResourceTypeSku', + 'Role', + 'RoleSinkInfo', + 'SecuritySettings', + 'ServiceSpecification', + 'Share', + 'ShareAccessRight', + 'Sku', + 'SkuCost', + 'SkuInformation', + 'SkuInformationList', + 'SkuLocationInfo', + 'StorageAccount', + 'StorageAccountCredential', + 'SubscriptionRegisteredFeatures', + 'SymmetricKey', + 'SystemData', + 'TrackingInfo', + 'Trigger', + 'UpdateDownloadProgress', + 'UpdateInstallProgress', + 'UpdateSummary', + 'UploadCertificateRequest', + 'UploadCertificateResponse', + 'User', + 'UserAccessRight', + 'OperationPaged', + 'DataBoxEdgeSkuPaged', + 'DataBoxEdgeDevicePaged', + 'AlertPaged', + 'BandwidthSchedulePaged', + 'NodePaged', + 'OrderPaged', + 'RolePaged', + 'AddonPaged', + 'MonitoringMetricConfigurationPaged', + 'SharePaged', + 'StorageAccountCredentialPaged', + 'StorageAccountPaged', + 'ContainerPaged', + 'TriggerPaged', + 'UserPaged', + 'CreatedByType', + 'AlertSeverity', + 'PlatformType', + 'HostPlatformType', + 'AddonState', + 'EncryptionAlgorithm', + 'AzureContainerDataFormat', + 'DayOfWeek', + 'ClientPermissionType', + 'RoleStatus', + 'SubscriptionState', + 'ContainerStatus', + 'SkuName', + 'SkuTier', + 'MsiIdentityType', + 'DataBoxEdgeDeviceKind', + 'DataBoxEdgeDeviceStatus', + 'DeviceType', + 'RoleTypes', + 'ResourceMoveStatus', + 'SkuSignupOption', + 'SkuVersion', + 'SkuAvailability', + 'ShipmentType', + 'MountType', + 'JobStatus', + 'JobType', + 'UpdateOperationStage', + 'DownloadPhase', + 'KubernetesNodeType', + 'KubernetesState', + 'PosixComplianceStatus', + 'MetricUnit', + 'MetricAggregationType', + 'MetricCategory', + 'TimeGrain', + 'NetworkGroup', + 'NetworkAdapterStatus', + 'NetworkAdapterRDMAStatus', + 'NetworkAdapterDHCPStatus', + 'NodeStatus', + 'OrderState', + 'AuthenticationType', + 'ShareStatus', + 'MonitoringStatus', + 'ShareAccessProtocol', + 'ShareAccessType', + 'DataPolicy', + 'StorageAccountStatus', + 'SSLStatus', + 'AccountType', + 'InstallRebootBehavior', + 'UpdateOperation', + 'UserType', +] diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_data_box_edge_management_client_enums.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_data_box_edge_management_client_enums.py new file mode 100644 index 000000000000..7a9865419e61 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_data_box_edge_management_client_enums.py @@ -0,0 +1,473 @@ +# 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 CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + +class AlertSeverity(str, Enum): + + informational = "Informational" + warning = "Warning" + critical = "Critical" + + +class PlatformType(str, Enum): + + windows = "Windows" + linux = "Linux" + + +class HostPlatformType(str, Enum): + + kubernetes_cluster = "KubernetesCluster" + linux_vm = "LinuxVM" + + +class AddonState(str, Enum): + + invalid = "Invalid" + creating = "Creating" + created = "Created" + updating = "Updating" + reconfiguring = "Reconfiguring" + failed = "Failed" + deleting = "Deleting" + + +class EncryptionAlgorithm(str, Enum): + + none = "None" + aes256 = "AES256" + rsaes_pkcs1_v_1_5 = "RSAES_PKCS1_v_1_5" + + +class AzureContainerDataFormat(str, Enum): + + block_blob = "BlockBlob" + page_blob = "PageBlob" + azure_file = "AzureFile" + + +class DayOfWeek(str, Enum): + + sunday = "Sunday" + monday = "Monday" + tuesday = "Tuesday" + wednesday = "Wednesday" + thursday = "Thursday" + friday = "Friday" + saturday = "Saturday" + + +class ClientPermissionType(str, Enum): + + no_access = "NoAccess" + read_only = "ReadOnly" + read_write = "ReadWrite" + + +class RoleStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class SubscriptionState(str, Enum): + + registered = "Registered" + warned = "Warned" + suspended = "Suspended" + deleted = "Deleted" + unregistered = "Unregistered" + + +class ContainerStatus(str, Enum): + + ok = "OK" + offline = "Offline" + unknown = "Unknown" + updating = "Updating" + needs_attention = "NeedsAttention" + + +class SkuName(str, Enum): + + gateway = "Gateway" + edge = "Edge" + tea_1_node = "TEA_1Node" + tea_1_node_ups = "TEA_1Node_UPS" + tea_1_node_heater = "TEA_1Node_Heater" + tea_1_node_ups_heater = "TEA_1Node_UPS_Heater" + tea_4_node_heater = "TEA_4Node_Heater" + tea_4_node_ups_heater = "TEA_4Node_UPS_Heater" + tma = "TMA" + tdc = "TDC" + tca_small = "TCA_Small" + gpu = "GPU" + tca_large = "TCA_Large" + edge_p_base = "EdgeP_Base" + edge_p_high = "EdgeP_High" + edge_pr_base = "EdgePR_Base" + edge_pr_base_ups = "EdgePR_Base_UPS" + edge_mr_mini = "EdgeMR_Mini" + rca_small = "RCA_Small" + rca_large = "RCA_Large" + rdc = "RDC" + + +class SkuTier(str, Enum): + + standard = "Standard" + + +class MsiIdentityType(str, Enum): + + none = "None" + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + + +class DataBoxEdgeDeviceKind(str, Enum): + + azure_data_box_gateway = "AzureDataBoxGateway" + azure_stack_edge = "AzureStackEdge" + azure_stack_hub = "AzureStackHub" + azure_modular_data_centre = "AzureModularDataCentre" + + +class DataBoxEdgeDeviceStatus(str, Enum): + + ready_to_setup = "ReadyToSetup" + online = "Online" + offline = "Offline" + needs_attention = "NeedsAttention" + disconnected = "Disconnected" + partially_disconnected = "PartiallyDisconnected" + maintenance = "Maintenance" + + +class DeviceType(str, Enum): + + data_box_edge_device = "DataBoxEdgeDevice" + + +class RoleTypes(str, Enum): + + iot = "IOT" + asa = "ASA" + functions = "Functions" + cognitive = "Cognitive" + mec = "MEC" + cloud_edge_management = "CloudEdgeManagement" + kubernetes = "Kubernetes" + + +class ResourceMoveStatus(str, Enum): + + none = "None" + resource_move_in_progress = "ResourceMoveInProgress" + resource_move_failed = "ResourceMoveFailed" + + +class SkuSignupOption(str, Enum): + + none = "None" + available = "Available" + + +class SkuVersion(str, Enum): + + stable = "Stable" + preview = "Preview" + + +class SkuAvailability(str, Enum): + + available = "Available" + unavailable = "Unavailable" + + +class ShipmentType(str, Enum): + + not_applicable = "NotApplicable" + shipped_to_customer = "ShippedToCustomer" + self_pickup = "SelfPickup" + + +class MountType(str, Enum): + + volume = "Volume" + host_path = "HostPath" + + +class JobStatus(str, Enum): + + invalid = "Invalid" + running = "Running" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + paused = "Paused" + scheduled = "Scheduled" + + +class JobType(str, Enum): + + invalid = "Invalid" + scan_for_updates = "ScanForUpdates" + download_updates = "DownloadUpdates" + install_updates = "InstallUpdates" + refresh_share = "RefreshShare" + refresh_container = "RefreshContainer" + backup = "Backup" + restore = "Restore" + trigger_support_package = "TriggerSupportPackage" + + +class UpdateOperationStage(str, Enum): + + unknown = "Unknown" + initial = "Initial" + scan_started = "ScanStarted" + scan_complete = "ScanComplete" + scan_failed = "ScanFailed" + download_started = "DownloadStarted" + download_complete = "DownloadComplete" + download_failed = "DownloadFailed" + install_started = "InstallStarted" + install_complete = "InstallComplete" + install_failed = "InstallFailed" + reboot_initiated = "RebootInitiated" + success = "Success" + failure = "Failure" + rescan_started = "RescanStarted" + rescan_complete = "RescanComplete" + rescan_failed = "RescanFailed" + + +class DownloadPhase(str, Enum): + + unknown = "Unknown" + initializing = "Initializing" + downloading = "Downloading" + verifying = "Verifying" + + +class KubernetesNodeType(str, Enum): + + invalid = "Invalid" + master = "Master" + worker = "Worker" + + +class KubernetesState(str, Enum): + + invalid = "Invalid" + creating = "Creating" + created = "Created" + updating = "Updating" + reconfiguring = "Reconfiguring" + failed = "Failed" + deleting = "Deleting" + + +class PosixComplianceStatus(str, Enum): + + invalid = "Invalid" + enabled = "Enabled" + disabled = "Disabled" + + +class MetricUnit(str, Enum): + + not_specified = "NotSpecified" + percent = "Percent" + count = "Count" + seconds = "Seconds" + milliseconds = "Milliseconds" + bytes = "Bytes" + bytes_per_second = "BytesPerSecond" + count_per_second = "CountPerSecond" + + +class MetricAggregationType(str, Enum): + + not_specified = "NotSpecified" + none = "None" + average = "Average" + minimum = "Minimum" + maximum = "Maximum" + total = "Total" + count = "Count" + + +class MetricCategory(str, Enum): + + capacity = "Capacity" + transaction = "Transaction" + + +class TimeGrain(str, Enum): + + pt1_m = "PT1M" + pt5_m = "PT5M" + pt15_m = "PT15M" + pt30_m = "PT30M" + pt1_h = "PT1H" + pt6_h = "PT6H" + pt12_h = "PT12H" + pt1_d = "PT1D" + + +class NetworkGroup(str, Enum): + + none = "None" + non_rdma = "NonRDMA" + rdma = "RDMA" + + +class NetworkAdapterStatus(str, Enum): + + inactive = "Inactive" + active = "Active" + + +class NetworkAdapterRDMAStatus(str, Enum): + + incapable = "Incapable" + capable = "Capable" + + +class NetworkAdapterDHCPStatus(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class NodeStatus(str, Enum): + + unknown = "Unknown" + up = "Up" + down = "Down" + rebooting = "Rebooting" + shutting_down = "ShuttingDown" + + +class OrderState(str, Enum): + + untracked = "Untracked" + awaiting_fulfilment = "AwaitingFulfilment" + awaiting_preparation = "AwaitingPreparation" + awaiting_shipment = "AwaitingShipment" + shipped = "Shipped" + arriving = "Arriving" + delivered = "Delivered" + replacement_requested = "ReplacementRequested" + lost_device = "LostDevice" + declined = "Declined" + return_initiated = "ReturnInitiated" + awaiting_return_shipment = "AwaitingReturnShipment" + shipped_back = "ShippedBack" + collected_at_microsoft = "CollectedAtMicrosoft" + awaiting_pickup = "AwaitingPickup" + pickup_completed = "PickupCompleted" + awaiting_drop = "AwaitingDrop" + + +class AuthenticationType(str, Enum): + + invalid = "Invalid" + azure_active_directory = "AzureActiveDirectory" + + +class ShareStatus(str, Enum): + + offline = "Offline" + unknown = "Unknown" + ok = "OK" + updating = "Updating" + needs_attention = "NeedsAttention" + + +class MonitoringStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ShareAccessProtocol(str, Enum): + + smb = "SMB" + nfs = "NFS" + + +class ShareAccessType(str, Enum): + + change = "Change" + read = "Read" + custom = "Custom" + + +class DataPolicy(str, Enum): + + cloud = "Cloud" + local = "Local" + + +class StorageAccountStatus(str, Enum): + + ok = "OK" + offline = "Offline" + unknown = "Unknown" + updating = "Updating" + needs_attention = "NeedsAttention" + + +class SSLStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class AccountType(str, Enum): + + general_purpose_storage = "GeneralPurposeStorage" + blob_storage = "BlobStorage" + + +class InstallRebootBehavior(str, Enum): + + never_reboots = "NeverReboots" + requires_reboot = "RequiresReboot" + request_reboot = "RequestReboot" + + +class UpdateOperation(str, Enum): + + none = "None" + scan = "Scan" + download = "Download" + install = "Install" + + +class UserType(str, Enum): + + share = "Share" + local_management = "LocalManagement" + arm = "ARM" diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_models.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_models.py new file mode 100644 index 000000000000..3c5dabaf42d3 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_models.py @@ -0,0 +1,4418 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ARMBaseModel(Model): + """Represents the base class for all object models. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ARMBaseModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Addon(ARMBaseModel): + """Role Addon. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ArcAddon, IoTAddon + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ArcForKubernetes': 'ArcAddon', 'IotEdge': 'IoTAddon'} + } + + def __init__(self, **kwargs): + super(Addon, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.kind = None + self.kind = 'Addon' + + +class Address(Model): + """The shipping address of the customer. + + All required parameters must be populated in order to send to Azure. + + :param address_line1: The address line1. + :type address_line1: str + :param address_line2: The address line2. + :type address_line2: str + :param address_line3: The address line3. + :type address_line3: str + :param postal_code: The postal code. + :type postal_code: str + :param city: The city name. + :type city: str + :param state: The state name. + :type state: str + :param country: Required. The country name. + :type country: str + """ + + _validation = { + 'country': {'required': True}, + } + + _attribute_map = { + 'address_line1': {'key': 'addressLine1', 'type': 'str'}, + 'address_line2': {'key': 'addressLine2', 'type': 'str'}, + 'address_line3': {'key': 'addressLine3', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Address, self).__init__(**kwargs) + self.address_line1 = kwargs.get('address_line1', None) + self.address_line2 = kwargs.get('address_line2', None) + self.address_line3 = kwargs.get('address_line3', None) + self.postal_code = kwargs.get('postal_code', None) + self.city = kwargs.get('city', None) + self.state = kwargs.get('state', None) + self.country = kwargs.get('country', None) + + +class Alert(ARMBaseModel): + """Alert on the data box edge/gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Alert generated in the resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar title: Alert title. + :vartype title: str + :ivar alert_type: Alert type. + :vartype alert_type: str + :ivar appeared_at_date_time: UTC time when the alert appeared. + :vartype appeared_at_date_time: datetime + :ivar recommendation: Alert recommendation. + :vartype recommendation: str + :ivar severity: Severity of the alert. Possible values include: + 'Informational', 'Warning', 'Critical' + :vartype severity: str or ~azure.mgmt.databoxedge.models.AlertSeverity + :ivar error_details: Error details of the alert. + :vartype error_details: ~azure.mgmt.databoxedge.models.AlertErrorDetails + :ivar detailed_information: Alert details. + :vartype detailed_information: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'appeared_at_date_time': {'readonly': True}, + 'recommendation': {'readonly': True}, + 'severity': {'readonly': True}, + 'error_details': {'readonly': True}, + 'detailed_information': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'appeared_at_date_time': {'key': 'properties.appearedAtDateTime', 'type': 'iso-8601'}, + 'recommendation': {'key': 'properties.recommendation', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'error_details': {'key': 'properties.errorDetails', 'type': 'AlertErrorDetails'}, + 'detailed_information': {'key': 'properties.detailedInformation', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.title = None + self.alert_type = None + self.appeared_at_date_time = None + self.recommendation = None + self.severity = None + self.error_details = None + self.detailed_information = None + + +class AlertErrorDetails(Model): + """Error details for the alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_code: Error code. + :vartype error_code: str + :ivar error_message: Error Message. + :vartype error_message: str + :ivar occurrences: Number of occurrences. + :vartype occurrences: int + """ + + _validation = { + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'occurrences': {'readonly': True}, + } + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'occurrences': {'key': 'occurrences', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertErrorDetails, self).__init__(**kwargs) + self.error_code = None + self.error_message = None + self.occurrences = None + + +class ArcAddon(Addon): + """Arc Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param subscription_id: Required. Arc resource subscription Id + :type subscription_id: str + :param resource_group_name: Required. Arc resource group name + :type resource_group_name: str + :param resource_name: Required. Arc resource Name + :type resource_name: str + :param resource_location: Required. Arc resource location + :type resource_location: str + :ivar version: Arc resource version + :vartype version: str + :ivar host_platform: Host OS supported by the Arc addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'subscription_id': {'required': True}, + 'resource_group_name': {'required': True}, + 'resource_name': {'required': True}, + 'resource_location': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'properties.resourceGroupName', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArcAddon, self).__init__(**kwargs) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.resource_name = kwargs.get('resource_name', None) + self.resource_location = kwargs.get('resource_location', None) + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'ArcForKubernetes' + + +class AsymmetricEncryptedSecret(Model): + """Represent the secrets intended for encryption with asymmetric key pair. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. The value of the secret. + :type value: str + :param encryption_cert_thumbprint: Thumbprint certificate used to encrypt + \\"Value\\". If the value is unencrypted, it will be null. + :type encryption_cert_thumbprint: str + :param encryption_algorithm: Required. The algorithm used to encrypt + "Value". Possible values include: 'None', 'AES256', 'RSAES_PKCS1_v_1_5' + :type encryption_algorithm: str or + ~azure.mgmt.databoxedge.models.EncryptionAlgorithm + """ + + _validation = { + 'value': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'encryption_cert_thumbprint': {'key': 'encryptionCertThumbprint', 'type': 'str'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AsymmetricEncryptedSecret, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.encryption_cert_thumbprint = kwargs.get('encryption_cert_thumbprint', None) + self.encryption_algorithm = kwargs.get('encryption_algorithm', None) + + +class Authentication(Model): + """Authentication mechanism for IoT devices. + + :param symmetric_key: Symmetric key for authentication. + :type symmetric_key: ~azure.mgmt.databoxedge.models.SymmetricKey + """ + + _attribute_map = { + 'symmetric_key': {'key': 'symmetricKey', 'type': 'SymmetricKey'}, + } + + def __init__(self, **kwargs): + super(Authentication, self).__init__(**kwargs) + self.symmetric_key = kwargs.get('symmetric_key', None) + + +class AzureContainerInfo(Model): + """Azure container mapping of the endpoint. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_credential_id: Required. ID of the storage account + credential used to access storage. + :type storage_account_credential_id: str + :param container_name: Required. Container name (Based on the data format + specified, this represents the name of Azure Files/Page blob/Block blob). + :type container_name: str + :param data_format: Required. Storage format used for the file represented + by the share. Possible values include: 'BlockBlob', 'PageBlob', + 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + """ + + _validation = { + 'storage_account_credential_id': {'required': True}, + 'container_name': {'required': True}, + 'data_format': {'required': True}, + } + + _attribute_map = { + 'storage_account_credential_id': {'key': 'storageAccountCredentialId', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'data_format': {'key': 'dataFormat', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureContainerInfo, self).__init__(**kwargs) + self.storage_account_credential_id = kwargs.get('storage_account_credential_id', None) + self.container_name = kwargs.get('container_name', None) + self.data_format = kwargs.get('data_format', None) + + +class BandwidthSchedule(ARMBaseModel): + """The bandwidth schedule details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Bandwidth object related to ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param start: Required. The start time of the schedule in UTC. + :type start: str + :param stop: Required. The stop time of the schedule in UTC. + :type stop: str + :param rate_in_mbps: Required. The bandwidth rate in Mbps. + :type rate_in_mbps: int + :param days: Required. The days of the week when this schedule is + applicable. + :type days: list[str or ~azure.mgmt.databoxedge.models.DayOfWeek] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start': {'required': True}, + 'stop': {'required': True}, + 'rate_in_mbps': {'required': True}, + 'days': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'start': {'key': 'properties.start', 'type': 'str'}, + 'stop': {'key': 'properties.stop', 'type': 'str'}, + 'rate_in_mbps': {'key': 'properties.rateInMbps', 'type': 'int'}, + 'days': {'key': 'properties.days', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(BandwidthSchedule, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.start = kwargs.get('start', None) + self.stop = kwargs.get('stop', None) + self.rate_in_mbps = kwargs.get('rate_in_mbps', None) + self.days = kwargs.get('days', None) + + +class ClientAccessRight(Model): + """The mapping between a particular client IP and the type of access client + has on the NFS share. + + All required parameters must be populated in order to send to Azure. + + :param client: Required. IP of the client. + :type client: str + :param access_permission: Required. Type of access to be allowed for the + client. Possible values include: 'NoAccess', 'ReadOnly', 'ReadWrite' + :type access_permission: str or + ~azure.mgmt.databoxedge.models.ClientPermissionType + """ + + _validation = { + 'client': {'required': True}, + 'access_permission': {'required': True}, + } + + _attribute_map = { + 'client': {'key': 'client', 'type': 'str'}, + 'access_permission': {'key': 'accessPermission', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClientAccessRight, self).__init__(**kwargs) + self.client = kwargs.get('client', None) + self.access_permission = kwargs.get('access_permission', None) + + +class Role(ARMBaseModel): + """Compute role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CloudEdgeManagementRole, IoTRole, KubernetesRole, MECRole + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CloudEdgeManagement': 'CloudEdgeManagementRole', 'IOT': 'IoTRole', 'Kubernetes': 'KubernetesRole', 'MEC': 'MECRole'} + } + + def __init__(self, **kwargs): + super(Role, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.kind = None + self.kind = 'Role' + + +class CloudEdgeManagementRole(Role): + """CloudEdgeManagementRole role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :ivar local_management_status: Local Edge Management Status. Possible + values include: 'Enabled', 'Disabled' + :vartype local_management_status: str or + ~azure.mgmt.databoxedge.models.RoleStatus + :ivar edge_profile: Edge Profile of the resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'local_management_status': {'readonly': True}, + 'edge_profile': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'local_management_status': {'key': 'properties.localManagementStatus', 'type': 'str'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CloudEdgeManagementRole, self).__init__(**kwargs) + self.local_management_status = None + self.edge_profile = None + self.role_status = kwargs.get('role_status', None) + self.kind = 'CloudEdgeManagement' + + +class CloudError(Model): + """An error response from the service. + + :param error: The error details. + :type error: ~azure.mgmt.databoxedge.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.databoxedge.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class CniConfig(Model): + """Cni configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Cni type + :vartype type: str + :ivar version: Cni version + :vartype version: str + :ivar pod_subnet: Pod Subnet + :vartype pod_subnet: str + :ivar service_subnet: Service subnet + :vartype service_subnet: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + 'pod_subnet': {'readonly': True}, + 'service_subnet': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'pod_subnet': {'key': 'podSubnet', 'type': 'str'}, + 'service_subnet': {'key': 'serviceSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CniConfig, self).__init__(**kwargs) + self.type = None + self.version = None + self.pod_subnet = None + self.service_subnet = None + + +class ComputeResource(Model): + """Compute infrastructure Resource. + + All required parameters must be populated in order to send to Azure. + + :param processor_count: Required. Processor count + :type processor_count: int + :param memory_in_gb: Required. Memory in GB + :type memory_in_gb: long + """ + + _validation = { + 'processor_count': {'required': True}, + 'memory_in_gb': {'required': True}, + } + + _attribute_map = { + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(ComputeResource, self).__init__(**kwargs) + self.processor_count = kwargs.get('processor_count', None) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + + +class ContactDetails(Model): + """Contains all the contact details of the customer. + + All required parameters must be populated in order to send to Azure. + + :param contact_person: Required. The contact person name. + :type contact_person: str + :param company_name: Required. The name of the company. + :type company_name: str + :param phone: Required. The phone number. + :type phone: str + :param email_list: Required. The email list. + :type email_list: list[str] + """ + + _validation = { + 'contact_person': {'required': True}, + 'company_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_person': {'key': 'contactPerson', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ContactDetails, self).__init__(**kwargs) + self.contact_person = kwargs.get('contact_person', None) + self.company_name = kwargs.get('company_name', None) + self.phone = kwargs.get('phone', None) + self.email_list = kwargs.get('email_list', None) + + +class Container(ARMBaseModel): + """Represents a container on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Container in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar container_status: Current status of the container. Possible values + include: 'OK', 'Offline', 'Unknown', 'Updating', 'NeedsAttention' + :vartype container_status: str or + ~azure.mgmt.databoxedge.models.ContainerStatus + :param data_format: Required. DataFormat for Container. Possible values + include: 'BlockBlob', 'PageBlob', 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + :ivar refresh_details: Details of the refresh job on this container. + :vartype refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar created_date_time: The UTC time when container got created. + :vartype created_date_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'container_status': {'readonly': True}, + 'data_format': {'required': True}, + 'refresh_details': {'readonly': True}, + 'created_date_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'container_status': {'key': 'properties.containerStatus', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(Container, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.container_status = None + self.data_format = kwargs.get('data_format', None) + self.refresh_details = None + self.created_date_time = None + + +class DataBoxEdgeDevice(ARMBaseModel): + """The Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param location: Required. The location of the device. This is a supported + and registered Azure geographical region (for example, West US, East US, + or Southeast Asia). The geographical region of a device cannot be changed + once it is created, but if an identical geographical region is specified + on update, the request will succeed. + :type location: str + :param tags: The list of tags that describe the device. These tags can be + used to view and group this device (across resource groups). + :type tags: dict[str, str] + :param sku: The SKU type. + :type sku: ~azure.mgmt.databoxedge.models.Sku + :param etag: The etag for the devices. + :type etag: str + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :ivar kind: The etag for the devices. Possible values include: + 'AzureDataBoxGateway', 'AzureStackEdge', 'AzureStackHub', + 'AzureModularDataCentre' + :vartype kind: str or ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceKind + :param system_data: DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param data_box_edge_device_status: The status of the Data Box + Edge/Gateway device. Possible values include: 'ReadyToSetup', 'Online', + 'Offline', 'NeedsAttention', 'Disconnected', 'PartiallyDisconnected', + 'Maintenance' + :type data_box_edge_device_status: str or + ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceStatus + :ivar serial_number: The Serial Number of Data Box Edge/Gateway device. + :vartype serial_number: str + :ivar description: The Description of the Data Box Edge/Gateway device. + :vartype description: str + :ivar model_description: The description of the Data Box Edge/Gateway + device model. + :vartype model_description: str + :ivar device_type: The type of the Data Box Edge/Gateway device. Possible + values include: 'DataBoxEdgeDevice' + :vartype device_type: str or ~azure.mgmt.databoxedge.models.DeviceType + :ivar friendly_name: The Data Box Edge/Gateway device name. + :vartype friendly_name: str + :ivar culture: The Data Box Edge/Gateway device culture. + :vartype culture: str + :ivar device_model: The Data Box Edge/Gateway device model. + :vartype device_model: str + :ivar device_software_version: The Data Box Edge/Gateway device software + version. + :vartype device_software_version: str + :ivar device_local_capacity: The Data Box Edge/Gateway device local + capacity in MB. + :vartype device_local_capacity: long + :ivar time_zone: The Data Box Edge/Gateway device timezone. + :vartype time_zone: str + :ivar device_hcs_version: The device software version number of the device + (eg: 1.2.18105.6). + :vartype device_hcs_version: str + :ivar configured_role_types: Type of compute roles configured. + :vartype configured_role_types: list[str or + ~azure.mgmt.databoxedge.models.RoleTypes] + :ivar node_count: The number of nodes in the cluster. + :vartype node_count: int + :ivar resource_move_details: The details of the move operation on this + resource. + :vartype resource_move_details: + ~azure.mgmt.databoxedge.models.ResourceMoveDetails + :ivar edge_profile: The details of Edge Profile for this resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'description': {'readonly': True}, + 'model_description': {'readonly': True}, + 'device_type': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'culture': {'readonly': True}, + 'device_model': {'readonly': True}, + 'device_software_version': {'readonly': True}, + 'device_local_capacity': {'readonly': True}, + 'time_zone': {'readonly': True}, + 'device_hcs_version': {'readonly': True}, + 'configured_role_types': {'readonly': True}, + 'node_count': {'readonly': True}, + 'resource_move_details': {'readonly': True}, + 'edge_profile': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'data_box_edge_device_status': {'key': 'properties.dataBoxEdgeDeviceStatus', 'type': 'str'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'model_description': {'key': 'properties.modelDescription', 'type': 'str'}, + 'device_type': {'key': 'properties.deviceType', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'culture': {'key': 'properties.culture', 'type': 'str'}, + 'device_model': {'key': 'properties.deviceModel', 'type': 'str'}, + 'device_software_version': {'key': 'properties.deviceSoftwareVersion', 'type': 'str'}, + 'device_local_capacity': {'key': 'properties.deviceLocalCapacity', 'type': 'long'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'device_hcs_version': {'key': 'properties.deviceHcsVersion', 'type': 'str'}, + 'configured_role_types': {'key': 'properties.configuredRoleTypes', 'type': '[str]'}, + 'node_count': {'key': 'properties.nodeCount', 'type': 'int'}, + 'resource_move_details': {'key': 'properties.resourceMoveDetails', 'type': 'ResourceMoveDetails'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDevice, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.etag = kwargs.get('etag', None) + self.identity = kwargs.get('identity', None) + self.kind = None + self.system_data = kwargs.get('system_data', None) + self.data_box_edge_device_status = kwargs.get('data_box_edge_device_status', None) + self.serial_number = None + self.description = None + self.model_description = None + self.device_type = None + self.friendly_name = None + self.culture = None + self.device_model = None + self.device_software_version = None + self.device_local_capacity = None + self.time_zone = None + self.device_hcs_version = None + self.configured_role_types = None + self.node_count = None + self.resource_move_details = None + self.edge_profile = None + + +class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel): + """The extended Info of the Data Box Edge/Gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param encryption_key_thumbprint: The digital signature of encrypted + certificate. + :type encryption_key_thumbprint: str + :param encryption_key: The public part of the encryption certificate. + Client uses this to encrypt any secret. + :type encryption_key: str + :ivar resource_key: The Resource ID of the Resource. + :vartype resource_key: str + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'}, + 'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'}, + 'resource_key': {'key': 'properties.resourceKey', 'type': 'str'}, + 'client_secret_store_id': {'key': 'properties.clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'properties.clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'properties.channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'properties.channelIntegrityKeyVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDeviceExtendedInfo, self).__init__(**kwargs) + self.encryption_key_thumbprint = kwargs.get('encryption_key_thumbprint', None) + self.encryption_key = kwargs.get('encryption_key', None) + self.resource_key = None + self.client_secret_store_id = kwargs.get('client_secret_store_id', None) + self.client_secret_store_url = kwargs.get('client_secret_store_url', None) + self.channel_integrity_key_name = kwargs.get('channel_integrity_key_name', None) + self.channel_integrity_key_version = kwargs.get('channel_integrity_key_version', None) + + +class DataBoxEdgeDeviceExtendedInfoPatch(Model): + """The Data Box Edge/Gateway device extended info patch. + + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name for Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + """ + + _attribute_map = { + 'client_secret_store_id': {'key': 'clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'channelIntegrityKeyVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDeviceExtendedInfoPatch, self).__init__(**kwargs) + self.client_secret_store_id = kwargs.get('client_secret_store_id', None) + self.client_secret_store_url = kwargs.get('client_secret_store_url', None) + self.channel_integrity_key_name = kwargs.get('channel_integrity_key_name', None) + self.channel_integrity_key_version = kwargs.get('channel_integrity_key_version', None) + + +class DataBoxEdgeDevicePatch(Model): + """The Data Box Edge/Gateway device patch. + + :param tags: The tags attached to the Data Box Edge/Gateway resource. + :type tags: dict[str, str] + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :param edge_profile: Edge Profile property of the Data Box Edge/Gateway + device + :type edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfilePatch + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfilePatch'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDevicePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.edge_profile = kwargs.get('edge_profile', None) + + +class DataBoxEdgeMoveRequest(Model): + """Resource Move details. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_group: Required. Target resource group ARMId + :type target_resource_group: str + :param resources: Required. List of resources to be moved + :type resources: list[str] + """ + + _validation = { + 'target_resource_group': {'required': True}, + 'resources': {'required': True}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeMoveRequest, self).__init__(**kwargs) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.resources = kwargs.get('resources', None) + + +class DataBoxEdgeSku(Model): + """The Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar name: The Sku name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC' + :vartype name: str or ~azure.mgmt.databoxedge.models.SkuName + :ivar kind: The Sku kind. + :vartype kind: str + :ivar tier: The Sku tier. Possible values include: 'Standard' + :vartype tier: str or ~azure.mgmt.databoxedge.models.SkuTier + :ivar size: The Sku kind. + :vartype size: str + :ivar family: The Sku family. + :vartype family: str + :ivar locations: Availability of the Sku for the region. + :vartype locations: list[str] + :ivar api_versions: The API versions in which Sku is available. + :vartype api_versions: list[str] + :ivar location_info: Availability of the Sku for the location/zone/site. + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar signup_option: Sku can be signed up by customer or not. Possible + values include: 'None', 'Available' + :vartype signup_option: str or + ~azure.mgmt.databoxedge.models.SkuSignupOption + :ivar version: Availability of the Sku as preview/stable. Possible values + include: 'Stable', 'Preview' + :vartype version: str or ~azure.mgmt.databoxedge.models.SkuVersion + :ivar availability: Links to the next set of results. Possible values + include: 'Available', 'Unavailable' + :vartype availability: str or + ~azure.mgmt.databoxedge.models.SkuAvailability + :ivar shipment_types: List of Shipment Types supported by this SKU + :vartype shipment_types: list[str or + ~azure.mgmt.databoxedge.models.ShipmentType] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'locations': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'location_info': {'readonly': True}, + 'costs': {'readonly': True}, + 'signup_option': {'readonly': True}, + 'version': {'readonly': True}, + 'availability': {'readonly': True}, + 'shipment_types': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'signup_option': {'key': 'signupOption', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'availability': {'key': 'availability', 'type': 'str'}, + 'shipment_types': {'key': 'shipmentTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.kind = None + self.tier = None + self.size = None + self.family = None + self.locations = None + self.api_versions = None + self.location_info = None + self.costs = None + self.signup_option = None + self.version = None + self.availability = None + self.shipment_types = None + + +class DCAccessCode(Model): + """DC Access code in the case of Self Managed Shipping. + + :param auth_code: DCAccess Code for the Self Managed shipment. + :type auth_code: str + """ + + _attribute_map = { + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DCAccessCode, self).__init__(**kwargs) + self.auth_code = kwargs.get('auth_code', None) + + +class EdgeProfile(Model): + """Details about Edge Profile for the resource. + + :param subscription: Edge Profile Subscription + :type subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscription + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscription'}, + } + + def __init__(self, **kwargs): + super(EdgeProfile, self).__init__(**kwargs) + self.subscription = kwargs.get('subscription', None) + + +class EdgeProfilePatch(Model): + """The Data Box Edge/Gateway Edge Profile patch. + + :param subscription: The Data Box Edge/Gateway Edge Profile Subscription + patch + :type subscription: + ~azure.mgmt.databoxedge.models.EdgeProfileSubscriptionPatch + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscriptionPatch'}, + } + + def __init__(self, **kwargs): + super(EdgeProfilePatch, self).__init__(**kwargs) + self.subscription = kwargs.get('subscription', None) + + +class EdgeProfileSubscription(Model): + """Subscription details for the Edge Profile. + + :param registration_id: Edge Subscription Registration ID + :type registration_id: str + :param id: ARM ID of the subscription + :type id: str + :param state: Possible values include: 'Registered', 'Warned', + 'Suspended', 'Deleted', 'Unregistered' + :type state: str or ~azure.mgmt.databoxedge.models.SubscriptionState + :param registration_date: + :type registration_date: str + :param subscription_id: + :type subscription_id: str + :param tenant_id: + :type tenant_id: str + :param location_placement_id: + :type location_placement_id: str + :param quota_id: + :type quota_id: str + :param serialized_details: + :type serialized_details: str + :param registered_features: + :type registered_features: + list[~azure.mgmt.databoxedge.models.SubscriptionRegisteredFeatures] + """ + + _attribute_map = { + 'registration_id': {'key': 'registrationId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'registration_date': {'key': 'registrationDate', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'location_placement_id': {'key': 'properties.locationPlacementId', 'type': 'str'}, + 'quota_id': {'key': 'properties.quotaId', 'type': 'str'}, + 'serialized_details': {'key': 'properties.serializedDetails', 'type': 'str'}, + 'registered_features': {'key': 'properties.registeredFeatures', 'type': '[SubscriptionRegisteredFeatures]'}, + } + + def __init__(self, **kwargs): + super(EdgeProfileSubscription, self).__init__(**kwargs) + self.registration_id = kwargs.get('registration_id', None) + self.id = kwargs.get('id', None) + self.state = kwargs.get('state', None) + self.registration_date = kwargs.get('registration_date', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.location_placement_id = kwargs.get('location_placement_id', None) + self.quota_id = kwargs.get('quota_id', None) + self.serialized_details = kwargs.get('serialized_details', None) + self.registered_features = kwargs.get('registered_features', None) + + +class EdgeProfileSubscriptionPatch(Model): + """The Data Box Edge/Gateway Edge Profile Subscription patch. + + :param id: The path ID that uniquely identifies the subscription of the + edge profile. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EdgeProfileSubscriptionPatch, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class EtcdInfo(Model): + """Etcd configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Etcd type + :vartype type: str + :ivar version: Etcd version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EtcdInfo, self).__init__(**kwargs) + self.type = None + self.version = None + + +class Trigger(ARMBaseModel): + """Trigger details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FileEventTrigger, PeriodicTimerEventTrigger + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'FileEvent': 'FileEventTrigger', 'PeriodicTimerEvent': 'PeriodicTimerEventTrigger'} + } + + def __init__(self, **kwargs): + super(Trigger, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.kind = None + self.kind = 'Trigger' + + +class FileEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. File event source details. + :type source_info: ~azure.mgmt.databoxedge.models.FileSourceInfo + :param sink_info: Required. Role sink info. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'FileSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileEventTrigger, self).__init__(**kwargs) + self.source_info = kwargs.get('source_info', None) + self.sink_info = kwargs.get('sink_info', None) + self.custom_context_tag = kwargs.get('custom_context_tag', None) + self.kind = 'FileEvent' + + +class FileSourceInfo(Model): + """File source details. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. File share ID. + :type share_id: str + """ + + _validation = { + 'share_id': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileSourceInfo, self).__init__(**kwargs) + self.share_id = kwargs.get('share_id', None) + + +class GenerateCertResponse(Model): + """Used in activation key generation flow. + + :param public_key: Gets or sets base64 encoded certificate raw data, + this is the public part needed to be uploaded to cert vault + :type public_key: str + :param private_key: Gets or sets base64 encoded private part of the + certificate, + needed to form the activation key + :type private_key: str + :param expiry_time_in_utc: Gets or sets expiry time in UTC + :type expiry_time_in_utc: str + """ + + _attribute_map = { + 'public_key': {'key': 'publicKey', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'expiry_time_in_utc': {'key': 'expiryTimeInUTC', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateCertResponse, self).__init__(**kwargs) + self.public_key = kwargs.get('public_key', None) + self.private_key = kwargs.get('private_key', None) + self.expiry_time_in_utc = kwargs.get('expiry_time_in_utc', None) + + +class ImageRepositoryCredential(Model): + """Image repository credential. + + All required parameters must be populated in order to send to Azure. + + :param image_repository_url: Required. Image repository url (e.g.: + mcr.microsoft.com). + :type image_repository_url: str + :param user_name: Required. Repository user name. + :type user_name: str + :param password: Repository user password. + :type password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'image_repository_url': {'required': True}, + 'user_name': {'required': True}, + } + + _attribute_map = { + 'image_repository_url': {'key': 'imageRepositoryUrl', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, **kwargs): + super(ImageRepositoryCredential, self).__init__(**kwargs) + self.image_repository_url = kwargs.get('image_repository_url', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + + +class IoTAddon(Addon): + """IoT Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param io_tdevice_details: Required. IoT device metadata to which + appliance needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + Addon needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :ivar version: Version of IoT running on the appliance. + :vartype version: str + :ivar host_platform: Host OS supported by the IoT addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTAddon, self).__init__(**kwargs) + self.io_tdevice_details = kwargs.get('io_tdevice_details', None) + self.io_tedge_device_details = kwargs.get('io_tedge_device_details', None) + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'IotEdge' + + +class IoTDeviceInfo(Model): + """Metadata of IoT device/IoT Edge device to be configured. + + All required parameters must be populated in order to send to Azure. + + :param device_id: Required. ID of the IoT device/edge device. + :type device_id: str + :param io_thost_hub: Required. Host name for the IoT hub associated to the + device. + :type io_thost_hub: str + :param io_thost_hub_id: Id for the IoT hub associated to the device. + :type io_thost_hub_id: str + :param authentication: Encrypted IoT device/IoT edge device connection + string. + :type authentication: ~azure.mgmt.databoxedge.models.Authentication + """ + + _validation = { + 'device_id': {'required': True}, + 'io_thost_hub': {'required': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'io_thost_hub': {'key': 'ioTHostHub', 'type': 'str'}, + 'io_thost_hub_id': {'key': 'ioTHostHubId', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'Authentication'}, + } + + def __init__(self, **kwargs): + super(IoTDeviceInfo, self).__init__(**kwargs) + self.device_id = kwargs.get('device_id', None) + self.io_thost_hub = kwargs.get('io_thost_hub', None) + self.io_thost_hub_id = kwargs.get('io_thost_hub_id', None) + self.authentication = kwargs.get('authentication', None) + + +class IoTEdgeAgentInfo(Model): + """IoT edge agent details is optional, this will be used for download system + Agent module while bootstrapping IoT Role if specified. + + All required parameters must be populated in order to send to Azure. + + :param image_name: Required. Name of the IoT edge agent image. + :type image_name: str + :param tag: Required. Image Tag. + :type tag: str + :param image_repository: Image repository details. + :type image_repository: + ~azure.mgmt.databoxedge.models.ImageRepositoryCredential + """ + + _validation = { + 'image_name': {'required': True}, + 'tag': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'image_repository': {'key': 'imageRepository', 'type': 'ImageRepositoryCredential'}, + } + + def __init__(self, **kwargs): + super(IoTEdgeAgentInfo, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.tag = kwargs.get('tag', None) + self.image_repository = kwargs.get('image_repository', None) + + +class IoTRole(Role): + """Compute role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the IoT role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :param io_tdevice_details: Required. IoT device metadata to which data box + edge device needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + role needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param share_mappings: Mount points of shares in role(s). + :type share_mappings: list[~azure.mgmt.databoxedge.models.MountPointMap] + :param io_tedge_agent_info: Iot edge agent details to download the agent + and bootstrap iot runtime. + :type io_tedge_agent_info: ~azure.mgmt.databoxedge.models.IoTEdgeAgentInfo + :ivar host_platform_type: Platform where the Iot runtime is hosted. + Possible values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param compute_resource: Resource allocation + :type compute_resource: ~azure.mgmt.databoxedge.models.ComputeResource + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'host_platform_type': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'io_tedge_agent_info': {'key': 'properties.ioTEdgeAgentInfo', 'type': 'IoTEdgeAgentInfo'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'compute_resource': {'key': 'properties.computeResource', 'type': 'ComputeResource'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTRole, self).__init__(**kwargs) + self.host_platform = kwargs.get('host_platform', None) + self.io_tdevice_details = kwargs.get('io_tdevice_details', None) + self.io_tedge_device_details = kwargs.get('io_tedge_device_details', None) + self.share_mappings = kwargs.get('share_mappings', None) + self.io_tedge_agent_info = kwargs.get('io_tedge_agent_info', None) + self.host_platform_type = None + self.compute_resource = kwargs.get('compute_resource', None) + self.role_status = kwargs.get('role_status', None) + self.kind = 'IOT' + + +class Ipv4Config(Model): + """Details related to the IPv4 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv4 address of the network adapter. + :vartype ip_address: str + :ivar subnet: The IPv4 subnet of the network adapter. + :vartype subnet: str + :ivar gateway: The IPv4 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'subnet': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Ipv4Config, self).__init__(**kwargs) + self.ip_address = None + self.subnet = None + self.gateway = None + + +class Ipv6Config(Model): + """Details related to the IPv6 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv6 address of the network adapter. + :vartype ip_address: str + :ivar prefix_length: The IPv6 prefix of the network adapter. + :vartype prefix_length: int + :ivar gateway: The IPv6 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'prefix_length': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Ipv6Config, self).__init__(**kwargs) + self.ip_address = None + self.prefix_length = None + self.gateway = None + + +class Job(Model): + """A device job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The name of the object. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar status: The current status of the job. Possible values include: + 'Invalid', 'Running', 'Succeeded', 'Failed', 'Canceled', 'Paused', + 'Scheduled' + :vartype status: str or ~azure.mgmt.databoxedge.models.JobStatus + :ivar start_time: The UTC date and time at which the job started. + :vartype start_time: datetime + :ivar end_time: The UTC date and time at which the job completed. + :vartype end_time: datetime + :ivar percent_complete: The percentage of the job that is complete. + :vartype percent_complete: int + :ivar error: The error details. + :vartype error: ~azure.mgmt.databoxedge.models.JobErrorDetails + :ivar job_type: The type of the job. Possible values include: 'Invalid', + 'ScanForUpdates', 'DownloadUpdates', 'InstallUpdates', 'RefreshShare', + 'RefreshContainer', 'Backup', 'Restore', 'TriggerSupportPackage' + :vartype job_type: str or ~azure.mgmt.databoxedge.models.JobType + :ivar current_stage: Current stage of the update operation. Possible + values include: 'Unknown', 'Initial', 'ScanStarted', 'ScanComplete', + 'ScanFailed', 'DownloadStarted', 'DownloadComplete', 'DownloadFailed', + 'InstallStarted', 'InstallComplete', 'InstallFailed', 'RebootInitiated', + 'Success', 'Failure', 'RescanStarted', 'RescanComplete', 'RescanFailed' + :vartype current_stage: str or + ~azure.mgmt.databoxedge.models.UpdateOperationStage + :ivar download_progress: The download progress. + :vartype download_progress: + ~azure.mgmt.databoxedge.models.UpdateDownloadProgress + :ivar install_progress: The install progress. + :vartype install_progress: + ~azure.mgmt.databoxedge.models.UpdateInstallProgress + :ivar total_refresh_errors: Total number of errors encountered during the + refresh process. + :vartype total_refresh_errors: int + :ivar error_manifest_file: Local share/remote container relative path to + the error manifest file of the refresh. + :vartype error_manifest_file: str + :ivar refreshed_entity_id: ARM ID of the entity that was refreshed. + :vartype refreshed_entity_id: str + :param folder: If only subfolders need to be refreshed, then the subfolder + path inside the share or container. (The path is empty if there are no + subfolders.) + :type folder: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'error': {'readonly': True}, + 'job_type': {'readonly': True}, + 'current_stage': {'readonly': True}, + 'download_progress': {'readonly': True}, + 'install_progress': {'readonly': True}, + 'total_refresh_errors': {'readonly': True}, + 'error_manifest_file': {'readonly': True}, + 'refreshed_entity_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'error': {'key': 'error', 'type': 'JobErrorDetails'}, + 'job_type': {'key': 'properties.jobType', 'type': 'str'}, + 'current_stage': {'key': 'properties.currentStage', 'type': 'str'}, + 'download_progress': {'key': 'properties.downloadProgress', 'type': 'UpdateDownloadProgress'}, + 'install_progress': {'key': 'properties.installProgress', 'type': 'UpdateInstallProgress'}, + 'total_refresh_errors': {'key': 'properties.totalRefreshErrors', 'type': 'int'}, + 'error_manifest_file': {'key': 'properties.errorManifestFile', 'type': 'str'}, + 'refreshed_entity_id': {'key': 'properties.refreshedEntityId', 'type': 'str'}, + 'folder': {'key': 'properties.folder', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.status = None + self.start_time = None + self.end_time = None + self.percent_complete = None + self.error = None + self.job_type = None + self.current_stage = None + self.download_progress = None + self.install_progress = None + self.total_refresh_errors = None + self.error_manifest_file = None + self.refreshed_entity_id = None + self.folder = kwargs.get('folder', None) + + +class JobErrorDetails(Model): + """The job error information containing the list of job errors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_details: The error details. + :vartype error_details: list[~azure.mgmt.databoxedge.models.JobErrorItem] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'error_details': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorItem]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobErrorDetails, self).__init__(**kwargs) + self.error_details = None + self.code = None + self.message = None + + +class JobErrorItem(Model): + """The job error items. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendations: The recommended actions. + :vartype recommendations: list[str] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'recommendations': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobErrorItem, self).__init__(**kwargs) + self.recommendations = None + self.code = None + self.message = None + + +class KubernetesClusterInfo(Model): + """Kubernetes cluster configuration. + + Variables are only 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 etcd_info: Etcd configuration + :vartype etcd_info: ~azure.mgmt.databoxedge.models.EtcdInfo + :ivar nodes: Kubernetes cluster nodes + :vartype nodes: list[~azure.mgmt.databoxedge.models.NodeInfo] + :param version: Required. Kubernetes cluster version + :type version: str + """ + + _validation = { + 'etcd_info': {'readonly': True}, + 'nodes': {'readonly': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'etcd_info': {'key': 'etcdInfo', 'type': 'EtcdInfo'}, + 'nodes': {'key': 'nodes', 'type': '[NodeInfo]'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesClusterInfo, self).__init__(**kwargs) + self.etcd_info = None + self.nodes = None + self.version = kwargs.get('version', None) + + +class KubernetesIPConfiguration(Model): + """Kubernetes node IP configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar port: Port of the Kubernetes node. + :vartype port: str + :param ip_address: IP address of the Kubernetes node. + :type ip_address: str + """ + + _validation = { + 'port': {'readonly': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesIPConfiguration, self).__init__(**kwargs) + self.port = None + self.ip_address = kwargs.get('ip_address', None) + + +class KubernetesRole(Role): + """Kubernetes role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the Kubernetes role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar provisioning_state: State of Kubernetes deployment. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.KubernetesState + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param kubernetes_cluster_info: Required. Kubernetes cluster configuration + :type kubernetes_cluster_info: + ~azure.mgmt.databoxedge.models.KubernetesClusterInfo + :param kubernetes_role_resources: Required. Kubernetes role resources + :type kubernetes_role_resources: + ~azure.mgmt.databoxedge.models.KubernetesRoleResources + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'kubernetes_cluster_info': {'required': True}, + 'kubernetes_role_resources': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'kubernetes_cluster_info': {'key': 'properties.kubernetesClusterInfo', 'type': 'KubernetesClusterInfo'}, + 'kubernetes_role_resources': {'key': 'properties.kubernetesRoleResources', 'type': 'KubernetesRoleResources'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesRole, self).__init__(**kwargs) + self.host_platform = kwargs.get('host_platform', None) + self.provisioning_state = None + self.host_platform_type = None + self.kubernetes_cluster_info = kwargs.get('kubernetes_cluster_info', None) + self.kubernetes_role_resources = kwargs.get('kubernetes_role_resources', None) + self.role_status = kwargs.get('role_status', None) + self.kind = 'Kubernetes' + + +class KubernetesRoleCompute(Model): + """Kubernetes role compute 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 vm_profile: Required. VM profile + :type vm_profile: str + :ivar memory_in_bytes: Memory in bytes + :vartype memory_in_bytes: long + :ivar processor_count: Processor count + :vartype processor_count: int + """ + + _validation = { + 'vm_profile': {'required': True}, + 'memory_in_bytes': {'readonly': True}, + 'processor_count': {'readonly': True}, + } + + _attribute_map = { + 'vm_profile': {'key': 'vmProfile', 'type': 'str'}, + 'memory_in_bytes': {'key': 'memoryInBytes', 'type': 'long'}, + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleCompute, self).__init__(**kwargs) + self.vm_profile = kwargs.get('vm_profile', None) + self.memory_in_bytes = None + self.processor_count = None + + +class KubernetesRoleNetwork(Model): + """Kubernetes role network resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar cni_config: Cni configuration + :vartype cni_config: ~azure.mgmt.databoxedge.models.CniConfig + :ivar load_balancer_config: Load balancer configuration + :vartype load_balancer_config: + ~azure.mgmt.databoxedge.models.LoadBalancerConfig + """ + + _validation = { + 'cni_config': {'readonly': True}, + 'load_balancer_config': {'readonly': True}, + } + + _attribute_map = { + 'cni_config': {'key': 'cniConfig', 'type': 'CniConfig'}, + 'load_balancer_config': {'key': 'loadBalancerConfig', 'type': 'LoadBalancerConfig'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleNetwork, self).__init__(**kwargs) + self.cni_config = None + self.load_balancer_config = None + + +class KubernetesRoleResources(Model): + """Kubernetes role resources. + + Variables are only 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 storage: Kubernetes role storage resource + :type storage: ~azure.mgmt.databoxedge.models.KubernetesRoleStorage + :param compute: Required. Kubernetes role compute resource + :type compute: ~azure.mgmt.databoxedge.models.KubernetesRoleCompute + :ivar network: Kubernetes role network resource + :vartype network: ~azure.mgmt.databoxedge.models.KubernetesRoleNetwork + """ + + _validation = { + 'compute': {'required': True}, + 'network': {'readonly': True}, + } + + _attribute_map = { + 'storage': {'key': 'storage', 'type': 'KubernetesRoleStorage'}, + 'compute': {'key': 'compute', 'type': 'KubernetesRoleCompute'}, + 'network': {'key': 'network', 'type': 'KubernetesRoleNetwork'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleResources, self).__init__(**kwargs) + self.storage = kwargs.get('storage', None) + self.compute = kwargs.get('compute', None) + self.network = None + + +class KubernetesRoleStorage(Model): + """Kubernetes role storage resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar storage_classes: Kubernetes storage class info. + :vartype storage_classes: + list[~azure.mgmt.databoxedge.models.KubernetesRoleStorageClassInfo] + :param endpoints: Mount points of shares in role(s). + :type endpoints: list[~azure.mgmt.databoxedge.models.MountPointMap] + """ + + _validation = { + 'storage_classes': {'readonly': True}, + } + + _attribute_map = { + 'storage_classes': {'key': 'storageClasses', 'type': '[KubernetesRoleStorageClassInfo]'}, + 'endpoints': {'key': 'endpoints', 'type': '[MountPointMap]'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleStorage, self).__init__(**kwargs) + self.storage_classes = None + self.endpoints = kwargs.get('endpoints', None) + + +class KubernetesRoleStorageClassInfo(Model): + """Kubernetes storage class info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Storage class name. + :vartype name: str + :ivar type: Storage class type. + :vartype type: str + :ivar posix_compliant: If provisioned storage is posix compliant. Possible + values include: 'Invalid', 'Enabled', 'Disabled' + :vartype posix_compliant: str or + ~azure.mgmt.databoxedge.models.PosixComplianceStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'posix_compliant': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'posix_compliant': {'key': 'posixCompliant', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleStorageClassInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.posix_compliant = None + + +class LoadBalancerConfig(Model): + """Load balancer configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Load balancer type + :vartype type: str + :ivar version: Load balancer version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadBalancerConfig, self).__init__(**kwargs) + self.type = None + self.version = None + + +class MECRole(Role): + """MEC role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param connection_string: Activation key of the MEC. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'AsymmetricEncryptedSecret'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MECRole, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.role_status = kwargs.get('role_status', None) + self.kind = 'MEC' + + +class MetricConfiguration(Model): + """Metric configuration. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The Resource ID on which the metrics should + be pushed. + :type resource_id: str + :param mdm_account: The MDM account to which the counters should be + pushed. + :type mdm_account: str + :param metric_name_space: The MDM namespace to which the counters should + be pushed. This is required if MDMAccount is specified + :type metric_name_space: str + :param counter_sets: Required. Host name for the IoT hub associated to the + device. + :type counter_sets: list[~azure.mgmt.databoxedge.models.MetricCounterSet] + """ + + _validation = { + 'resource_id': {'required': True}, + 'counter_sets': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'mdm_account': {'key': 'mdmAccount', 'type': 'str'}, + 'metric_name_space': {'key': 'metricNameSpace', 'type': 'str'}, + 'counter_sets': {'key': 'counterSets', 'type': '[MetricCounterSet]'}, + } + + def __init__(self, **kwargs): + super(MetricConfiguration, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.mdm_account = kwargs.get('mdm_account', None) + self.metric_name_space = kwargs.get('metric_name_space', None) + self.counter_sets = kwargs.get('counter_sets', None) + + +class MetricCounter(Model): + """The metric counter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The counter name. + :type name: str + :param instance: The instance from which counter should be collected. + :type instance: str + :param dimension_filter: The dimension filter. + :type dimension_filter: + list[~azure.mgmt.databoxedge.models.MetricDimension] + :param additional_dimensions: The additional dimensions to be added to + metric. + :type additional_dimensions: + list[~azure.mgmt.databoxedge.models.MetricDimension] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'str'}, + 'dimension_filter': {'key': 'dimensionFilter', 'type': '[MetricDimension]'}, + 'additional_dimensions': {'key': 'additionalDimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, **kwargs): + super(MetricCounter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.instance = kwargs.get('instance', None) + self.dimension_filter = kwargs.get('dimension_filter', None) + self.additional_dimensions = kwargs.get('additional_dimensions', None) + + +class MetricCounterSet(Model): + """The metric counter set. + + All required parameters must be populated in order to send to Azure. + + :param counters: Required. The counters that should be collected in this + set. + :type counters: list[~azure.mgmt.databoxedge.models.MetricCounter] + """ + + _validation = { + 'counters': {'required': True}, + } + + _attribute_map = { + 'counters': {'key': 'counters', 'type': '[MetricCounter]'}, + } + + def __init__(self, **kwargs): + super(MetricCounterSet, self).__init__(**kwargs) + self.counters = kwargs.get('counters', None) + + +class MetricDimension(Model): + """The metric dimension. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. The dimension type. + :type source_type: str + :param source_name: Required. The dimension value. + :type source_name: str + """ + + _validation = { + 'source_type': {'required': True}, + 'source_name': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'source_name': {'key': 'sourceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricDimension, self).__init__(**kwargs) + self.source_type = kwargs.get('source_type', None) + self.source_name = kwargs.get('source_name', None) + + +class MetricDimensionV1(Model): + """Metric Dimension v1. + + :param name: Name of the metrics dimension. + :type name: str + :param display_name: Display name of the metrics dimension. + :type display_name: str + :param to_be_exported_for_shoebox: To be exported to shoe box. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MetricDimensionV1, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class MetricSpecificationV1(Model): + """Metric specification version 1. + + :param name: Name of the metric. + :type name: str + :param display_name: Display name of the metric. + :type display_name: str + :param display_description: Description of the metric to be displayed. + :type display_description: str + :param unit: Metric units. Possible values include: 'NotSpecified', + 'Percent', 'Count', 'Seconds', 'Milliseconds', 'Bytes', 'BytesPerSecond', + 'CountPerSecond' + :type unit: str or ~azure.mgmt.databoxedge.models.MetricUnit + :param aggregation_type: Metric aggregation type. Possible values include: + 'NotSpecified', 'None', 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + :type aggregation_type: str or + ~azure.mgmt.databoxedge.models.MetricAggregationType + :param dimensions: Metric dimensions, other than default dimension which + is resource. + :type dimensions: list[~azure.mgmt.databoxedge.models.MetricDimensionV1] + :param fill_gap_with_zero: Set true to fill the gaps with zero. + :type fill_gap_with_zero: bool + :param category: Metric category. Possible values include: 'Capacity', + 'Transaction' + :type category: str or ~azure.mgmt.databoxedge.models.MetricCategory + :param resource_id_dimension_name_override: Resource name override. + :type resource_id_dimension_name_override: str + :param supported_time_grain_types: Support granularity of metrics. + :type supported_time_grain_types: list[str or + ~azure.mgmt.databoxedge.models.TimeGrain] + :param supported_aggregation_types: Support metric aggregation type. + :type supported_aggregation_types: list[str or + ~azure.mgmt.databoxedge.models.MetricAggregationType] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimensionV1]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(MetricSpecificationV1, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.dimensions = kwargs.get('dimensions', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.category = kwargs.get('category', None) + self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) + self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + + +class MonitoringMetricConfiguration(ARMBaseModel): + """The metric setting details for the role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param metric_configurations: Required. The metrics configuration details + :type metric_configurations: + list[~azure.mgmt.databoxedge.models.MetricConfiguration] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metric_configurations': {'key': 'properties.metricConfigurations', 'type': '[MetricConfiguration]'}, + } + + def __init__(self, **kwargs): + super(MonitoringMetricConfiguration, self).__init__(**kwargs) + self.metric_configurations = kwargs.get('metric_configurations', None) + + +class MountPointMap(Model): + """The share mount point. + + Variables are only 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 share_id: Required. ID of the share mounted to the role VM. + :type share_id: str + :ivar role_id: ID of the role to which share is mounted. + :vartype role_id: str + :ivar mount_point: Mount point for the share. + :vartype mount_point: str + :ivar mount_type: Mounting type. Possible values include: 'Volume', + 'HostPath' + :vartype mount_type: str or ~azure.mgmt.databoxedge.models.MountType + :ivar role_type: Role type. Possible values include: 'IOT', 'ASA', + 'Functions', 'Cognitive', 'MEC', 'CloudEdgeManagement', 'Kubernetes' + :vartype role_type: str or ~azure.mgmt.databoxedge.models.RoleTypes + """ + + _validation = { + 'share_id': {'required': True}, + 'role_id': {'readonly': True}, + 'mount_point': {'readonly': True}, + 'mount_type': {'readonly': True}, + 'role_type': {'readonly': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'role_id': {'key': 'roleId', 'type': 'str'}, + 'mount_point': {'key': 'mountPoint', 'type': 'str'}, + 'mount_type': {'key': 'mountType', 'type': 'str'}, + 'role_type': {'key': 'roleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MountPointMap, self).__init__(**kwargs) + self.share_id = kwargs.get('share_id', None) + self.role_id = None + self.mount_point = None + self.mount_type = None + self.role_type = None + + +class NetworkAdapter(Model): + """Represents the networkAdapter on a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar adapter_id: Instance ID of network adapter. + :vartype adapter_id: str + :ivar adapter_position: Hardware position of network adapter. + :vartype adapter_position: + ~azure.mgmt.databoxedge.models.NetworkAdapterPosition + :ivar index: Logical index of the adapter. + :vartype index: int + :ivar node_id: Node ID of the network adapter. + :vartype node_id: str + :ivar network_adapter_name: Network adapter name. + :vartype network_adapter_name: str + :ivar label: Hardware label for the adapter. + :vartype label: str + :ivar mac_address: MAC address. + :vartype mac_address: str + :ivar link_speed: Link speed. + :vartype link_speed: long + :ivar status: Value indicating whether this adapter is valid. Possible + values include: 'Inactive', 'Active' + :vartype status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterStatus + :param rdma_status: Value indicating whether this adapter is RDMA capable. + Possible values include: 'Incapable', 'Capable' + :type rdma_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterRDMAStatus + :param dhcp_status: Value indicating whether this adapter has DHCP + enabled. Possible values include: 'Disabled', 'Enabled' + :type dhcp_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterDHCPStatus + :ivar ipv4_configuration: The IPv4 configuration of the network adapter. + :vartype ipv4_configuration: ~azure.mgmt.databoxedge.models.Ipv4Config + :ivar ipv6_configuration: The IPv6 configuration of the network adapter. + :vartype ipv6_configuration: ~azure.mgmt.databoxedge.models.Ipv6Config + :ivar ipv6_link_local_address: The IPv6 local address. + :vartype ipv6_link_local_address: str + :ivar dns_servers: The list of DNS Servers of the device. + :vartype dns_servers: list[str] + """ + + _validation = { + 'adapter_id': {'readonly': True}, + 'adapter_position': {'readonly': True}, + 'index': {'readonly': True}, + 'node_id': {'readonly': True}, + 'network_adapter_name': {'readonly': True}, + 'label': {'readonly': True}, + 'mac_address': {'readonly': True}, + 'link_speed': {'readonly': True}, + 'status': {'readonly': True}, + 'ipv4_configuration': {'readonly': True}, + 'ipv6_configuration': {'readonly': True}, + 'ipv6_link_local_address': {'readonly': True}, + 'dns_servers': {'readonly': True}, + } + + _attribute_map = { + 'adapter_id': {'key': 'adapterId', 'type': 'str'}, + 'adapter_position': {'key': 'adapterPosition', 'type': 'NetworkAdapterPosition'}, + 'index': {'key': 'index', 'type': 'int'}, + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'network_adapter_name': {'key': 'networkAdapterName', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + 'link_speed': {'key': 'linkSpeed', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'rdma_status': {'key': 'rdmaStatus', 'type': 'str'}, + 'dhcp_status': {'key': 'dhcpStatus', 'type': 'str'}, + 'ipv4_configuration': {'key': 'ipv4Configuration', 'type': 'Ipv4Config'}, + 'ipv6_configuration': {'key': 'ipv6Configuration', 'type': 'Ipv6Config'}, + 'ipv6_link_local_address': {'key': 'ipv6LinkLocalAddress', 'type': 'str'}, + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NetworkAdapter, self).__init__(**kwargs) + self.adapter_id = None + self.adapter_position = None + self.index = None + self.node_id = None + self.network_adapter_name = None + self.label = None + self.mac_address = None + self.link_speed = None + self.status = None + self.rdma_status = kwargs.get('rdma_status', None) + self.dhcp_status = kwargs.get('dhcp_status', None) + self.ipv4_configuration = None + self.ipv6_configuration = None + self.ipv6_link_local_address = None + self.dns_servers = None + + +class NetworkAdapterPosition(Model): + """The network adapter position. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar network_group: The network group. Possible values include: 'None', + 'NonRDMA', 'RDMA' + :vartype network_group: str or ~azure.mgmt.databoxedge.models.NetworkGroup + :ivar port: The port. + :vartype port: int + """ + + _validation = { + 'network_group': {'readonly': True}, + 'port': {'readonly': True}, + } + + _attribute_map = { + 'network_group': {'key': 'networkGroup', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NetworkAdapterPosition, self).__init__(**kwargs) + self.network_group = None + self.port = None + + +class NetworkSettings(ARMBaseModel): + """The network settings of a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar network_adapters: The network adapter list on the device. + :vartype network_adapters: + list[~azure.mgmt.databoxedge.models.NetworkAdapter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'network_adapters': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'network_adapters': {'key': 'properties.networkAdapters', 'type': '[NetworkAdapter]'}, + } + + def __init__(self, **kwargs): + super(NetworkSettings, self).__init__(**kwargs) + self.network_adapters = None + + +class Node(ARMBaseModel): + """Represents a single node in a Data box Edge/Gateway device + Gateway devices, standalone Edge devices and a single node cluster Edge + device will all have 1 node + Multi-node Edge devices will have more than 1 nodes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar node_status: The current status of the individual node. Possible + values include: 'Unknown', 'Up', 'Down', 'Rebooting', 'ShuttingDown' + :vartype node_status: str or ~azure.mgmt.databoxedge.models.NodeStatus + :ivar node_chassis_serial_number: Serial number of the Chassis + :vartype node_chassis_serial_number: str + :ivar node_serial_number: Serial number of the individual node + :vartype node_serial_number: str + :ivar node_display_name: Display Name of the individual node + :vartype node_display_name: str + :ivar node_friendly_software_version: Friendly software version name that + is currently installed on the node + :vartype node_friendly_software_version: str + :ivar node_hcs_version: HCS version that is currently installed on the + node + :vartype node_hcs_version: str + :ivar node_instance_id: Guid instance id of the node + :vartype node_instance_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'node_status': {'readonly': True}, + 'node_chassis_serial_number': {'readonly': True}, + 'node_serial_number': {'readonly': True}, + 'node_display_name': {'readonly': True}, + 'node_friendly_software_version': {'readonly': True}, + 'node_hcs_version': {'readonly': True}, + 'node_instance_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'node_status': {'key': 'properties.nodeStatus', 'type': 'str'}, + 'node_chassis_serial_number': {'key': 'properties.nodeChassisSerialNumber', 'type': 'str'}, + 'node_serial_number': {'key': 'properties.nodeSerialNumber', 'type': 'str'}, + 'node_display_name': {'key': 'properties.nodeDisplayName', 'type': 'str'}, + 'node_friendly_software_version': {'key': 'properties.nodeFriendlySoftwareVersion', 'type': 'str'}, + 'node_hcs_version': {'key': 'properties.nodeHcsVersion', 'type': 'str'}, + 'node_instance_id': {'key': 'properties.nodeInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Node, self).__init__(**kwargs) + self.node_status = None + self.node_chassis_serial_number = None + self.node_serial_number = None + self.node_display_name = None + self.node_friendly_software_version = None + self.node_hcs_version = None + self.node_instance_id = None + + +class NodeInfo(Model): + """Kubernetes node info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Node name. + :vartype name: str + :ivar type: Node type - Master/Worker. Possible values include: 'Invalid', + 'Master', 'Worker' + :vartype type: str or ~azure.mgmt.databoxedge.models.KubernetesNodeType + :param ip_configuration: IP Configuration of the Kubernetes node. + :type ip_configuration: + list[~azure.mgmt.databoxedge.models.KubernetesIPConfiguration] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_configuration': {'key': 'ipConfiguration', 'type': '[KubernetesIPConfiguration]'}, + } + + def __init__(self, **kwargs): + super(NodeInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.ip_configuration = kwargs.get('ip_configuration', None) + + +class Operation(Model): + """Operations. + + :param name: Name of the operation. + :type name: str + :param display: Properties displayed for the operation. + :type display: ~azure.mgmt.databoxedge.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param is_data_action: Indicates whether the operation is a data action + :type is_data_action: bool + :param service_specification: Service specification. + :type service_specification: + ~azure.mgmt.databoxedge.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationDisplay(Model): + """Operation display properties. + + :param provider: Provider name. + :type provider: str + :param resource: The type of resource in which the operation is performed. + :type resource: str + :param operation: Operation to be performed on the resource. + :type operation: str + :param description: Description of the operation to be performed. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class Order(ARMBaseModel): + """The order details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param contact_information: Required. The contact details. + :type contact_information: ~azure.mgmt.databoxedge.models.ContactDetails + :param shipping_address: The shipping address. + :type shipping_address: ~azure.mgmt.databoxedge.models.Address + :ivar current_status: Current status of the order. + :vartype current_status: ~azure.mgmt.databoxedge.models.OrderStatus + :ivar order_history: List of status changes in the order. + :vartype order_history: list[~azure.mgmt.databoxedge.models.OrderStatus] + :ivar serial_number: Serial number of the device. + :vartype serial_number: str + :ivar delivery_tracking_info: Tracking information for the package + delivered to the customer whether it has an original or a replacement + device. + :vartype delivery_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :ivar return_tracking_info: Tracking information for the package returned + from the customer whether it has an original or a replacement device. + :vartype return_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :param shipment_type: ShipmentType of the order. Possible values include: + 'NotApplicable', 'ShippedToCustomer', 'SelfPickup' + :type shipment_type: str or ~azure.mgmt.databoxedge.models.ShipmentType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_information': {'required': True}, + 'current_status': {'readonly': True}, + 'order_history': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'delivery_tracking_info': {'readonly': True}, + 'return_tracking_info': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'contact_information': {'key': 'properties.contactInformation', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'Address'}, + 'current_status': {'key': 'properties.currentStatus', 'type': 'OrderStatus'}, + 'order_history': {'key': 'properties.orderHistory', 'type': '[OrderStatus]'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'delivery_tracking_info': {'key': 'properties.deliveryTrackingInfo', 'type': '[TrackingInfo]'}, + 'return_tracking_info': {'key': 'properties.returnTrackingInfo', 'type': '[TrackingInfo]'}, + 'shipment_type': {'key': 'properties.shipmentType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Order, self).__init__(**kwargs) + self.contact_information = kwargs.get('contact_information', None) + self.shipping_address = kwargs.get('shipping_address', None) + self.current_status = None + self.order_history = None + self.serial_number = None + self.delivery_tracking_info = None + self.return_tracking_info = None + self.shipment_type = kwargs.get('shipment_type', None) + + +class OrderStatus(Model): + """Represents a single status change. + + Variables are only 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 status: Required. Status of the order as per the allowed status + types. Possible values include: 'Untracked', 'AwaitingFulfilment', + 'AwaitingPreparation', 'AwaitingShipment', 'Shipped', 'Arriving', + 'Delivered', 'ReplacementRequested', 'LostDevice', 'Declined', + 'ReturnInitiated', 'AwaitingReturnShipment', 'ShippedBack', + 'CollectedAtMicrosoft', 'AwaitingPickup', 'PickupCompleted', + 'AwaitingDrop' + :type status: str or ~azure.mgmt.databoxedge.models.OrderState + :ivar update_date_time: Time of status update. + :vartype update_date_time: datetime + :param comments: Comments related to this status change. + :type comments: str + :ivar tracking_information: Tracking information related to the state in + the ordering flow + :vartype tracking_information: ~azure.mgmt.databoxedge.models.TrackingInfo + :ivar additional_order_details: Dictionary to hold generic information + which is not stored + by the already existing properties + :vartype additional_order_details: dict[str, str] + """ + + _validation = { + 'status': {'required': True}, + 'update_date_time': {'readonly': True}, + 'tracking_information': {'readonly': True}, + 'additional_order_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'update_date_time': {'key': 'updateDateTime', 'type': 'iso-8601'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'tracking_information': {'key': 'trackingInformation', 'type': 'TrackingInfo'}, + 'additional_order_details': {'key': 'additionalOrderDetails', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(OrderStatus, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.update_date_time = None + self.comments = kwargs.get('comments', None) + self.tracking_information = None + self.additional_order_details = None + + +class PeriodicTimerEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. Periodic timer details. + :type source_info: ~azure.mgmt.databoxedge.models.PeriodicTimerSourceInfo + :param sink_info: Required. Role Sink information. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'PeriodicTimerSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PeriodicTimerEventTrigger, self).__init__(**kwargs) + self.source_info = kwargs.get('source_info', None) + self.sink_info = kwargs.get('sink_info', None) + self.custom_context_tag = kwargs.get('custom_context_tag', None) + self.kind = 'PeriodicTimerEvent' + + +class PeriodicTimerSourceInfo(Model): + """Periodic timer event source. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. The time of the day that results in a valid + trigger. Schedule is computed with reference to the time specified upto + seconds. If timezone is not specified the time will considered to be in + device timezone. The value will always be returned as UTC time. + :type start_time: datetime + :param schedule: Required. Periodic frequency at which timer event needs + to be raised. Supports daily, hourly, minutes, and seconds. + :type schedule: str + :param topic: Topic where periodic events are published to IoT device. + :type topic: str + """ + + _validation = { + 'start_time': {'required': True}, + 'schedule': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'schedule': {'key': 'schedule', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PeriodicTimerSourceInfo, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.schedule = kwargs.get('schedule', None) + self.topic = kwargs.get('topic', None) + + +class RefreshDetails(Model): + """Fields for tracking refresh job on the share or container. + + :param in_progress_refresh_job_id: If a refresh job is currently in + progress on this share or container, this field indicates the ARM resource + ID of that job. The field is empty if no job is in progress. + :type in_progress_refresh_job_id: str + :param last_completed_refresh_job_time_in_utc: Indicates the completed + time for the last refresh job on this particular share or container, if + any.This could be a failed job or a successful job. + :type last_completed_refresh_job_time_in_utc: datetime + :param error_manifest_file: Indicates the relative path of the error xml + for the last refresh job on this particular share or container, if any. + This could be a failed job or a successful job. + :type error_manifest_file: str + :param last_job: Indicates the id of the last refresh job on this + particular share or container,if any. This could be a failed job or a + successful job. + :type last_job: str + """ + + _attribute_map = { + 'in_progress_refresh_job_id': {'key': 'inProgressRefreshJobId', 'type': 'str'}, + 'last_completed_refresh_job_time_in_utc': {'key': 'lastCompletedRefreshJobTimeInUTC', 'type': 'iso-8601'}, + 'error_manifest_file': {'key': 'errorManifestFile', 'type': 'str'}, + 'last_job': {'key': 'lastJob', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RefreshDetails, self).__init__(**kwargs) + self.in_progress_refresh_job_id = kwargs.get('in_progress_refresh_job_id', None) + self.last_completed_refresh_job_time_in_utc = kwargs.get('last_completed_refresh_job_time_in_utc', None) + self.error_manifest_file = kwargs.get('error_manifest_file', None) + self.last_job = kwargs.get('last_job', None) + + +class ResourceIdentity(Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: Identity type. Possible values include: 'None', + 'SystemAssigned', 'UserAssigned' + :type type: str or ~azure.mgmt.databoxedge.models.MsiIdentityType + :ivar principal_id: Service Principal Id backing the Msi + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = None + self.tenant_id = None + + +class ResourceMoveDetails(Model): + """Fields for tracking resource move. + + :param operation_in_progress: Denotes whether move operation is in + progress. Possible values include: 'None', 'ResourceMoveInProgress', + 'ResourceMoveFailed' + :type operation_in_progress: str or + ~azure.mgmt.databoxedge.models.ResourceMoveStatus + :param operation_in_progress_lock_timeout_in_utc: Denotes the timeout of + the operation to finish + :type operation_in_progress_lock_timeout_in_utc: datetime + """ + + _attribute_map = { + 'operation_in_progress': {'key': 'operationInProgress', 'type': 'str'}, + 'operation_in_progress_lock_timeout_in_utc': {'key': 'operationInProgressLockTimeoutInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ResourceMoveDetails, self).__init__(**kwargs) + self.operation_in_progress = kwargs.get('operation_in_progress', None) + self.operation_in_progress_lock_timeout_in_utc = kwargs.get('operation_in_progress_lock_timeout_in_utc', None) + + +class ResourceTypeSku(Model): + """Resource type Sku object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The resource type. + :vartype resource_type: str + :ivar skus: The skus. + :vartype skus: list[~azure.mgmt.databoxedge.models.SkuInformation] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'skus': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[SkuInformation]'}, + } + + def __init__(self, **kwargs): + super(ResourceTypeSku, self).__init__(**kwargs) + self.resource_type = None + self.skus = None + + +class RoleSinkInfo(Model): + """Compute role against which events will be raised. + + All required parameters must be populated in order to send to Azure. + + :param role_id: Required. Compute role ID. + :type role_id: str + """ + + _validation = { + 'role_id': {'required': True}, + } + + _attribute_map = { + 'role_id': {'key': 'roleId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoleSinkInfo, self).__init__(**kwargs) + self.role_id = kwargs.get('role_id', None) + + +class SecuritySettings(ARMBaseModel): + """The security settings of a device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param device_admin_password: Required. Device administrator password as + an encrypted string (encrypted using RSA PKCS #1) is used to sign into the + local web UI of the device. The Actual password should have at least 8 + characters that are a combination of uppercase, lowercase, numeric, and + special characters. + :type device_admin_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'device_admin_password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_admin_password': {'key': 'properties.deviceAdminPassword', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, **kwargs): + super(SecuritySettings, self).__init__(**kwargs) + self.device_admin_password = kwargs.get('device_admin_password', None) + + +class ServiceSpecification(Model): + """Service specification. + + :param metric_specifications: Metric specification as defined by shoebox. + :type metric_specifications: + list[~azure.mgmt.databoxedge.models.MetricSpecificationV1] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecificationV1]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class Share(ARMBaseModel): + """Represents a share on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Share on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the share. + :type description: str + :param share_status: Required. Current status of the share. Possible + values include: 'Offline', 'Unknown', 'OK', 'Updating', 'NeedsAttention' + :type share_status: str or ~azure.mgmt.databoxedge.models.ShareStatus + :param monitoring_status: Required. Current monitoring status of the + share. Possible values include: 'Enabled', 'Disabled' + :type monitoring_status: str or + ~azure.mgmt.databoxedge.models.MonitoringStatus + :param azure_container_info: Azure container mapping for the share. + :type azure_container_info: + ~azure.mgmt.databoxedge.models.AzureContainerInfo + :param access_protocol: Required. Access protocol to be used by the share. + Possible values include: 'SMB', 'NFS' + :type access_protocol: str or + ~azure.mgmt.databoxedge.models.ShareAccessProtocol + :param user_access_rights: Mapping of users and corresponding access + rights on the share (required for SMB protocol). + :type user_access_rights: + list[~azure.mgmt.databoxedge.models.UserAccessRight] + :param client_access_rights: List of IP addresses and corresponding access + rights on the share(required for NFS protocol). + :type client_access_rights: + list[~azure.mgmt.databoxedge.models.ClientAccessRight] + :param refresh_details: Details of the refresh job on this share. + :type refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar share_mappings: Share mount point to the role. + :vartype share_mappings: + list[~azure.mgmt.databoxedge.models.MountPointMap] + :param data_policy: Data policy of the share. Possible values include: + 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_status': {'required': True}, + 'monitoring_status': {'required': True}, + 'access_protocol': {'required': True}, + 'share_mappings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'share_status': {'key': 'properties.shareStatus', 'type': 'str'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + 'azure_container_info': {'key': 'properties.azureContainerInfo', 'type': 'AzureContainerInfo'}, + 'access_protocol': {'key': 'properties.accessProtocol', 'type': 'str'}, + 'user_access_rights': {'key': 'properties.userAccessRights', 'type': '[UserAccessRight]'}, + 'client_access_rights': {'key': 'properties.clientAccessRights', 'type': '[ClientAccessRight]'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Share, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.description = kwargs.get('description', None) + self.share_status = kwargs.get('share_status', None) + self.monitoring_status = kwargs.get('monitoring_status', None) + self.azure_container_info = kwargs.get('azure_container_info', None) + self.access_protocol = kwargs.get('access_protocol', None) + self.user_access_rights = kwargs.get('user_access_rights', None) + self.client_access_rights = kwargs.get('client_access_rights', None) + self.refresh_details = kwargs.get('refresh_details', None) + self.share_mappings = None + self.data_policy = kwargs.get('data_policy', None) + + +class ShareAccessRight(Model): + """Specifies the mapping between this particular user and the type of access + he has on shares on this device. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. The share ID. + :type share_id: str + :param access_type: Required. Type of access to be allowed on the share + for this user. Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'share_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShareAccessRight, self).__init__(**kwargs) + self.share_id = kwargs.get('share_id', None) + self.access_type = kwargs.get('access_type', None) + + +class Sku(Model): + """The SKU type. + + :param name: SKU name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC' + :type name: str or ~azure.mgmt.databoxedge.models.SkuName + :param tier: The SKU tier. This is based on the SKU name. Possible values + include: 'Standard' + :type tier: str or ~azure.mgmt.databoxedge.models.SkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + + +class SkuCost(Model): + """The metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The cost quantity. + :vartype quantity: long + :ivar extended_unit: The extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class SkuInformation(Model): + """Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The sku name. + :vartype name: str + :ivar tier: The sku tier. + :vartype tier: str + :ivar kind: The sku kind. + :vartype kind: str + :ivar family: The Sku family. + :vartype family: str + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar locations: The locations where Sku is available. + :vartype locations: list[str] + :ivar location_info: The locations where Sku is available with zones and + sites info + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar required_quota_ids: The required quotaIds for the sku to be + available. + :vartype required_quota_ids: list[str] + :ivar required_features: The required features for the sku to be + available. + :vartype required_features: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'kind': {'readonly': True}, + 'family': {'readonly': True}, + 'costs': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'required_quota_ids': {'readonly': True}, + 'required_features': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'required_quota_ids': {'key': 'requiredQuotaIds', 'type': '[str]'}, + 'required_features': {'key': 'requiredFeatures', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SkuInformation, self).__init__(**kwargs) + self.name = None + self.tier = None + self.kind = None + self.family = None + self.costs = None + self.locations = None + self.location_info = None + self.required_quota_ids = None + self.required_features = None + + +class SkuInformationList(Model): + """List of SKU Information objects. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of ResourceTypeSku objects + :vartype value: list[~azure.mgmt.databoxedge.models.ResourceTypeSku] + :ivar next_link: Links to the next set of results + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceTypeSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuInformationList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class SkuLocationInfo(Model): + """The location info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: The location. + :vartype location: str + :ivar zones: The zones. + :vartype zones: list[str] + :ivar sites: The sites. + :vartype sites: list[str] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'sites': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'sites': {'key': 'sites', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.sites = None + + +class StorageAccount(ARMBaseModel): + """Represents a Storage Account on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccount object on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the storage Account. + :type description: str + :param storage_account_status: Current status of the storage account. + Possible values include: 'OK', 'Offline', 'Unknown', 'Updating', + 'NeedsAttention' + :type storage_account_status: str or + ~azure.mgmt.databoxedge.models.StorageAccountStatus + :param data_policy: Required. Data policy of the storage Account. Possible + values include: 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + :param storage_account_credential_id: Storage Account Credential Id + :type storage_account_credential_id: str + :ivar blob_endpoint: BlobEndpoint of Storage Account + :vartype blob_endpoint: str + :ivar container_count: The Container Count. Present only for Storage + Accounts with DataPolicy set to Cloud. + :vartype container_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_policy': {'required': True}, + 'blob_endpoint': {'readonly': True}, + 'container_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'storage_account_status': {'key': 'properties.storageAccountStatus', 'type': 'str'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + 'storage_account_credential_id': {'key': 'properties.storageAccountCredentialId', 'type': 'str'}, + 'blob_endpoint': {'key': 'properties.blobEndpoint', 'type': 'str'}, + 'container_count': {'key': 'properties.containerCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(StorageAccount, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.description = kwargs.get('description', None) + self.storage_account_status = kwargs.get('storage_account_status', None) + self.data_policy = kwargs.get('data_policy', None) + self.storage_account_credential_id = kwargs.get('storage_account_credential_id', None) + self.blob_endpoint = None + self.container_count = None + + +class StorageAccountCredential(ARMBaseModel): + """The storage account credential. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccountCredential object + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param alias: Required. Alias for the storage account. + :type alias: str + :param user_name: Username for the storage account. + :type user_name: str + :param account_key: Encrypted storage key. + :type account_key: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param connection_string: Connection string for the storage account. Use + this string if username and account key are not specified. + :type connection_string: str + :param ssl_status: Required. Signifies whether SSL needs to be enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type ssl_status: str or ~azure.mgmt.databoxedge.models.SSLStatus + :param blob_domain_name: Blob end point for private clouds. + :type blob_domain_name: str + :param account_type: Required. Type of storage accessed on the storage + account. Possible values include: 'GeneralPurposeStorage', 'BlobStorage' + :type account_type: str or ~azure.mgmt.databoxedge.models.AccountType + :param storage_account_id: Id of the storage account. + :type storage_account_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alias': {'required': True}, + 'ssl_status': {'required': True}, + 'account_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'alias': {'key': 'properties.alias', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'account_key': {'key': 'properties.accountKey', 'type': 'AsymmetricEncryptedSecret'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'ssl_status': {'key': 'properties.sslStatus', 'type': 'str'}, + 'blob_domain_name': {'key': 'properties.blobDomainName', 'type': 'str'}, + 'account_type': {'key': 'properties.accountType', 'type': 'str'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccountCredential, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.alias = kwargs.get('alias', None) + self.user_name = kwargs.get('user_name', None) + self.account_key = kwargs.get('account_key', None) + self.connection_string = kwargs.get('connection_string', None) + self.ssl_status = kwargs.get('ssl_status', None) + self.blob_domain_name = kwargs.get('blob_domain_name', None) + self.account_type = kwargs.get('account_type', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + + +class SubscriptionRegisteredFeatures(Model): + """SubscriptionRegisteredFeatures. + + :param name: + :type name: str + :param state: + :type state: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionRegisteredFeatures, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.state = kwargs.get('state', None) + + +class SymmetricKey(Model): + """Symmetric key for authentication. + + :param connection_string: Connection string based on the symmetric key. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, **kwargs): + super(SymmetricKey, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.databoxedge.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TrackingInfo(Model): + """Tracking courier information. + + :param serial_number: Serial number of the device being tracked. + :type serial_number: str + :param carrier_name: Name of the carrier used in the delivery. + :type carrier_name: str + :param tracking_id: Tracking ID of the shipment. + :type tracking_id: str + :param tracking_url: Tracking URL of the shipment. + :type tracking_url: str + """ + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackingInfo, self).__init__(**kwargs) + self.serial_number = kwargs.get('serial_number', None) + self.carrier_name = kwargs.get('carrier_name', None) + self.tracking_id = kwargs.get('tracking_id', None) + self.tracking_url = kwargs.get('tracking_url', None) + + +class UpdateDownloadProgress(Model): + """Details about the download progress of update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar download_phase: The download phase. Possible values include: + 'Unknown', 'Initializing', 'Downloading', 'Verifying' + :vartype download_phase: str or + ~azure.mgmt.databoxedge.models.DownloadPhase + :ivar percent_complete: Percentage of completion. + :vartype percent_complete: int + :ivar total_bytes_to_download: Total bytes to download. + :vartype total_bytes_to_download: float + :ivar total_bytes_downloaded: Total bytes downloaded. + :vartype total_bytes_downloaded: float + :ivar number_of_updates_to_download: Number of updates to download. + :vartype number_of_updates_to_download: int + :ivar number_of_updates_downloaded: Number of updates downloaded. + :vartype number_of_updates_downloaded: int + """ + + _validation = { + 'download_phase': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'total_bytes_to_download': {'readonly': True}, + 'total_bytes_downloaded': {'readonly': True}, + 'number_of_updates_to_download': {'readonly': True}, + 'number_of_updates_downloaded': {'readonly': True}, + } + + _attribute_map = { + 'download_phase': {'key': 'downloadPhase', 'type': 'str'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'total_bytes_to_download': {'key': 'totalBytesToDownload', 'type': 'float'}, + 'total_bytes_downloaded': {'key': 'totalBytesDownloaded', 'type': 'float'}, + 'number_of_updates_to_download': {'key': 'numberOfUpdatesToDownload', 'type': 'int'}, + 'number_of_updates_downloaded': {'key': 'numberOfUpdatesDownloaded', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdateDownloadProgress, self).__init__(**kwargs) + self.download_phase = None + self.percent_complete = None + self.total_bytes_to_download = None + self.total_bytes_downloaded = None + self.number_of_updates_to_download = None + self.number_of_updates_downloaded = None + + +class UpdateInstallProgress(Model): + """Progress details during installation of updates. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar percent_complete: Percentage completed. + :vartype percent_complete: int + :ivar number_of_updates_to_install: Number of updates to install. + :vartype number_of_updates_to_install: int + :ivar number_of_updates_installed: Number of updates installed. + :vartype number_of_updates_installed: int + """ + + _validation = { + 'percent_complete': {'readonly': True}, + 'number_of_updates_to_install': {'readonly': True}, + 'number_of_updates_installed': {'readonly': True}, + } + + _attribute_map = { + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'number_of_updates_to_install': {'key': 'numberOfUpdatesToInstall', 'type': 'int'}, + 'number_of_updates_installed': {'key': 'numberOfUpdatesInstalled', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdateInstallProgress, self).__init__(**kwargs) + self.percent_complete = None + self.number_of_updates_to_install = None + self.number_of_updates_installed = None + + +class UpdateSummary(ARMBaseModel): + """Details about ongoing updates and availability of updates on the device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param device_version_number: The current version of the device in format: + 1.2.17312.13.", + :type device_version_number: str + :param friendly_device_version_name: The current version of the device in + text format. + :type friendly_device_version_name: str + :param device_last_scanned_date_time: The last time when a scan was done + on the device. + :type device_last_scanned_date_time: datetime + :param last_completed_scan_job_date_time: The time when the last scan job + was completed (success/cancelled/failed) on the appliance. + :type last_completed_scan_job_date_time: datetime + :ivar last_completed_download_job_date_time: The time when the last + Download job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_download_job_date_time: datetime + :ivar last_completed_install_job_date_time: The time when the last Install + job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_install_job_date_time: datetime + :ivar total_number_of_updates_available: The number of updates available + for the current device version as per the last device scan. + :vartype total_number_of_updates_available: int + :ivar total_number_of_updates_pending_download: The total number of items + pending download. + :vartype total_number_of_updates_pending_download: int + :ivar total_number_of_updates_pending_install: The total number of items + pending install. + :vartype total_number_of_updates_pending_install: int + :ivar reboot_behavior: Indicates if updates are available and at least one + of the updates needs a reboot. Possible values include: 'NeverReboots', + 'RequiresReboot', 'RequestReboot' + :vartype reboot_behavior: str or + ~azure.mgmt.databoxedge.models.InstallRebootBehavior + :ivar ongoing_update_operation: The current update operation. Possible + values include: 'None', 'Scan', 'Download', 'Install' + :vartype ongoing_update_operation: str or + ~azure.mgmt.databoxedge.models.UpdateOperation + :ivar in_progress_download_job_id: The job ID of the download job in + progress. + :vartype in_progress_download_job_id: str + :ivar in_progress_install_job_id: The job ID of the install job in + progress. + :vartype in_progress_install_job_id: str + :ivar in_progress_download_job_started_date_time: The time when the + currently running download (if any) started. + :vartype in_progress_download_job_started_date_time: datetime + :ivar in_progress_install_job_started_date_time: The time when the + currently running install (if any) started. + :vartype in_progress_install_job_started_date_time: datetime + :ivar update_titles: The list of updates available for install. + :vartype update_titles: list[str] + :ivar total_update_size_in_bytes: The total size of updates available for + download in bytes. + :vartype total_update_size_in_bytes: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_completed_download_job_date_time': {'readonly': True}, + 'last_completed_install_job_date_time': {'readonly': True}, + 'total_number_of_updates_available': {'readonly': True}, + 'total_number_of_updates_pending_download': {'readonly': True}, + 'total_number_of_updates_pending_install': {'readonly': True}, + 'reboot_behavior': {'readonly': True}, + 'ongoing_update_operation': {'readonly': True}, + 'in_progress_download_job_id': {'readonly': True}, + 'in_progress_install_job_id': {'readonly': True}, + 'in_progress_download_job_started_date_time': {'readonly': True}, + 'in_progress_install_job_started_date_time': {'readonly': True}, + 'update_titles': {'readonly': True}, + 'total_update_size_in_bytes': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_version_number': {'key': 'properties.deviceVersionNumber', 'type': 'str'}, + 'friendly_device_version_name': {'key': 'properties.friendlyDeviceVersionName', 'type': 'str'}, + 'device_last_scanned_date_time': {'key': 'properties.deviceLastScannedDateTime', 'type': 'iso-8601'}, + 'last_completed_scan_job_date_time': {'key': 'properties.lastCompletedScanJobDateTime', 'type': 'iso-8601'}, + 'last_completed_download_job_date_time': {'key': 'properties.lastCompletedDownloadJobDateTime', 'type': 'iso-8601'}, + 'last_completed_install_job_date_time': {'key': 'properties.lastCompletedInstallJobDateTime', 'type': 'iso-8601'}, + 'total_number_of_updates_available': {'key': 'properties.totalNumberOfUpdatesAvailable', 'type': 'int'}, + 'total_number_of_updates_pending_download': {'key': 'properties.totalNumberOfUpdatesPendingDownload', 'type': 'int'}, + 'total_number_of_updates_pending_install': {'key': 'properties.totalNumberOfUpdatesPendingInstall', 'type': 'int'}, + 'reboot_behavior': {'key': 'properties.rebootBehavior', 'type': 'str'}, + 'ongoing_update_operation': {'key': 'properties.ongoingUpdateOperation', 'type': 'str'}, + 'in_progress_download_job_id': {'key': 'properties.inProgressDownloadJobId', 'type': 'str'}, + 'in_progress_install_job_id': {'key': 'properties.inProgressInstallJobId', 'type': 'str'}, + 'in_progress_download_job_started_date_time': {'key': 'properties.inProgressDownloadJobStartedDateTime', 'type': 'iso-8601'}, + 'in_progress_install_job_started_date_time': {'key': 'properties.inProgressInstallJobStartedDateTime', 'type': 'iso-8601'}, + 'update_titles': {'key': 'properties.updateTitles', 'type': '[str]'}, + 'total_update_size_in_bytes': {'key': 'properties.totalUpdateSizeInBytes', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(UpdateSummary, self).__init__(**kwargs) + self.device_version_number = kwargs.get('device_version_number', None) + self.friendly_device_version_name = kwargs.get('friendly_device_version_name', None) + self.device_last_scanned_date_time = kwargs.get('device_last_scanned_date_time', None) + self.last_completed_scan_job_date_time = kwargs.get('last_completed_scan_job_date_time', None) + self.last_completed_download_job_date_time = None + self.last_completed_install_job_date_time = None + self.total_number_of_updates_available = None + self.total_number_of_updates_pending_download = None + self.total_number_of_updates_pending_install = None + self.reboot_behavior = None + self.ongoing_update_operation = None + self.in_progress_download_job_id = None + self.in_progress_install_job_id = None + self.in_progress_download_job_started_date_time = None + self.in_progress_install_job_started_date_time = None + self.update_titles = None + self.total_update_size_in_bytes = None + + +class UploadCertificateRequest(Model): + """The upload certificate request. + + All required parameters must be populated in order to send to Azure. + + :param authentication_type: The authentication type. Possible values + include: 'Invalid', 'AzureActiveDirectory' + :type authentication_type: str or + ~azure.mgmt.databoxedge.models.AuthenticationType + :param certificate: Required. The base64 encoded certificate raw data. + :type certificate: str + """ + + _validation = { + 'certificate': {'required': True}, + } + + _attribute_map = { + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'str'}, + 'certificate': {'key': 'properties.certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UploadCertificateRequest, self).__init__(**kwargs) + self.authentication_type = kwargs.get('authentication_type', None) + self.certificate = kwargs.get('certificate', None) + + +class UploadCertificateResponse(Model): + """The upload registration certificate response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param auth_type: Specifies authentication type. Possible values include: + 'Invalid', 'AzureActiveDirectory' + :type auth_type: str or ~azure.mgmt.databoxedge.models.AuthenticationType + :ivar resource_id: The resource ID of the Data Box Edge/Gateway device. + :vartype resource_id: str + :ivar aad_authority: Azure Active Directory tenant authority. + :vartype aad_authority: str + :ivar aad_tenant_id: Azure Active Directory tenant ID. + :vartype aad_tenant_id: str + :ivar service_principal_client_id: Azure Active Directory service + principal client ID. + :vartype service_principal_client_id: str + :ivar service_principal_object_id: Azure Active Directory service + principal object ID. + :vartype service_principal_object_id: str + :ivar azure_management_endpoint_audience: The azure management endpoint + audience. + :vartype azure_management_endpoint_audience: str + :ivar aad_audience: Identifier of the target resource that is the + recipient of the requested token. + :vartype aad_audience: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'aad_authority': {'readonly': True}, + 'aad_tenant_id': {'readonly': True}, + 'service_principal_client_id': {'readonly': True}, + 'service_principal_object_id': {'readonly': True}, + 'azure_management_endpoint_audience': {'readonly': True}, + 'aad_audience': {'readonly': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'aad_authority': {'key': 'aadAuthority', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, + 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UploadCertificateResponse, self).__init__(**kwargs) + self.auth_type = kwargs.get('auth_type', None) + self.resource_id = None + self.aad_authority = None + self.aad_tenant_id = None + self.service_principal_client_id = None + self.service_principal_object_id = None + self.azure_management_endpoint_audience = None + self.aad_audience = None + + +class User(ARMBaseModel): + """Represents a user who has access to one or more shares on the Data Box + Edge/Gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: User in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param encrypted_password: The password details. + :type encrypted_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :ivar share_access_rights: List of shares that the user has rights on. + This field should not be specified during user creation. + :vartype share_access_rights: + list[~azure.mgmt.databoxedge.models.ShareAccessRight] + :param user_type: Type of the user. Possible values include: 'Share', + 'LocalManagement', 'ARM' + :type user_type: str or ~azure.mgmt.databoxedge.models.UserType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_access_rights': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'encrypted_password': {'key': 'properties.encryptedPassword', 'type': 'AsymmetricEncryptedSecret'}, + 'share_access_rights': {'key': 'properties.shareAccessRights', 'type': '[ShareAccessRight]'}, + 'user_type': {'key': 'properties.userType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.encrypted_password = kwargs.get('encrypted_password', None) + self.share_access_rights = None + self.user_type = kwargs.get('user_type', None) + + +class UserAccessRight(Model): + """The mapping between a particular user and the access type on the SMB share. + + All required parameters must be populated in order to send to Azure. + + :param user_id: Required. User ID (already existing in the device). + :type user_id: str + :param access_type: Required. Type of access to be allowed for the user. + Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'user_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserAccessRight, self).__init__(**kwargs) + self.user_id = kwargs.get('user_id', None) + self.access_type = kwargs.get('access_type', None) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_models_py3.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_models_py3.py new file mode 100644 index 000000000000..c357d97af216 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_models_py3.py @@ -0,0 +1,4418 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ARMBaseModel(Model): + """Represents the base class for all object models. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ARMBaseModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Addon(ARMBaseModel): + """Role Addon. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ArcAddon, IoTAddon + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ArcForKubernetes': 'ArcAddon', 'IotEdge': 'IoTAddon'} + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Addon, self).__init__(**kwargs) + self.system_data = system_data + self.kind = None + self.kind = 'Addon' + + +class Address(Model): + """The shipping address of the customer. + + All required parameters must be populated in order to send to Azure. + + :param address_line1: The address line1. + :type address_line1: str + :param address_line2: The address line2. + :type address_line2: str + :param address_line3: The address line3. + :type address_line3: str + :param postal_code: The postal code. + :type postal_code: str + :param city: The city name. + :type city: str + :param state: The state name. + :type state: str + :param country: Required. The country name. + :type country: str + """ + + _validation = { + 'country': {'required': True}, + } + + _attribute_map = { + 'address_line1': {'key': 'addressLine1', 'type': 'str'}, + 'address_line2': {'key': 'addressLine2', 'type': 'str'}, + 'address_line3': {'key': 'addressLine3', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__(self, *, country: str, address_line1: str=None, address_line2: str=None, address_line3: str=None, postal_code: str=None, city: str=None, state: str=None, **kwargs) -> None: + super(Address, self).__init__(**kwargs) + self.address_line1 = address_line1 + self.address_line2 = address_line2 + self.address_line3 = address_line3 + self.postal_code = postal_code + self.city = city + self.state = state + self.country = country + + +class Alert(ARMBaseModel): + """Alert on the data box edge/gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Alert generated in the resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar title: Alert title. + :vartype title: str + :ivar alert_type: Alert type. + :vartype alert_type: str + :ivar appeared_at_date_time: UTC time when the alert appeared. + :vartype appeared_at_date_time: datetime + :ivar recommendation: Alert recommendation. + :vartype recommendation: str + :ivar severity: Severity of the alert. Possible values include: + 'Informational', 'Warning', 'Critical' + :vartype severity: str or ~azure.mgmt.databoxedge.models.AlertSeverity + :ivar error_details: Error details of the alert. + :vartype error_details: ~azure.mgmt.databoxedge.models.AlertErrorDetails + :ivar detailed_information: Alert details. + :vartype detailed_information: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'appeared_at_date_time': {'readonly': True}, + 'recommendation': {'readonly': True}, + 'severity': {'readonly': True}, + 'error_details': {'readonly': True}, + 'detailed_information': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'appeared_at_date_time': {'key': 'properties.appearedAtDateTime', 'type': 'iso-8601'}, + 'recommendation': {'key': 'properties.recommendation', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'error_details': {'key': 'properties.errorDetails', 'type': 'AlertErrorDetails'}, + 'detailed_information': {'key': 'properties.detailedInformation', 'type': '{str}'}, + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.system_data = system_data + self.title = None + self.alert_type = None + self.appeared_at_date_time = None + self.recommendation = None + self.severity = None + self.error_details = None + self.detailed_information = None + + +class AlertErrorDetails(Model): + """Error details for the alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_code: Error code. + :vartype error_code: str + :ivar error_message: Error Message. + :vartype error_message: str + :ivar occurrences: Number of occurrences. + :vartype occurrences: int + """ + + _validation = { + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'occurrences': {'readonly': True}, + } + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'occurrences': {'key': 'occurrences', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(AlertErrorDetails, self).__init__(**kwargs) + self.error_code = None + self.error_message = None + self.occurrences = None + + +class ArcAddon(Addon): + """Arc Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param subscription_id: Required. Arc resource subscription Id + :type subscription_id: str + :param resource_group_name: Required. Arc resource group name + :type resource_group_name: str + :param resource_name: Required. Arc resource Name + :type resource_name: str + :param resource_location: Required. Arc resource location + :type resource_location: str + :ivar version: Arc resource version + :vartype version: str + :ivar host_platform: Host OS supported by the Arc addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'subscription_id': {'required': True}, + 'resource_group_name': {'required': True}, + 'resource_name': {'required': True}, + 'resource_location': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'properties.resourceGroupName', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, subscription_id: str, resource_group_name: str, resource_name: str, resource_location: str, system_data=None, **kwargs) -> None: + super(ArcAddon, self).__init__(system_data=system_data, **kwargs) + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.resource_name = resource_name + self.resource_location = resource_location + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'ArcForKubernetes' + + +class AsymmetricEncryptedSecret(Model): + """Represent the secrets intended for encryption with asymmetric key pair. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. The value of the secret. + :type value: str + :param encryption_cert_thumbprint: Thumbprint certificate used to encrypt + \\"Value\\". If the value is unencrypted, it will be null. + :type encryption_cert_thumbprint: str + :param encryption_algorithm: Required. The algorithm used to encrypt + "Value". Possible values include: 'None', 'AES256', 'RSAES_PKCS1_v_1_5' + :type encryption_algorithm: str or + ~azure.mgmt.databoxedge.models.EncryptionAlgorithm + """ + + _validation = { + 'value': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'encryption_cert_thumbprint': {'key': 'encryptionCertThumbprint', 'type': 'str'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + } + + def __init__(self, *, value: str, encryption_algorithm, encryption_cert_thumbprint: str=None, **kwargs) -> None: + super(AsymmetricEncryptedSecret, self).__init__(**kwargs) + self.value = value + self.encryption_cert_thumbprint = encryption_cert_thumbprint + self.encryption_algorithm = encryption_algorithm + + +class Authentication(Model): + """Authentication mechanism for IoT devices. + + :param symmetric_key: Symmetric key for authentication. + :type symmetric_key: ~azure.mgmt.databoxedge.models.SymmetricKey + """ + + _attribute_map = { + 'symmetric_key': {'key': 'symmetricKey', 'type': 'SymmetricKey'}, + } + + def __init__(self, *, symmetric_key=None, **kwargs) -> None: + super(Authentication, self).__init__(**kwargs) + self.symmetric_key = symmetric_key + + +class AzureContainerInfo(Model): + """Azure container mapping of the endpoint. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_credential_id: Required. ID of the storage account + credential used to access storage. + :type storage_account_credential_id: str + :param container_name: Required. Container name (Based on the data format + specified, this represents the name of Azure Files/Page blob/Block blob). + :type container_name: str + :param data_format: Required. Storage format used for the file represented + by the share. Possible values include: 'BlockBlob', 'PageBlob', + 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + """ + + _validation = { + 'storage_account_credential_id': {'required': True}, + 'container_name': {'required': True}, + 'data_format': {'required': True}, + } + + _attribute_map = { + 'storage_account_credential_id': {'key': 'storageAccountCredentialId', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'data_format': {'key': 'dataFormat', 'type': 'str'}, + } + + def __init__(self, *, storage_account_credential_id: str, container_name: str, data_format, **kwargs) -> None: + super(AzureContainerInfo, self).__init__(**kwargs) + self.storage_account_credential_id = storage_account_credential_id + self.container_name = container_name + self.data_format = data_format + + +class BandwidthSchedule(ARMBaseModel): + """The bandwidth schedule details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Bandwidth object related to ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param start: Required. The start time of the schedule in UTC. + :type start: str + :param stop: Required. The stop time of the schedule in UTC. + :type stop: str + :param rate_in_mbps: Required. The bandwidth rate in Mbps. + :type rate_in_mbps: int + :param days: Required. The days of the week when this schedule is + applicable. + :type days: list[str or ~azure.mgmt.databoxedge.models.DayOfWeek] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start': {'required': True}, + 'stop': {'required': True}, + 'rate_in_mbps': {'required': True}, + 'days': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'start': {'key': 'properties.start', 'type': 'str'}, + 'stop': {'key': 'properties.stop', 'type': 'str'}, + 'rate_in_mbps': {'key': 'properties.rateInMbps', 'type': 'int'}, + 'days': {'key': 'properties.days', 'type': '[str]'}, + } + + def __init__(self, *, start: str, stop: str, rate_in_mbps: int, days, system_data=None, **kwargs) -> None: + super(BandwidthSchedule, self).__init__(**kwargs) + self.system_data = system_data + self.start = start + self.stop = stop + self.rate_in_mbps = rate_in_mbps + self.days = days + + +class ClientAccessRight(Model): + """The mapping between a particular client IP and the type of access client + has on the NFS share. + + All required parameters must be populated in order to send to Azure. + + :param client: Required. IP of the client. + :type client: str + :param access_permission: Required. Type of access to be allowed for the + client. Possible values include: 'NoAccess', 'ReadOnly', 'ReadWrite' + :type access_permission: str or + ~azure.mgmt.databoxedge.models.ClientPermissionType + """ + + _validation = { + 'client': {'required': True}, + 'access_permission': {'required': True}, + } + + _attribute_map = { + 'client': {'key': 'client', 'type': 'str'}, + 'access_permission': {'key': 'accessPermission', 'type': 'str'}, + } + + def __init__(self, *, client: str, access_permission, **kwargs) -> None: + super(ClientAccessRight, self).__init__(**kwargs) + self.client = client + self.access_permission = access_permission + + +class Role(ARMBaseModel): + """Compute role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CloudEdgeManagementRole, IoTRole, KubernetesRole, MECRole + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CloudEdgeManagement': 'CloudEdgeManagementRole', 'IOT': 'IoTRole', 'Kubernetes': 'KubernetesRole', 'MEC': 'MECRole'} + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Role, self).__init__(**kwargs) + self.system_data = system_data + self.kind = None + self.kind = 'Role' + + +class CloudEdgeManagementRole(Role): + """CloudEdgeManagementRole role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :ivar local_management_status: Local Edge Management Status. Possible + values include: 'Enabled', 'Disabled' + :vartype local_management_status: str or + ~azure.mgmt.databoxedge.models.RoleStatus + :ivar edge_profile: Edge Profile of the resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'local_management_status': {'readonly': True}, + 'edge_profile': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'local_management_status': {'key': 'properties.localManagementStatus', 'type': 'str'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, role_status, system_data=None, **kwargs) -> None: + super(CloudEdgeManagementRole, self).__init__(system_data=system_data, **kwargs) + self.local_management_status = None + self.edge_profile = None + self.role_status = role_status + self.kind = 'CloudEdgeManagement' + + +class CloudError(Model): + """An error response from the service. + + :param error: The error details. + :type error: ~azure.mgmt.databoxedge.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.databoxedge.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class CniConfig(Model): + """Cni configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Cni type + :vartype type: str + :ivar version: Cni version + :vartype version: str + :ivar pod_subnet: Pod Subnet + :vartype pod_subnet: str + :ivar service_subnet: Service subnet + :vartype service_subnet: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + 'pod_subnet': {'readonly': True}, + 'service_subnet': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'pod_subnet': {'key': 'podSubnet', 'type': 'str'}, + 'service_subnet': {'key': 'serviceSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CniConfig, self).__init__(**kwargs) + self.type = None + self.version = None + self.pod_subnet = None + self.service_subnet = None + + +class ComputeResource(Model): + """Compute infrastructure Resource. + + All required parameters must be populated in order to send to Azure. + + :param processor_count: Required. Processor count + :type processor_count: int + :param memory_in_gb: Required. Memory in GB + :type memory_in_gb: long + """ + + _validation = { + 'processor_count': {'required': True}, + 'memory_in_gb': {'required': True}, + } + + _attribute_map = { + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'long'}, + } + + def __init__(self, *, processor_count: int, memory_in_gb: int, **kwargs) -> None: + super(ComputeResource, self).__init__(**kwargs) + self.processor_count = processor_count + self.memory_in_gb = memory_in_gb + + +class ContactDetails(Model): + """Contains all the contact details of the customer. + + All required parameters must be populated in order to send to Azure. + + :param contact_person: Required. The contact person name. + :type contact_person: str + :param company_name: Required. The name of the company. + :type company_name: str + :param phone: Required. The phone number. + :type phone: str + :param email_list: Required. The email list. + :type email_list: list[str] + """ + + _validation = { + 'contact_person': {'required': True}, + 'company_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_person': {'key': 'contactPerson', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + } + + def __init__(self, *, contact_person: str, company_name: str, phone: str, email_list, **kwargs) -> None: + super(ContactDetails, self).__init__(**kwargs) + self.contact_person = contact_person + self.company_name = company_name + self.phone = phone + self.email_list = email_list + + +class Container(ARMBaseModel): + """Represents a container on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Container in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar container_status: Current status of the container. Possible values + include: 'OK', 'Offline', 'Unknown', 'Updating', 'NeedsAttention' + :vartype container_status: str or + ~azure.mgmt.databoxedge.models.ContainerStatus + :param data_format: Required. DataFormat for Container. Possible values + include: 'BlockBlob', 'PageBlob', 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + :ivar refresh_details: Details of the refresh job on this container. + :vartype refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar created_date_time: The UTC time when container got created. + :vartype created_date_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'container_status': {'readonly': True}, + 'data_format': {'required': True}, + 'refresh_details': {'readonly': True}, + 'created_date_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'container_status': {'key': 'properties.containerStatus', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, data_format, system_data=None, **kwargs) -> None: + super(Container, self).__init__(**kwargs) + self.system_data = system_data + self.container_status = None + self.data_format = data_format + self.refresh_details = None + self.created_date_time = None + + +class DataBoxEdgeDevice(ARMBaseModel): + """The Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param location: Required. The location of the device. This is a supported + and registered Azure geographical region (for example, West US, East US, + or Southeast Asia). The geographical region of a device cannot be changed + once it is created, but if an identical geographical region is specified + on update, the request will succeed. + :type location: str + :param tags: The list of tags that describe the device. These tags can be + used to view and group this device (across resource groups). + :type tags: dict[str, str] + :param sku: The SKU type. + :type sku: ~azure.mgmt.databoxedge.models.Sku + :param etag: The etag for the devices. + :type etag: str + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :ivar kind: The etag for the devices. Possible values include: + 'AzureDataBoxGateway', 'AzureStackEdge', 'AzureStackHub', + 'AzureModularDataCentre' + :vartype kind: str or ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceKind + :param system_data: DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param data_box_edge_device_status: The status of the Data Box + Edge/Gateway device. Possible values include: 'ReadyToSetup', 'Online', + 'Offline', 'NeedsAttention', 'Disconnected', 'PartiallyDisconnected', + 'Maintenance' + :type data_box_edge_device_status: str or + ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceStatus + :ivar serial_number: The Serial Number of Data Box Edge/Gateway device. + :vartype serial_number: str + :ivar description: The Description of the Data Box Edge/Gateway device. + :vartype description: str + :ivar model_description: The description of the Data Box Edge/Gateway + device model. + :vartype model_description: str + :ivar device_type: The type of the Data Box Edge/Gateway device. Possible + values include: 'DataBoxEdgeDevice' + :vartype device_type: str or ~azure.mgmt.databoxedge.models.DeviceType + :ivar friendly_name: The Data Box Edge/Gateway device name. + :vartype friendly_name: str + :ivar culture: The Data Box Edge/Gateway device culture. + :vartype culture: str + :ivar device_model: The Data Box Edge/Gateway device model. + :vartype device_model: str + :ivar device_software_version: The Data Box Edge/Gateway device software + version. + :vartype device_software_version: str + :ivar device_local_capacity: The Data Box Edge/Gateway device local + capacity in MB. + :vartype device_local_capacity: long + :ivar time_zone: The Data Box Edge/Gateway device timezone. + :vartype time_zone: str + :ivar device_hcs_version: The device software version number of the device + (eg: 1.2.18105.6). + :vartype device_hcs_version: str + :ivar configured_role_types: Type of compute roles configured. + :vartype configured_role_types: list[str or + ~azure.mgmt.databoxedge.models.RoleTypes] + :ivar node_count: The number of nodes in the cluster. + :vartype node_count: int + :ivar resource_move_details: The details of the move operation on this + resource. + :vartype resource_move_details: + ~azure.mgmt.databoxedge.models.ResourceMoveDetails + :ivar edge_profile: The details of Edge Profile for this resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'description': {'readonly': True}, + 'model_description': {'readonly': True}, + 'device_type': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'culture': {'readonly': True}, + 'device_model': {'readonly': True}, + 'device_software_version': {'readonly': True}, + 'device_local_capacity': {'readonly': True}, + 'time_zone': {'readonly': True}, + 'device_hcs_version': {'readonly': True}, + 'configured_role_types': {'readonly': True}, + 'node_count': {'readonly': True}, + 'resource_move_details': {'readonly': True}, + 'edge_profile': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'data_box_edge_device_status': {'key': 'properties.dataBoxEdgeDeviceStatus', 'type': 'str'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'model_description': {'key': 'properties.modelDescription', 'type': 'str'}, + 'device_type': {'key': 'properties.deviceType', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'culture': {'key': 'properties.culture', 'type': 'str'}, + 'device_model': {'key': 'properties.deviceModel', 'type': 'str'}, + 'device_software_version': {'key': 'properties.deviceSoftwareVersion', 'type': 'str'}, + 'device_local_capacity': {'key': 'properties.deviceLocalCapacity', 'type': 'long'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'device_hcs_version': {'key': 'properties.deviceHcsVersion', 'type': 'str'}, + 'configured_role_types': {'key': 'properties.configuredRoleTypes', 'type': '[str]'}, + 'node_count': {'key': 'properties.nodeCount', 'type': 'int'}, + 'resource_move_details': {'key': 'properties.resourceMoveDetails', 'type': 'ResourceMoveDetails'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, etag: str=None, identity=None, system_data=None, data_box_edge_device_status=None, **kwargs) -> None: + super(DataBoxEdgeDevice, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.sku = sku + self.etag = etag + self.identity = identity + self.kind = None + self.system_data = system_data + self.data_box_edge_device_status = data_box_edge_device_status + self.serial_number = None + self.description = None + self.model_description = None + self.device_type = None + self.friendly_name = None + self.culture = None + self.device_model = None + self.device_software_version = None + self.device_local_capacity = None + self.time_zone = None + self.device_hcs_version = None + self.configured_role_types = None + self.node_count = None + self.resource_move_details = None + self.edge_profile = None + + +class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel): + """The extended Info of the Data Box Edge/Gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param encryption_key_thumbprint: The digital signature of encrypted + certificate. + :type encryption_key_thumbprint: str + :param encryption_key: The public part of the encryption certificate. + Client uses this to encrypt any secret. + :type encryption_key: str + :ivar resource_key: The Resource ID of the Resource. + :vartype resource_key: str + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'}, + 'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'}, + 'resource_key': {'key': 'properties.resourceKey', 'type': 'str'}, + 'client_secret_store_id': {'key': 'properties.clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'properties.clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'properties.channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'properties.channelIntegrityKeyVersion', 'type': 'str'}, + } + + def __init__(self, *, encryption_key_thumbprint: str=None, encryption_key: str=None, client_secret_store_id: str=None, client_secret_store_url: str=None, channel_integrity_key_name: str=None, channel_integrity_key_version: str=None, **kwargs) -> None: + super(DataBoxEdgeDeviceExtendedInfo, self).__init__(**kwargs) + self.encryption_key_thumbprint = encryption_key_thumbprint + self.encryption_key = encryption_key + self.resource_key = None + self.client_secret_store_id = client_secret_store_id + self.client_secret_store_url = client_secret_store_url + self.channel_integrity_key_name = channel_integrity_key_name + self.channel_integrity_key_version = channel_integrity_key_version + + +class DataBoxEdgeDeviceExtendedInfoPatch(Model): + """The Data Box Edge/Gateway device extended info patch. + + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name for Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + """ + + _attribute_map = { + 'client_secret_store_id': {'key': 'clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'channelIntegrityKeyVersion', 'type': 'str'}, + } + + def __init__(self, *, client_secret_store_id: str=None, client_secret_store_url: str=None, channel_integrity_key_name: str=None, channel_integrity_key_version: str=None, **kwargs) -> None: + super(DataBoxEdgeDeviceExtendedInfoPatch, self).__init__(**kwargs) + self.client_secret_store_id = client_secret_store_id + self.client_secret_store_url = client_secret_store_url + self.channel_integrity_key_name = channel_integrity_key_name + self.channel_integrity_key_version = channel_integrity_key_version + + +class DataBoxEdgeDevicePatch(Model): + """The Data Box Edge/Gateway device patch. + + :param tags: The tags attached to the Data Box Edge/Gateway resource. + :type tags: dict[str, str] + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :param edge_profile: Edge Profile property of the Data Box Edge/Gateway + device + :type edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfilePatch + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfilePatch'}, + } + + def __init__(self, *, tags=None, identity=None, edge_profile=None, **kwargs) -> None: + super(DataBoxEdgeDevicePatch, self).__init__(**kwargs) + self.tags = tags + self.identity = identity + self.edge_profile = edge_profile + + +class DataBoxEdgeMoveRequest(Model): + """Resource Move details. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_group: Required. Target resource group ARMId + :type target_resource_group: str + :param resources: Required. List of resources to be moved + :type resources: list[str] + """ + + _validation = { + 'target_resource_group': {'required': True}, + 'resources': {'required': True}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + } + + def __init__(self, *, target_resource_group: str, resources, **kwargs) -> None: + super(DataBoxEdgeMoveRequest, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources + + +class DataBoxEdgeSku(Model): + """The Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar name: The Sku name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC' + :vartype name: str or ~azure.mgmt.databoxedge.models.SkuName + :ivar kind: The Sku kind. + :vartype kind: str + :ivar tier: The Sku tier. Possible values include: 'Standard' + :vartype tier: str or ~azure.mgmt.databoxedge.models.SkuTier + :ivar size: The Sku kind. + :vartype size: str + :ivar family: The Sku family. + :vartype family: str + :ivar locations: Availability of the Sku for the region. + :vartype locations: list[str] + :ivar api_versions: The API versions in which Sku is available. + :vartype api_versions: list[str] + :ivar location_info: Availability of the Sku for the location/zone/site. + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar signup_option: Sku can be signed up by customer or not. Possible + values include: 'None', 'Available' + :vartype signup_option: str or + ~azure.mgmt.databoxedge.models.SkuSignupOption + :ivar version: Availability of the Sku as preview/stable. Possible values + include: 'Stable', 'Preview' + :vartype version: str or ~azure.mgmt.databoxedge.models.SkuVersion + :ivar availability: Links to the next set of results. Possible values + include: 'Available', 'Unavailable' + :vartype availability: str or + ~azure.mgmt.databoxedge.models.SkuAvailability + :ivar shipment_types: List of Shipment Types supported by this SKU + :vartype shipment_types: list[str or + ~azure.mgmt.databoxedge.models.ShipmentType] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'locations': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'location_info': {'readonly': True}, + 'costs': {'readonly': True}, + 'signup_option': {'readonly': True}, + 'version': {'readonly': True}, + 'availability': {'readonly': True}, + 'shipment_types': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'signup_option': {'key': 'signupOption', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'availability': {'key': 'availability', 'type': 'str'}, + 'shipment_types': {'key': 'shipmentTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxEdgeSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.kind = None + self.tier = None + self.size = None + self.family = None + self.locations = None + self.api_versions = None + self.location_info = None + self.costs = None + self.signup_option = None + self.version = None + self.availability = None + self.shipment_types = None + + +class DCAccessCode(Model): + """DC Access code in the case of Self Managed Shipping. + + :param auth_code: DCAccess Code for the Self Managed shipment. + :type auth_code: str + """ + + _attribute_map = { + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, auth_code: str=None, **kwargs) -> None: + super(DCAccessCode, self).__init__(**kwargs) + self.auth_code = auth_code + + +class EdgeProfile(Model): + """Details about Edge Profile for the resource. + + :param subscription: Edge Profile Subscription + :type subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscription + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscription'}, + } + + def __init__(self, *, subscription=None, **kwargs) -> None: + super(EdgeProfile, self).__init__(**kwargs) + self.subscription = subscription + + +class EdgeProfilePatch(Model): + """The Data Box Edge/Gateway Edge Profile patch. + + :param subscription: The Data Box Edge/Gateway Edge Profile Subscription + patch + :type subscription: + ~azure.mgmt.databoxedge.models.EdgeProfileSubscriptionPatch + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscriptionPatch'}, + } + + def __init__(self, *, subscription=None, **kwargs) -> None: + super(EdgeProfilePatch, self).__init__(**kwargs) + self.subscription = subscription + + +class EdgeProfileSubscription(Model): + """Subscription details for the Edge Profile. + + :param registration_id: Edge Subscription Registration ID + :type registration_id: str + :param id: ARM ID of the subscription + :type id: str + :param state: Possible values include: 'Registered', 'Warned', + 'Suspended', 'Deleted', 'Unregistered' + :type state: str or ~azure.mgmt.databoxedge.models.SubscriptionState + :param registration_date: + :type registration_date: str + :param subscription_id: + :type subscription_id: str + :param tenant_id: + :type tenant_id: str + :param location_placement_id: + :type location_placement_id: str + :param quota_id: + :type quota_id: str + :param serialized_details: + :type serialized_details: str + :param registered_features: + :type registered_features: + list[~azure.mgmt.databoxedge.models.SubscriptionRegisteredFeatures] + """ + + _attribute_map = { + 'registration_id': {'key': 'registrationId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'registration_date': {'key': 'registrationDate', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'location_placement_id': {'key': 'properties.locationPlacementId', 'type': 'str'}, + 'quota_id': {'key': 'properties.quotaId', 'type': 'str'}, + 'serialized_details': {'key': 'properties.serializedDetails', 'type': 'str'}, + 'registered_features': {'key': 'properties.registeredFeatures', 'type': '[SubscriptionRegisteredFeatures]'}, + } + + def __init__(self, *, registration_id: str=None, id: str=None, state=None, registration_date: str=None, subscription_id: str=None, tenant_id: str=None, location_placement_id: str=None, quota_id: str=None, serialized_details: str=None, registered_features=None, **kwargs) -> None: + super(EdgeProfileSubscription, self).__init__(**kwargs) + self.registration_id = registration_id + self.id = id + self.state = state + self.registration_date = registration_date + self.subscription_id = subscription_id + self.tenant_id = tenant_id + self.location_placement_id = location_placement_id + self.quota_id = quota_id + self.serialized_details = serialized_details + self.registered_features = registered_features + + +class EdgeProfileSubscriptionPatch(Model): + """The Data Box Edge/Gateway Edge Profile Subscription patch. + + :param id: The path ID that uniquely identifies the subscription of the + edge profile. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(EdgeProfileSubscriptionPatch, self).__init__(**kwargs) + self.id = id + + +class EtcdInfo(Model): + """Etcd configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Etcd type + :vartype type: str + :ivar version: Etcd version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(EtcdInfo, self).__init__(**kwargs) + self.type = None + self.version = None + + +class Trigger(ARMBaseModel): + """Trigger details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FileEventTrigger, PeriodicTimerEventTrigger + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'FileEvent': 'FileEventTrigger', 'PeriodicTimerEvent': 'PeriodicTimerEventTrigger'} + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Trigger, self).__init__(**kwargs) + self.system_data = system_data + self.kind = None + self.kind = 'Trigger' + + +class FileEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. File event source details. + :type source_info: ~azure.mgmt.databoxedge.models.FileSourceInfo + :param sink_info: Required. Role sink info. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'FileSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, *, source_info, sink_info, system_data=None, custom_context_tag: str=None, **kwargs) -> None: + super(FileEventTrigger, self).__init__(system_data=system_data, **kwargs) + self.source_info = source_info + self.sink_info = sink_info + self.custom_context_tag = custom_context_tag + self.kind = 'FileEvent' + + +class FileSourceInfo(Model): + """File source details. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. File share ID. + :type share_id: str + """ + + _validation = { + 'share_id': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + } + + def __init__(self, *, share_id: str, **kwargs) -> None: + super(FileSourceInfo, self).__init__(**kwargs) + self.share_id = share_id + + +class GenerateCertResponse(Model): + """Used in activation key generation flow. + + :param public_key: Gets or sets base64 encoded certificate raw data, + this is the public part needed to be uploaded to cert vault + :type public_key: str + :param private_key: Gets or sets base64 encoded private part of the + certificate, + needed to form the activation key + :type private_key: str + :param expiry_time_in_utc: Gets or sets expiry time in UTC + :type expiry_time_in_utc: str + """ + + _attribute_map = { + 'public_key': {'key': 'publicKey', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'expiry_time_in_utc': {'key': 'expiryTimeInUTC', 'type': 'str'}, + } + + def __init__(self, *, public_key: str=None, private_key: str=None, expiry_time_in_utc: str=None, **kwargs) -> None: + super(GenerateCertResponse, self).__init__(**kwargs) + self.public_key = public_key + self.private_key = private_key + self.expiry_time_in_utc = expiry_time_in_utc + + +class ImageRepositoryCredential(Model): + """Image repository credential. + + All required parameters must be populated in order to send to Azure. + + :param image_repository_url: Required. Image repository url (e.g.: + mcr.microsoft.com). + :type image_repository_url: str + :param user_name: Required. Repository user name. + :type user_name: str + :param password: Repository user password. + :type password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'image_repository_url': {'required': True}, + 'user_name': {'required': True}, + } + + _attribute_map = { + 'image_repository_url': {'key': 'imageRepositoryUrl', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, *, image_repository_url: str, user_name: str, password=None, **kwargs) -> None: + super(ImageRepositoryCredential, self).__init__(**kwargs) + self.image_repository_url = image_repository_url + self.user_name = user_name + self.password = password + + +class IoTAddon(Addon): + """IoT Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param io_tdevice_details: Required. IoT device metadata to which + appliance needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + Addon needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :ivar version: Version of IoT running on the appliance. + :vartype version: str + :ivar host_platform: Host OS supported by the IoT addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, io_tdevice_details, io_tedge_device_details, system_data=None, **kwargs) -> None: + super(IoTAddon, self).__init__(system_data=system_data, **kwargs) + self.io_tdevice_details = io_tdevice_details + self.io_tedge_device_details = io_tedge_device_details + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'IotEdge' + + +class IoTDeviceInfo(Model): + """Metadata of IoT device/IoT Edge device to be configured. + + All required parameters must be populated in order to send to Azure. + + :param device_id: Required. ID of the IoT device/edge device. + :type device_id: str + :param io_thost_hub: Required. Host name for the IoT hub associated to the + device. + :type io_thost_hub: str + :param io_thost_hub_id: Id for the IoT hub associated to the device. + :type io_thost_hub_id: str + :param authentication: Encrypted IoT device/IoT edge device connection + string. + :type authentication: ~azure.mgmt.databoxedge.models.Authentication + """ + + _validation = { + 'device_id': {'required': True}, + 'io_thost_hub': {'required': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'io_thost_hub': {'key': 'ioTHostHub', 'type': 'str'}, + 'io_thost_hub_id': {'key': 'ioTHostHubId', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'Authentication'}, + } + + def __init__(self, *, device_id: str, io_thost_hub: str, io_thost_hub_id: str=None, authentication=None, **kwargs) -> None: + super(IoTDeviceInfo, self).__init__(**kwargs) + self.device_id = device_id + self.io_thost_hub = io_thost_hub + self.io_thost_hub_id = io_thost_hub_id + self.authentication = authentication + + +class IoTEdgeAgentInfo(Model): + """IoT edge agent details is optional, this will be used for download system + Agent module while bootstrapping IoT Role if specified. + + All required parameters must be populated in order to send to Azure. + + :param image_name: Required. Name of the IoT edge agent image. + :type image_name: str + :param tag: Required. Image Tag. + :type tag: str + :param image_repository: Image repository details. + :type image_repository: + ~azure.mgmt.databoxedge.models.ImageRepositoryCredential + """ + + _validation = { + 'image_name': {'required': True}, + 'tag': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'image_repository': {'key': 'imageRepository', 'type': 'ImageRepositoryCredential'}, + } + + def __init__(self, *, image_name: str, tag: str, image_repository=None, **kwargs) -> None: + super(IoTEdgeAgentInfo, self).__init__(**kwargs) + self.image_name = image_name + self.tag = tag + self.image_repository = image_repository + + +class IoTRole(Role): + """Compute role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the IoT role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :param io_tdevice_details: Required. IoT device metadata to which data box + edge device needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + role needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param share_mappings: Mount points of shares in role(s). + :type share_mappings: list[~azure.mgmt.databoxedge.models.MountPointMap] + :param io_tedge_agent_info: Iot edge agent details to download the agent + and bootstrap iot runtime. + :type io_tedge_agent_info: ~azure.mgmt.databoxedge.models.IoTEdgeAgentInfo + :ivar host_platform_type: Platform where the Iot runtime is hosted. + Possible values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param compute_resource: Resource allocation + :type compute_resource: ~azure.mgmt.databoxedge.models.ComputeResource + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'host_platform_type': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'io_tedge_agent_info': {'key': 'properties.ioTEdgeAgentInfo', 'type': 'IoTEdgeAgentInfo'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'compute_resource': {'key': 'properties.computeResource', 'type': 'ComputeResource'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, host_platform, io_tdevice_details, io_tedge_device_details, role_status, system_data=None, share_mappings=None, io_tedge_agent_info=None, compute_resource=None, **kwargs) -> None: + super(IoTRole, self).__init__(system_data=system_data, **kwargs) + self.host_platform = host_platform + self.io_tdevice_details = io_tdevice_details + self.io_tedge_device_details = io_tedge_device_details + self.share_mappings = share_mappings + self.io_tedge_agent_info = io_tedge_agent_info + self.host_platform_type = None + self.compute_resource = compute_resource + self.role_status = role_status + self.kind = 'IOT' + + +class Ipv4Config(Model): + """Details related to the IPv4 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv4 address of the network adapter. + :vartype ip_address: str + :ivar subnet: The IPv4 subnet of the network adapter. + :vartype subnet: str + :ivar gateway: The IPv4 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'subnet': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Ipv4Config, self).__init__(**kwargs) + self.ip_address = None + self.subnet = None + self.gateway = None + + +class Ipv6Config(Model): + """Details related to the IPv6 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv6 address of the network adapter. + :vartype ip_address: str + :ivar prefix_length: The IPv6 prefix of the network adapter. + :vartype prefix_length: int + :ivar gateway: The IPv6 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'prefix_length': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Ipv6Config, self).__init__(**kwargs) + self.ip_address = None + self.prefix_length = None + self.gateway = None + + +class Job(Model): + """A device job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The name of the object. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar status: The current status of the job. Possible values include: + 'Invalid', 'Running', 'Succeeded', 'Failed', 'Canceled', 'Paused', + 'Scheduled' + :vartype status: str or ~azure.mgmt.databoxedge.models.JobStatus + :ivar start_time: The UTC date and time at which the job started. + :vartype start_time: datetime + :ivar end_time: The UTC date and time at which the job completed. + :vartype end_time: datetime + :ivar percent_complete: The percentage of the job that is complete. + :vartype percent_complete: int + :ivar error: The error details. + :vartype error: ~azure.mgmt.databoxedge.models.JobErrorDetails + :ivar job_type: The type of the job. Possible values include: 'Invalid', + 'ScanForUpdates', 'DownloadUpdates', 'InstallUpdates', 'RefreshShare', + 'RefreshContainer', 'Backup', 'Restore', 'TriggerSupportPackage' + :vartype job_type: str or ~azure.mgmt.databoxedge.models.JobType + :ivar current_stage: Current stage of the update operation. Possible + values include: 'Unknown', 'Initial', 'ScanStarted', 'ScanComplete', + 'ScanFailed', 'DownloadStarted', 'DownloadComplete', 'DownloadFailed', + 'InstallStarted', 'InstallComplete', 'InstallFailed', 'RebootInitiated', + 'Success', 'Failure', 'RescanStarted', 'RescanComplete', 'RescanFailed' + :vartype current_stage: str or + ~azure.mgmt.databoxedge.models.UpdateOperationStage + :ivar download_progress: The download progress. + :vartype download_progress: + ~azure.mgmt.databoxedge.models.UpdateDownloadProgress + :ivar install_progress: The install progress. + :vartype install_progress: + ~azure.mgmt.databoxedge.models.UpdateInstallProgress + :ivar total_refresh_errors: Total number of errors encountered during the + refresh process. + :vartype total_refresh_errors: int + :ivar error_manifest_file: Local share/remote container relative path to + the error manifest file of the refresh. + :vartype error_manifest_file: str + :ivar refreshed_entity_id: ARM ID of the entity that was refreshed. + :vartype refreshed_entity_id: str + :param folder: If only subfolders need to be refreshed, then the subfolder + path inside the share or container. (The path is empty if there are no + subfolders.) + :type folder: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'error': {'readonly': True}, + 'job_type': {'readonly': True}, + 'current_stage': {'readonly': True}, + 'download_progress': {'readonly': True}, + 'install_progress': {'readonly': True}, + 'total_refresh_errors': {'readonly': True}, + 'error_manifest_file': {'readonly': True}, + 'refreshed_entity_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'error': {'key': 'error', 'type': 'JobErrorDetails'}, + 'job_type': {'key': 'properties.jobType', 'type': 'str'}, + 'current_stage': {'key': 'properties.currentStage', 'type': 'str'}, + 'download_progress': {'key': 'properties.downloadProgress', 'type': 'UpdateDownloadProgress'}, + 'install_progress': {'key': 'properties.installProgress', 'type': 'UpdateInstallProgress'}, + 'total_refresh_errors': {'key': 'properties.totalRefreshErrors', 'type': 'int'}, + 'error_manifest_file': {'key': 'properties.errorManifestFile', 'type': 'str'}, + 'refreshed_entity_id': {'key': 'properties.refreshedEntityId', 'type': 'str'}, + 'folder': {'key': 'properties.folder', 'type': 'str'}, + } + + def __init__(self, *, folder: str=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.status = None + self.start_time = None + self.end_time = None + self.percent_complete = None + self.error = None + self.job_type = None + self.current_stage = None + self.download_progress = None + self.install_progress = None + self.total_refresh_errors = None + self.error_manifest_file = None + self.refreshed_entity_id = None + self.folder = folder + + +class JobErrorDetails(Model): + """The job error information containing the list of job errors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_details: The error details. + :vartype error_details: list[~azure.mgmt.databoxedge.models.JobErrorItem] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'error_details': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorItem]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobErrorDetails, self).__init__(**kwargs) + self.error_details = None + self.code = None + self.message = None + + +class JobErrorItem(Model): + """The job error items. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendations: The recommended actions. + :vartype recommendations: list[str] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'recommendations': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobErrorItem, self).__init__(**kwargs) + self.recommendations = None + self.code = None + self.message = None + + +class KubernetesClusterInfo(Model): + """Kubernetes cluster configuration. + + Variables are only 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 etcd_info: Etcd configuration + :vartype etcd_info: ~azure.mgmt.databoxedge.models.EtcdInfo + :ivar nodes: Kubernetes cluster nodes + :vartype nodes: list[~azure.mgmt.databoxedge.models.NodeInfo] + :param version: Required. Kubernetes cluster version + :type version: str + """ + + _validation = { + 'etcd_info': {'readonly': True}, + 'nodes': {'readonly': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'etcd_info': {'key': 'etcdInfo', 'type': 'EtcdInfo'}, + 'nodes': {'key': 'nodes', 'type': '[NodeInfo]'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, version: str, **kwargs) -> None: + super(KubernetesClusterInfo, self).__init__(**kwargs) + self.etcd_info = None + self.nodes = None + self.version = version + + +class KubernetesIPConfiguration(Model): + """Kubernetes node IP configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar port: Port of the Kubernetes node. + :vartype port: str + :param ip_address: IP address of the Kubernetes node. + :type ip_address: str + """ + + _validation = { + 'port': {'readonly': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str=None, **kwargs) -> None: + super(KubernetesIPConfiguration, self).__init__(**kwargs) + self.port = None + self.ip_address = ip_address + + +class KubernetesRole(Role): + """Kubernetes role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the Kubernetes role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar provisioning_state: State of Kubernetes deployment. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.KubernetesState + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param kubernetes_cluster_info: Required. Kubernetes cluster configuration + :type kubernetes_cluster_info: + ~azure.mgmt.databoxedge.models.KubernetesClusterInfo + :param kubernetes_role_resources: Required. Kubernetes role resources + :type kubernetes_role_resources: + ~azure.mgmt.databoxedge.models.KubernetesRoleResources + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'kubernetes_cluster_info': {'required': True}, + 'kubernetes_role_resources': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'kubernetes_cluster_info': {'key': 'properties.kubernetesClusterInfo', 'type': 'KubernetesClusterInfo'}, + 'kubernetes_role_resources': {'key': 'properties.kubernetesRoleResources', 'type': 'KubernetesRoleResources'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, host_platform, kubernetes_cluster_info, kubernetes_role_resources, role_status, system_data=None, **kwargs) -> None: + super(KubernetesRole, self).__init__(system_data=system_data, **kwargs) + self.host_platform = host_platform + self.provisioning_state = None + self.host_platform_type = None + self.kubernetes_cluster_info = kubernetes_cluster_info + self.kubernetes_role_resources = kubernetes_role_resources + self.role_status = role_status + self.kind = 'Kubernetes' + + +class KubernetesRoleCompute(Model): + """Kubernetes role compute 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 vm_profile: Required. VM profile + :type vm_profile: str + :ivar memory_in_bytes: Memory in bytes + :vartype memory_in_bytes: long + :ivar processor_count: Processor count + :vartype processor_count: int + """ + + _validation = { + 'vm_profile': {'required': True}, + 'memory_in_bytes': {'readonly': True}, + 'processor_count': {'readonly': True}, + } + + _attribute_map = { + 'vm_profile': {'key': 'vmProfile', 'type': 'str'}, + 'memory_in_bytes': {'key': 'memoryInBytes', 'type': 'long'}, + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + } + + def __init__(self, *, vm_profile: str, **kwargs) -> None: + super(KubernetesRoleCompute, self).__init__(**kwargs) + self.vm_profile = vm_profile + self.memory_in_bytes = None + self.processor_count = None + + +class KubernetesRoleNetwork(Model): + """Kubernetes role network resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar cni_config: Cni configuration + :vartype cni_config: ~azure.mgmt.databoxedge.models.CniConfig + :ivar load_balancer_config: Load balancer configuration + :vartype load_balancer_config: + ~azure.mgmt.databoxedge.models.LoadBalancerConfig + """ + + _validation = { + 'cni_config': {'readonly': True}, + 'load_balancer_config': {'readonly': True}, + } + + _attribute_map = { + 'cni_config': {'key': 'cniConfig', 'type': 'CniConfig'}, + 'load_balancer_config': {'key': 'loadBalancerConfig', 'type': 'LoadBalancerConfig'}, + } + + def __init__(self, **kwargs) -> None: + super(KubernetesRoleNetwork, self).__init__(**kwargs) + self.cni_config = None + self.load_balancer_config = None + + +class KubernetesRoleResources(Model): + """Kubernetes role resources. + + Variables are only 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 storage: Kubernetes role storage resource + :type storage: ~azure.mgmt.databoxedge.models.KubernetesRoleStorage + :param compute: Required. Kubernetes role compute resource + :type compute: ~azure.mgmt.databoxedge.models.KubernetesRoleCompute + :ivar network: Kubernetes role network resource + :vartype network: ~azure.mgmt.databoxedge.models.KubernetesRoleNetwork + """ + + _validation = { + 'compute': {'required': True}, + 'network': {'readonly': True}, + } + + _attribute_map = { + 'storage': {'key': 'storage', 'type': 'KubernetesRoleStorage'}, + 'compute': {'key': 'compute', 'type': 'KubernetesRoleCompute'}, + 'network': {'key': 'network', 'type': 'KubernetesRoleNetwork'}, + } + + def __init__(self, *, compute, storage=None, **kwargs) -> None: + super(KubernetesRoleResources, self).__init__(**kwargs) + self.storage = storage + self.compute = compute + self.network = None + + +class KubernetesRoleStorage(Model): + """Kubernetes role storage resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar storage_classes: Kubernetes storage class info. + :vartype storage_classes: + list[~azure.mgmt.databoxedge.models.KubernetesRoleStorageClassInfo] + :param endpoints: Mount points of shares in role(s). + :type endpoints: list[~azure.mgmt.databoxedge.models.MountPointMap] + """ + + _validation = { + 'storage_classes': {'readonly': True}, + } + + _attribute_map = { + 'storage_classes': {'key': 'storageClasses', 'type': '[KubernetesRoleStorageClassInfo]'}, + 'endpoints': {'key': 'endpoints', 'type': '[MountPointMap]'}, + } + + def __init__(self, *, endpoints=None, **kwargs) -> None: + super(KubernetesRoleStorage, self).__init__(**kwargs) + self.storage_classes = None + self.endpoints = endpoints + + +class KubernetesRoleStorageClassInfo(Model): + """Kubernetes storage class info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Storage class name. + :vartype name: str + :ivar type: Storage class type. + :vartype type: str + :ivar posix_compliant: If provisioned storage is posix compliant. Possible + values include: 'Invalid', 'Enabled', 'Disabled' + :vartype posix_compliant: str or + ~azure.mgmt.databoxedge.models.PosixComplianceStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'posix_compliant': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'posix_compliant': {'key': 'posixCompliant', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KubernetesRoleStorageClassInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.posix_compliant = None + + +class LoadBalancerConfig(Model): + """Load balancer configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Load balancer type + :vartype type: str + :ivar version: Load balancer version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LoadBalancerConfig, self).__init__(**kwargs) + self.type = None + self.version = None + + +class MECRole(Role): + """MEC role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param connection_string: Activation key of the MEC. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'AsymmetricEncryptedSecret'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, role_status, system_data=None, connection_string=None, **kwargs) -> None: + super(MECRole, self).__init__(system_data=system_data, **kwargs) + self.connection_string = connection_string + self.role_status = role_status + self.kind = 'MEC' + + +class MetricConfiguration(Model): + """Metric configuration. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The Resource ID on which the metrics should + be pushed. + :type resource_id: str + :param mdm_account: The MDM account to which the counters should be + pushed. + :type mdm_account: str + :param metric_name_space: The MDM namespace to which the counters should + be pushed. This is required if MDMAccount is specified + :type metric_name_space: str + :param counter_sets: Required. Host name for the IoT hub associated to the + device. + :type counter_sets: list[~azure.mgmt.databoxedge.models.MetricCounterSet] + """ + + _validation = { + 'resource_id': {'required': True}, + 'counter_sets': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'mdm_account': {'key': 'mdmAccount', 'type': 'str'}, + 'metric_name_space': {'key': 'metricNameSpace', 'type': 'str'}, + 'counter_sets': {'key': 'counterSets', 'type': '[MetricCounterSet]'}, + } + + def __init__(self, *, resource_id: str, counter_sets, mdm_account: str=None, metric_name_space: str=None, **kwargs) -> None: + super(MetricConfiguration, self).__init__(**kwargs) + self.resource_id = resource_id + self.mdm_account = mdm_account + self.metric_name_space = metric_name_space + self.counter_sets = counter_sets + + +class MetricCounter(Model): + """The metric counter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The counter name. + :type name: str + :param instance: The instance from which counter should be collected. + :type instance: str + :param dimension_filter: The dimension filter. + :type dimension_filter: + list[~azure.mgmt.databoxedge.models.MetricDimension] + :param additional_dimensions: The additional dimensions to be added to + metric. + :type additional_dimensions: + list[~azure.mgmt.databoxedge.models.MetricDimension] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'str'}, + 'dimension_filter': {'key': 'dimensionFilter', 'type': '[MetricDimension]'}, + 'additional_dimensions': {'key': 'additionalDimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, *, name: str, instance: str=None, dimension_filter=None, additional_dimensions=None, **kwargs) -> None: + super(MetricCounter, self).__init__(**kwargs) + self.name = name + self.instance = instance + self.dimension_filter = dimension_filter + self.additional_dimensions = additional_dimensions + + +class MetricCounterSet(Model): + """The metric counter set. + + All required parameters must be populated in order to send to Azure. + + :param counters: Required. The counters that should be collected in this + set. + :type counters: list[~azure.mgmt.databoxedge.models.MetricCounter] + """ + + _validation = { + 'counters': {'required': True}, + } + + _attribute_map = { + 'counters': {'key': 'counters', 'type': '[MetricCounter]'}, + } + + def __init__(self, *, counters, **kwargs) -> None: + super(MetricCounterSet, self).__init__(**kwargs) + self.counters = counters + + +class MetricDimension(Model): + """The metric dimension. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. The dimension type. + :type source_type: str + :param source_name: Required. The dimension value. + :type source_name: str + """ + + _validation = { + 'source_type': {'required': True}, + 'source_name': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'source_name': {'key': 'sourceName', 'type': 'str'}, + } + + def __init__(self, *, source_type: str, source_name: str, **kwargs) -> None: + super(MetricDimension, self).__init__(**kwargs) + self.source_type = source_type + self.source_name = source_name + + +class MetricDimensionV1(Model): + """Metric Dimension v1. + + :param name: Name of the metrics dimension. + :type name: str + :param display_name: Display name of the metrics dimension. + :type display_name: str + :param to_be_exported_for_shoebox: To be exported to shoe box. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + super(MetricDimensionV1, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class MetricSpecificationV1(Model): + """Metric specification version 1. + + :param name: Name of the metric. + :type name: str + :param display_name: Display name of the metric. + :type display_name: str + :param display_description: Description of the metric to be displayed. + :type display_description: str + :param unit: Metric units. Possible values include: 'NotSpecified', + 'Percent', 'Count', 'Seconds', 'Milliseconds', 'Bytes', 'BytesPerSecond', + 'CountPerSecond' + :type unit: str or ~azure.mgmt.databoxedge.models.MetricUnit + :param aggregation_type: Metric aggregation type. Possible values include: + 'NotSpecified', 'None', 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + :type aggregation_type: str or + ~azure.mgmt.databoxedge.models.MetricAggregationType + :param dimensions: Metric dimensions, other than default dimension which + is resource. + :type dimensions: list[~azure.mgmt.databoxedge.models.MetricDimensionV1] + :param fill_gap_with_zero: Set true to fill the gaps with zero. + :type fill_gap_with_zero: bool + :param category: Metric category. Possible values include: 'Capacity', + 'Transaction' + :type category: str or ~azure.mgmt.databoxedge.models.MetricCategory + :param resource_id_dimension_name_override: Resource name override. + :type resource_id_dimension_name_override: str + :param supported_time_grain_types: Support granularity of metrics. + :type supported_time_grain_types: list[str or + ~azure.mgmt.databoxedge.models.TimeGrain] + :param supported_aggregation_types: Support metric aggregation type. + :type supported_aggregation_types: list[str or + ~azure.mgmt.databoxedge.models.MetricAggregationType] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimensionV1]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit=None, aggregation_type=None, dimensions=None, fill_gap_with_zero: bool=None, category=None, resource_id_dimension_name_override: str=None, supported_time_grain_types=None, supported_aggregation_types=None, **kwargs) -> None: + super(MetricSpecificationV1, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.dimensions = dimensions + self.fill_gap_with_zero = fill_gap_with_zero + self.category = category + self.resource_id_dimension_name_override = resource_id_dimension_name_override + self.supported_time_grain_types = supported_time_grain_types + self.supported_aggregation_types = supported_aggregation_types + + +class MonitoringMetricConfiguration(ARMBaseModel): + """The metric setting details for the role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param metric_configurations: Required. The metrics configuration details + :type metric_configurations: + list[~azure.mgmt.databoxedge.models.MetricConfiguration] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metric_configurations': {'key': 'properties.metricConfigurations', 'type': '[MetricConfiguration]'}, + } + + def __init__(self, *, metric_configurations, **kwargs) -> None: + super(MonitoringMetricConfiguration, self).__init__(**kwargs) + self.metric_configurations = metric_configurations + + +class MountPointMap(Model): + """The share mount point. + + Variables are only 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 share_id: Required. ID of the share mounted to the role VM. + :type share_id: str + :ivar role_id: ID of the role to which share is mounted. + :vartype role_id: str + :ivar mount_point: Mount point for the share. + :vartype mount_point: str + :ivar mount_type: Mounting type. Possible values include: 'Volume', + 'HostPath' + :vartype mount_type: str or ~azure.mgmt.databoxedge.models.MountType + :ivar role_type: Role type. Possible values include: 'IOT', 'ASA', + 'Functions', 'Cognitive', 'MEC', 'CloudEdgeManagement', 'Kubernetes' + :vartype role_type: str or ~azure.mgmt.databoxedge.models.RoleTypes + """ + + _validation = { + 'share_id': {'required': True}, + 'role_id': {'readonly': True}, + 'mount_point': {'readonly': True}, + 'mount_type': {'readonly': True}, + 'role_type': {'readonly': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'role_id': {'key': 'roleId', 'type': 'str'}, + 'mount_point': {'key': 'mountPoint', 'type': 'str'}, + 'mount_type': {'key': 'mountType', 'type': 'str'}, + 'role_type': {'key': 'roleType', 'type': 'str'}, + } + + def __init__(self, *, share_id: str, **kwargs) -> None: + super(MountPointMap, self).__init__(**kwargs) + self.share_id = share_id + self.role_id = None + self.mount_point = None + self.mount_type = None + self.role_type = None + + +class NetworkAdapter(Model): + """Represents the networkAdapter on a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar adapter_id: Instance ID of network adapter. + :vartype adapter_id: str + :ivar adapter_position: Hardware position of network adapter. + :vartype adapter_position: + ~azure.mgmt.databoxedge.models.NetworkAdapterPosition + :ivar index: Logical index of the adapter. + :vartype index: int + :ivar node_id: Node ID of the network adapter. + :vartype node_id: str + :ivar network_adapter_name: Network adapter name. + :vartype network_adapter_name: str + :ivar label: Hardware label for the adapter. + :vartype label: str + :ivar mac_address: MAC address. + :vartype mac_address: str + :ivar link_speed: Link speed. + :vartype link_speed: long + :ivar status: Value indicating whether this adapter is valid. Possible + values include: 'Inactive', 'Active' + :vartype status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterStatus + :param rdma_status: Value indicating whether this adapter is RDMA capable. + Possible values include: 'Incapable', 'Capable' + :type rdma_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterRDMAStatus + :param dhcp_status: Value indicating whether this adapter has DHCP + enabled. Possible values include: 'Disabled', 'Enabled' + :type dhcp_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterDHCPStatus + :ivar ipv4_configuration: The IPv4 configuration of the network adapter. + :vartype ipv4_configuration: ~azure.mgmt.databoxedge.models.Ipv4Config + :ivar ipv6_configuration: The IPv6 configuration of the network adapter. + :vartype ipv6_configuration: ~azure.mgmt.databoxedge.models.Ipv6Config + :ivar ipv6_link_local_address: The IPv6 local address. + :vartype ipv6_link_local_address: str + :ivar dns_servers: The list of DNS Servers of the device. + :vartype dns_servers: list[str] + """ + + _validation = { + 'adapter_id': {'readonly': True}, + 'adapter_position': {'readonly': True}, + 'index': {'readonly': True}, + 'node_id': {'readonly': True}, + 'network_adapter_name': {'readonly': True}, + 'label': {'readonly': True}, + 'mac_address': {'readonly': True}, + 'link_speed': {'readonly': True}, + 'status': {'readonly': True}, + 'ipv4_configuration': {'readonly': True}, + 'ipv6_configuration': {'readonly': True}, + 'ipv6_link_local_address': {'readonly': True}, + 'dns_servers': {'readonly': True}, + } + + _attribute_map = { + 'adapter_id': {'key': 'adapterId', 'type': 'str'}, + 'adapter_position': {'key': 'adapterPosition', 'type': 'NetworkAdapterPosition'}, + 'index': {'key': 'index', 'type': 'int'}, + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'network_adapter_name': {'key': 'networkAdapterName', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + 'link_speed': {'key': 'linkSpeed', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'rdma_status': {'key': 'rdmaStatus', 'type': 'str'}, + 'dhcp_status': {'key': 'dhcpStatus', 'type': 'str'}, + 'ipv4_configuration': {'key': 'ipv4Configuration', 'type': 'Ipv4Config'}, + 'ipv6_configuration': {'key': 'ipv6Configuration', 'type': 'Ipv6Config'}, + 'ipv6_link_local_address': {'key': 'ipv6LinkLocalAddress', 'type': 'str'}, + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, *, rdma_status=None, dhcp_status=None, **kwargs) -> None: + super(NetworkAdapter, self).__init__(**kwargs) + self.adapter_id = None + self.adapter_position = None + self.index = None + self.node_id = None + self.network_adapter_name = None + self.label = None + self.mac_address = None + self.link_speed = None + self.status = None + self.rdma_status = rdma_status + self.dhcp_status = dhcp_status + self.ipv4_configuration = None + self.ipv6_configuration = None + self.ipv6_link_local_address = None + self.dns_servers = None + + +class NetworkAdapterPosition(Model): + """The network adapter position. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar network_group: The network group. Possible values include: 'None', + 'NonRDMA', 'RDMA' + :vartype network_group: str or ~azure.mgmt.databoxedge.models.NetworkGroup + :ivar port: The port. + :vartype port: int + """ + + _validation = { + 'network_group': {'readonly': True}, + 'port': {'readonly': True}, + } + + _attribute_map = { + 'network_group': {'key': 'networkGroup', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(NetworkAdapterPosition, self).__init__(**kwargs) + self.network_group = None + self.port = None + + +class NetworkSettings(ARMBaseModel): + """The network settings of a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar network_adapters: The network adapter list on the device. + :vartype network_adapters: + list[~azure.mgmt.databoxedge.models.NetworkAdapter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'network_adapters': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'network_adapters': {'key': 'properties.networkAdapters', 'type': '[NetworkAdapter]'}, + } + + def __init__(self, **kwargs) -> None: + super(NetworkSettings, self).__init__(**kwargs) + self.network_adapters = None + + +class Node(ARMBaseModel): + """Represents a single node in a Data box Edge/Gateway device + Gateway devices, standalone Edge devices and a single node cluster Edge + device will all have 1 node + Multi-node Edge devices will have more than 1 nodes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar node_status: The current status of the individual node. Possible + values include: 'Unknown', 'Up', 'Down', 'Rebooting', 'ShuttingDown' + :vartype node_status: str or ~azure.mgmt.databoxedge.models.NodeStatus + :ivar node_chassis_serial_number: Serial number of the Chassis + :vartype node_chassis_serial_number: str + :ivar node_serial_number: Serial number of the individual node + :vartype node_serial_number: str + :ivar node_display_name: Display Name of the individual node + :vartype node_display_name: str + :ivar node_friendly_software_version: Friendly software version name that + is currently installed on the node + :vartype node_friendly_software_version: str + :ivar node_hcs_version: HCS version that is currently installed on the + node + :vartype node_hcs_version: str + :ivar node_instance_id: Guid instance id of the node + :vartype node_instance_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'node_status': {'readonly': True}, + 'node_chassis_serial_number': {'readonly': True}, + 'node_serial_number': {'readonly': True}, + 'node_display_name': {'readonly': True}, + 'node_friendly_software_version': {'readonly': True}, + 'node_hcs_version': {'readonly': True}, + 'node_instance_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'node_status': {'key': 'properties.nodeStatus', 'type': 'str'}, + 'node_chassis_serial_number': {'key': 'properties.nodeChassisSerialNumber', 'type': 'str'}, + 'node_serial_number': {'key': 'properties.nodeSerialNumber', 'type': 'str'}, + 'node_display_name': {'key': 'properties.nodeDisplayName', 'type': 'str'}, + 'node_friendly_software_version': {'key': 'properties.nodeFriendlySoftwareVersion', 'type': 'str'}, + 'node_hcs_version': {'key': 'properties.nodeHcsVersion', 'type': 'str'}, + 'node_instance_id': {'key': 'properties.nodeInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Node, self).__init__(**kwargs) + self.node_status = None + self.node_chassis_serial_number = None + self.node_serial_number = None + self.node_display_name = None + self.node_friendly_software_version = None + self.node_hcs_version = None + self.node_instance_id = None + + +class NodeInfo(Model): + """Kubernetes node info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Node name. + :vartype name: str + :ivar type: Node type - Master/Worker. Possible values include: 'Invalid', + 'Master', 'Worker' + :vartype type: str or ~azure.mgmt.databoxedge.models.KubernetesNodeType + :param ip_configuration: IP Configuration of the Kubernetes node. + :type ip_configuration: + list[~azure.mgmt.databoxedge.models.KubernetesIPConfiguration] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_configuration': {'key': 'ipConfiguration', 'type': '[KubernetesIPConfiguration]'}, + } + + def __init__(self, *, ip_configuration=None, **kwargs) -> None: + super(NodeInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.ip_configuration = ip_configuration + + +class Operation(Model): + """Operations. + + :param name: Name of the operation. + :type name: str + :param display: Properties displayed for the operation. + :type display: ~azure.mgmt.databoxedge.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param is_data_action: Indicates whether the operation is a data action + :type is_data_action: bool + :param service_specification: Service specification. + :type service_specification: + ~azure.mgmt.databoxedge.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, is_data_action: bool=None, service_specification=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.is_data_action = is_data_action + self.service_specification = service_specification + + +class OperationDisplay(Model): + """Operation display properties. + + :param provider: Provider name. + :type provider: str + :param resource: The type of resource in which the operation is performed. + :type resource: str + :param operation: Operation to be performed on the resource. + :type operation: str + :param description: Description of the operation to be performed. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Order(ARMBaseModel): + """The order details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param contact_information: Required. The contact details. + :type contact_information: ~azure.mgmt.databoxedge.models.ContactDetails + :param shipping_address: The shipping address. + :type shipping_address: ~azure.mgmt.databoxedge.models.Address + :ivar current_status: Current status of the order. + :vartype current_status: ~azure.mgmt.databoxedge.models.OrderStatus + :ivar order_history: List of status changes in the order. + :vartype order_history: list[~azure.mgmt.databoxedge.models.OrderStatus] + :ivar serial_number: Serial number of the device. + :vartype serial_number: str + :ivar delivery_tracking_info: Tracking information for the package + delivered to the customer whether it has an original or a replacement + device. + :vartype delivery_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :ivar return_tracking_info: Tracking information for the package returned + from the customer whether it has an original or a replacement device. + :vartype return_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :param shipment_type: ShipmentType of the order. Possible values include: + 'NotApplicable', 'ShippedToCustomer', 'SelfPickup' + :type shipment_type: str or ~azure.mgmt.databoxedge.models.ShipmentType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_information': {'required': True}, + 'current_status': {'readonly': True}, + 'order_history': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'delivery_tracking_info': {'readonly': True}, + 'return_tracking_info': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'contact_information': {'key': 'properties.contactInformation', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'Address'}, + 'current_status': {'key': 'properties.currentStatus', 'type': 'OrderStatus'}, + 'order_history': {'key': 'properties.orderHistory', 'type': '[OrderStatus]'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'delivery_tracking_info': {'key': 'properties.deliveryTrackingInfo', 'type': '[TrackingInfo]'}, + 'return_tracking_info': {'key': 'properties.returnTrackingInfo', 'type': '[TrackingInfo]'}, + 'shipment_type': {'key': 'properties.shipmentType', 'type': 'str'}, + } + + def __init__(self, *, contact_information, shipping_address=None, shipment_type=None, **kwargs) -> None: + super(Order, self).__init__(**kwargs) + self.contact_information = contact_information + self.shipping_address = shipping_address + self.current_status = None + self.order_history = None + self.serial_number = None + self.delivery_tracking_info = None + self.return_tracking_info = None + self.shipment_type = shipment_type + + +class OrderStatus(Model): + """Represents a single status change. + + Variables are only 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 status: Required. Status of the order as per the allowed status + types. Possible values include: 'Untracked', 'AwaitingFulfilment', + 'AwaitingPreparation', 'AwaitingShipment', 'Shipped', 'Arriving', + 'Delivered', 'ReplacementRequested', 'LostDevice', 'Declined', + 'ReturnInitiated', 'AwaitingReturnShipment', 'ShippedBack', + 'CollectedAtMicrosoft', 'AwaitingPickup', 'PickupCompleted', + 'AwaitingDrop' + :type status: str or ~azure.mgmt.databoxedge.models.OrderState + :ivar update_date_time: Time of status update. + :vartype update_date_time: datetime + :param comments: Comments related to this status change. + :type comments: str + :ivar tracking_information: Tracking information related to the state in + the ordering flow + :vartype tracking_information: ~azure.mgmt.databoxedge.models.TrackingInfo + :ivar additional_order_details: Dictionary to hold generic information + which is not stored + by the already existing properties + :vartype additional_order_details: dict[str, str] + """ + + _validation = { + 'status': {'required': True}, + 'update_date_time': {'readonly': True}, + 'tracking_information': {'readonly': True}, + 'additional_order_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'update_date_time': {'key': 'updateDateTime', 'type': 'iso-8601'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'tracking_information': {'key': 'trackingInformation', 'type': 'TrackingInfo'}, + 'additional_order_details': {'key': 'additionalOrderDetails', 'type': '{str}'}, + } + + def __init__(self, *, status, comments: str=None, **kwargs) -> None: + super(OrderStatus, self).__init__(**kwargs) + self.status = status + self.update_date_time = None + self.comments = comments + self.tracking_information = None + self.additional_order_details = None + + +class PeriodicTimerEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. Periodic timer details. + :type source_info: ~azure.mgmt.databoxedge.models.PeriodicTimerSourceInfo + :param sink_info: Required. Role Sink information. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'PeriodicTimerSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, *, source_info, sink_info, system_data=None, custom_context_tag: str=None, **kwargs) -> None: + super(PeriodicTimerEventTrigger, self).__init__(system_data=system_data, **kwargs) + self.source_info = source_info + self.sink_info = sink_info + self.custom_context_tag = custom_context_tag + self.kind = 'PeriodicTimerEvent' + + +class PeriodicTimerSourceInfo(Model): + """Periodic timer event source. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. The time of the day that results in a valid + trigger. Schedule is computed with reference to the time specified upto + seconds. If timezone is not specified the time will considered to be in + device timezone. The value will always be returned as UTC time. + :type start_time: datetime + :param schedule: Required. Periodic frequency at which timer event needs + to be raised. Supports daily, hourly, minutes, and seconds. + :type schedule: str + :param topic: Topic where periodic events are published to IoT device. + :type topic: str + """ + + _validation = { + 'start_time': {'required': True}, + 'schedule': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'schedule': {'key': 'schedule', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + } + + def __init__(self, *, start_time, schedule: str, topic: str=None, **kwargs) -> None: + super(PeriodicTimerSourceInfo, self).__init__(**kwargs) + self.start_time = start_time + self.schedule = schedule + self.topic = topic + + +class RefreshDetails(Model): + """Fields for tracking refresh job on the share or container. + + :param in_progress_refresh_job_id: If a refresh job is currently in + progress on this share or container, this field indicates the ARM resource + ID of that job. The field is empty if no job is in progress. + :type in_progress_refresh_job_id: str + :param last_completed_refresh_job_time_in_utc: Indicates the completed + time for the last refresh job on this particular share or container, if + any.This could be a failed job or a successful job. + :type last_completed_refresh_job_time_in_utc: datetime + :param error_manifest_file: Indicates the relative path of the error xml + for the last refresh job on this particular share or container, if any. + This could be a failed job or a successful job. + :type error_manifest_file: str + :param last_job: Indicates the id of the last refresh job on this + particular share or container,if any. This could be a failed job or a + successful job. + :type last_job: str + """ + + _attribute_map = { + 'in_progress_refresh_job_id': {'key': 'inProgressRefreshJobId', 'type': 'str'}, + 'last_completed_refresh_job_time_in_utc': {'key': 'lastCompletedRefreshJobTimeInUTC', 'type': 'iso-8601'}, + 'error_manifest_file': {'key': 'errorManifestFile', 'type': 'str'}, + 'last_job': {'key': 'lastJob', 'type': 'str'}, + } + + def __init__(self, *, in_progress_refresh_job_id: str=None, last_completed_refresh_job_time_in_utc=None, error_manifest_file: str=None, last_job: str=None, **kwargs) -> None: + super(RefreshDetails, self).__init__(**kwargs) + self.in_progress_refresh_job_id = in_progress_refresh_job_id + self.last_completed_refresh_job_time_in_utc = last_completed_refresh_job_time_in_utc + self.error_manifest_file = error_manifest_file + self.last_job = last_job + + +class ResourceIdentity(Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: Identity type. Possible values include: 'None', + 'SystemAssigned', 'UserAssigned' + :type type: str or ~azure.mgmt.databoxedge.models.MsiIdentityType + :ivar principal_id: Service Principal Id backing the Msi + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = None + self.tenant_id = None + + +class ResourceMoveDetails(Model): + """Fields for tracking resource move. + + :param operation_in_progress: Denotes whether move operation is in + progress. Possible values include: 'None', 'ResourceMoveInProgress', + 'ResourceMoveFailed' + :type operation_in_progress: str or + ~azure.mgmt.databoxedge.models.ResourceMoveStatus + :param operation_in_progress_lock_timeout_in_utc: Denotes the timeout of + the operation to finish + :type operation_in_progress_lock_timeout_in_utc: datetime + """ + + _attribute_map = { + 'operation_in_progress': {'key': 'operationInProgress', 'type': 'str'}, + 'operation_in_progress_lock_timeout_in_utc': {'key': 'operationInProgressLockTimeoutInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, *, operation_in_progress=None, operation_in_progress_lock_timeout_in_utc=None, **kwargs) -> None: + super(ResourceMoveDetails, self).__init__(**kwargs) + self.operation_in_progress = operation_in_progress + self.operation_in_progress_lock_timeout_in_utc = operation_in_progress_lock_timeout_in_utc + + +class ResourceTypeSku(Model): + """Resource type Sku object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The resource type. + :vartype resource_type: str + :ivar skus: The skus. + :vartype skus: list[~azure.mgmt.databoxedge.models.SkuInformation] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'skus': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[SkuInformation]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceTypeSku, self).__init__(**kwargs) + self.resource_type = None + self.skus = None + + +class RoleSinkInfo(Model): + """Compute role against which events will be raised. + + All required parameters must be populated in order to send to Azure. + + :param role_id: Required. Compute role ID. + :type role_id: str + """ + + _validation = { + 'role_id': {'required': True}, + } + + _attribute_map = { + 'role_id': {'key': 'roleId', 'type': 'str'}, + } + + def __init__(self, *, role_id: str, **kwargs) -> None: + super(RoleSinkInfo, self).__init__(**kwargs) + self.role_id = role_id + + +class SecuritySettings(ARMBaseModel): + """The security settings of a device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param device_admin_password: Required. Device administrator password as + an encrypted string (encrypted using RSA PKCS #1) is used to sign into the + local web UI of the device. The Actual password should have at least 8 + characters that are a combination of uppercase, lowercase, numeric, and + special characters. + :type device_admin_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'device_admin_password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_admin_password': {'key': 'properties.deviceAdminPassword', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, *, device_admin_password, **kwargs) -> None: + super(SecuritySettings, self).__init__(**kwargs) + self.device_admin_password = device_admin_password + + +class ServiceSpecification(Model): + """Service specification. + + :param metric_specifications: Metric specification as defined by shoebox. + :type metric_specifications: + list[~azure.mgmt.databoxedge.models.MetricSpecificationV1] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecificationV1]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + + +class Share(ARMBaseModel): + """Represents a share on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Share on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the share. + :type description: str + :param share_status: Required. Current status of the share. Possible + values include: 'Offline', 'Unknown', 'OK', 'Updating', 'NeedsAttention' + :type share_status: str or ~azure.mgmt.databoxedge.models.ShareStatus + :param monitoring_status: Required. Current monitoring status of the + share. Possible values include: 'Enabled', 'Disabled' + :type monitoring_status: str or + ~azure.mgmt.databoxedge.models.MonitoringStatus + :param azure_container_info: Azure container mapping for the share. + :type azure_container_info: + ~azure.mgmt.databoxedge.models.AzureContainerInfo + :param access_protocol: Required. Access protocol to be used by the share. + Possible values include: 'SMB', 'NFS' + :type access_protocol: str or + ~azure.mgmt.databoxedge.models.ShareAccessProtocol + :param user_access_rights: Mapping of users and corresponding access + rights on the share (required for SMB protocol). + :type user_access_rights: + list[~azure.mgmt.databoxedge.models.UserAccessRight] + :param client_access_rights: List of IP addresses and corresponding access + rights on the share(required for NFS protocol). + :type client_access_rights: + list[~azure.mgmt.databoxedge.models.ClientAccessRight] + :param refresh_details: Details of the refresh job on this share. + :type refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar share_mappings: Share mount point to the role. + :vartype share_mappings: + list[~azure.mgmt.databoxedge.models.MountPointMap] + :param data_policy: Data policy of the share. Possible values include: + 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_status': {'required': True}, + 'monitoring_status': {'required': True}, + 'access_protocol': {'required': True}, + 'share_mappings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'share_status': {'key': 'properties.shareStatus', 'type': 'str'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + 'azure_container_info': {'key': 'properties.azureContainerInfo', 'type': 'AzureContainerInfo'}, + 'access_protocol': {'key': 'properties.accessProtocol', 'type': 'str'}, + 'user_access_rights': {'key': 'properties.userAccessRights', 'type': '[UserAccessRight]'}, + 'client_access_rights': {'key': 'properties.clientAccessRights', 'type': '[ClientAccessRight]'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + } + + def __init__(self, *, share_status, monitoring_status, access_protocol, system_data=None, description: str=None, azure_container_info=None, user_access_rights=None, client_access_rights=None, refresh_details=None, data_policy=None, **kwargs) -> None: + super(Share, self).__init__(**kwargs) + self.system_data = system_data + self.description = description + self.share_status = share_status + self.monitoring_status = monitoring_status + self.azure_container_info = azure_container_info + self.access_protocol = access_protocol + self.user_access_rights = user_access_rights + self.client_access_rights = client_access_rights + self.refresh_details = refresh_details + self.share_mappings = None + self.data_policy = data_policy + + +class ShareAccessRight(Model): + """Specifies the mapping between this particular user and the type of access + he has on shares on this device. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. The share ID. + :type share_id: str + :param access_type: Required. Type of access to be allowed on the share + for this user. Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'share_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, *, share_id: str, access_type, **kwargs) -> None: + super(ShareAccessRight, self).__init__(**kwargs) + self.share_id = share_id + self.access_type = access_type + + +class Sku(Model): + """The SKU type. + + :param name: SKU name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC' + :type name: str or ~azure.mgmt.databoxedge.models.SkuName + :param tier: The SKU tier. This is based on the SKU name. Possible values + include: 'Standard' + :type tier: str or ~azure.mgmt.databoxedge.models.SkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name=None, tier=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class SkuCost(Model): + """The metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The cost quantity. + :vartype quantity: long + :ivar extended_unit: The extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class SkuInformation(Model): + """Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The sku name. + :vartype name: str + :ivar tier: The sku tier. + :vartype tier: str + :ivar kind: The sku kind. + :vartype kind: str + :ivar family: The Sku family. + :vartype family: str + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar locations: The locations where Sku is available. + :vartype locations: list[str] + :ivar location_info: The locations where Sku is available with zones and + sites info + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar required_quota_ids: The required quotaIds for the sku to be + available. + :vartype required_quota_ids: list[str] + :ivar required_features: The required features for the sku to be + available. + :vartype required_features: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'kind': {'readonly': True}, + 'family': {'readonly': True}, + 'costs': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'required_quota_ids': {'readonly': True}, + 'required_features': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'required_quota_ids': {'key': 'requiredQuotaIds', 'type': '[str]'}, + 'required_features': {'key': 'requiredFeatures', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuInformation, self).__init__(**kwargs) + self.name = None + self.tier = None + self.kind = None + self.family = None + self.costs = None + self.locations = None + self.location_info = None + self.required_quota_ids = None + self.required_features = None + + +class SkuInformationList(Model): + """List of SKU Information objects. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of ResourceTypeSku objects + :vartype value: list[~azure.mgmt.databoxedge.models.ResourceTypeSku] + :ivar next_link: Links to the next set of results + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceTypeSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuInformationList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class SkuLocationInfo(Model): + """The location info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: The location. + :vartype location: str + :ivar zones: The zones. + :vartype zones: list[str] + :ivar sites: The sites. + :vartype sites: list[str] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'sites': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'sites': {'key': 'sites', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.sites = None + + +class StorageAccount(ARMBaseModel): + """Represents a Storage Account on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccount object on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the storage Account. + :type description: str + :param storage_account_status: Current status of the storage account. + Possible values include: 'OK', 'Offline', 'Unknown', 'Updating', + 'NeedsAttention' + :type storage_account_status: str or + ~azure.mgmt.databoxedge.models.StorageAccountStatus + :param data_policy: Required. Data policy of the storage Account. Possible + values include: 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + :param storage_account_credential_id: Storage Account Credential Id + :type storage_account_credential_id: str + :ivar blob_endpoint: BlobEndpoint of Storage Account + :vartype blob_endpoint: str + :ivar container_count: The Container Count. Present only for Storage + Accounts with DataPolicy set to Cloud. + :vartype container_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_policy': {'required': True}, + 'blob_endpoint': {'readonly': True}, + 'container_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'storage_account_status': {'key': 'properties.storageAccountStatus', 'type': 'str'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + 'storage_account_credential_id': {'key': 'properties.storageAccountCredentialId', 'type': 'str'}, + 'blob_endpoint': {'key': 'properties.blobEndpoint', 'type': 'str'}, + 'container_count': {'key': 'properties.containerCount', 'type': 'int'}, + } + + def __init__(self, *, data_policy, system_data=None, description: str=None, storage_account_status=None, storage_account_credential_id: str=None, **kwargs) -> None: + super(StorageAccount, self).__init__(**kwargs) + self.system_data = system_data + self.description = description + self.storage_account_status = storage_account_status + self.data_policy = data_policy + self.storage_account_credential_id = storage_account_credential_id + self.blob_endpoint = None + self.container_count = None + + +class StorageAccountCredential(ARMBaseModel): + """The storage account credential. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccountCredential object + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param alias: Required. Alias for the storage account. + :type alias: str + :param user_name: Username for the storage account. + :type user_name: str + :param account_key: Encrypted storage key. + :type account_key: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param connection_string: Connection string for the storage account. Use + this string if username and account key are not specified. + :type connection_string: str + :param ssl_status: Required. Signifies whether SSL needs to be enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type ssl_status: str or ~azure.mgmt.databoxedge.models.SSLStatus + :param blob_domain_name: Blob end point for private clouds. + :type blob_domain_name: str + :param account_type: Required. Type of storage accessed on the storage + account. Possible values include: 'GeneralPurposeStorage', 'BlobStorage' + :type account_type: str or ~azure.mgmt.databoxedge.models.AccountType + :param storage_account_id: Id of the storage account. + :type storage_account_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alias': {'required': True}, + 'ssl_status': {'required': True}, + 'account_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'alias': {'key': 'properties.alias', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'account_key': {'key': 'properties.accountKey', 'type': 'AsymmetricEncryptedSecret'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'ssl_status': {'key': 'properties.sslStatus', 'type': 'str'}, + 'blob_domain_name': {'key': 'properties.blobDomainName', 'type': 'str'}, + 'account_type': {'key': 'properties.accountType', 'type': 'str'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + } + + def __init__(self, *, alias: str, ssl_status, account_type, system_data=None, user_name: str=None, account_key=None, connection_string: str=None, blob_domain_name: str=None, storage_account_id: str=None, **kwargs) -> None: + super(StorageAccountCredential, self).__init__(**kwargs) + self.system_data = system_data + self.alias = alias + self.user_name = user_name + self.account_key = account_key + self.connection_string = connection_string + self.ssl_status = ssl_status + self.blob_domain_name = blob_domain_name + self.account_type = account_type + self.storage_account_id = storage_account_id + + +class SubscriptionRegisteredFeatures(Model): + """SubscriptionRegisteredFeatures. + + :param name: + :type name: str + :param state: + :type state: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, state: str=None, **kwargs) -> None: + super(SubscriptionRegisteredFeatures, self).__init__(**kwargs) + self.name = name + self.state = state + + +class SymmetricKey(Model): + """Symmetric key for authentication. + + :param connection_string: Connection string based on the symmetric key. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, *, connection_string=None, **kwargs) -> None: + super(SymmetricKey, self).__init__(**kwargs) + self.connection_string = connection_string + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.databoxedge.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TrackingInfo(Model): + """Tracking courier information. + + :param serial_number: Serial number of the device being tracked. + :type serial_number: str + :param carrier_name: Name of the carrier used in the delivery. + :type carrier_name: str + :param tracking_id: Tracking ID of the shipment. + :type tracking_id: str + :param tracking_url: Tracking URL of the shipment. + :type tracking_url: str + """ + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + } + + def __init__(self, *, serial_number: str=None, carrier_name: str=None, tracking_id: str=None, tracking_url: str=None, **kwargs) -> None: + super(TrackingInfo, self).__init__(**kwargs) + self.serial_number = serial_number + self.carrier_name = carrier_name + self.tracking_id = tracking_id + self.tracking_url = tracking_url + + +class UpdateDownloadProgress(Model): + """Details about the download progress of update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar download_phase: The download phase. Possible values include: + 'Unknown', 'Initializing', 'Downloading', 'Verifying' + :vartype download_phase: str or + ~azure.mgmt.databoxedge.models.DownloadPhase + :ivar percent_complete: Percentage of completion. + :vartype percent_complete: int + :ivar total_bytes_to_download: Total bytes to download. + :vartype total_bytes_to_download: float + :ivar total_bytes_downloaded: Total bytes downloaded. + :vartype total_bytes_downloaded: float + :ivar number_of_updates_to_download: Number of updates to download. + :vartype number_of_updates_to_download: int + :ivar number_of_updates_downloaded: Number of updates downloaded. + :vartype number_of_updates_downloaded: int + """ + + _validation = { + 'download_phase': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'total_bytes_to_download': {'readonly': True}, + 'total_bytes_downloaded': {'readonly': True}, + 'number_of_updates_to_download': {'readonly': True}, + 'number_of_updates_downloaded': {'readonly': True}, + } + + _attribute_map = { + 'download_phase': {'key': 'downloadPhase', 'type': 'str'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'total_bytes_to_download': {'key': 'totalBytesToDownload', 'type': 'float'}, + 'total_bytes_downloaded': {'key': 'totalBytesDownloaded', 'type': 'float'}, + 'number_of_updates_to_download': {'key': 'numberOfUpdatesToDownload', 'type': 'int'}, + 'number_of_updates_downloaded': {'key': 'numberOfUpdatesDownloaded', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateDownloadProgress, self).__init__(**kwargs) + self.download_phase = None + self.percent_complete = None + self.total_bytes_to_download = None + self.total_bytes_downloaded = None + self.number_of_updates_to_download = None + self.number_of_updates_downloaded = None + + +class UpdateInstallProgress(Model): + """Progress details during installation of updates. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar percent_complete: Percentage completed. + :vartype percent_complete: int + :ivar number_of_updates_to_install: Number of updates to install. + :vartype number_of_updates_to_install: int + :ivar number_of_updates_installed: Number of updates installed. + :vartype number_of_updates_installed: int + """ + + _validation = { + 'percent_complete': {'readonly': True}, + 'number_of_updates_to_install': {'readonly': True}, + 'number_of_updates_installed': {'readonly': True}, + } + + _attribute_map = { + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'number_of_updates_to_install': {'key': 'numberOfUpdatesToInstall', 'type': 'int'}, + 'number_of_updates_installed': {'key': 'numberOfUpdatesInstalled', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateInstallProgress, self).__init__(**kwargs) + self.percent_complete = None + self.number_of_updates_to_install = None + self.number_of_updates_installed = None + + +class UpdateSummary(ARMBaseModel): + """Details about ongoing updates and availability of updates on the device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param device_version_number: The current version of the device in format: + 1.2.17312.13.", + :type device_version_number: str + :param friendly_device_version_name: The current version of the device in + text format. + :type friendly_device_version_name: str + :param device_last_scanned_date_time: The last time when a scan was done + on the device. + :type device_last_scanned_date_time: datetime + :param last_completed_scan_job_date_time: The time when the last scan job + was completed (success/cancelled/failed) on the appliance. + :type last_completed_scan_job_date_time: datetime + :ivar last_completed_download_job_date_time: The time when the last + Download job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_download_job_date_time: datetime + :ivar last_completed_install_job_date_time: The time when the last Install + job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_install_job_date_time: datetime + :ivar total_number_of_updates_available: The number of updates available + for the current device version as per the last device scan. + :vartype total_number_of_updates_available: int + :ivar total_number_of_updates_pending_download: The total number of items + pending download. + :vartype total_number_of_updates_pending_download: int + :ivar total_number_of_updates_pending_install: The total number of items + pending install. + :vartype total_number_of_updates_pending_install: int + :ivar reboot_behavior: Indicates if updates are available and at least one + of the updates needs a reboot. Possible values include: 'NeverReboots', + 'RequiresReboot', 'RequestReboot' + :vartype reboot_behavior: str or + ~azure.mgmt.databoxedge.models.InstallRebootBehavior + :ivar ongoing_update_operation: The current update operation. Possible + values include: 'None', 'Scan', 'Download', 'Install' + :vartype ongoing_update_operation: str or + ~azure.mgmt.databoxedge.models.UpdateOperation + :ivar in_progress_download_job_id: The job ID of the download job in + progress. + :vartype in_progress_download_job_id: str + :ivar in_progress_install_job_id: The job ID of the install job in + progress. + :vartype in_progress_install_job_id: str + :ivar in_progress_download_job_started_date_time: The time when the + currently running download (if any) started. + :vartype in_progress_download_job_started_date_time: datetime + :ivar in_progress_install_job_started_date_time: The time when the + currently running install (if any) started. + :vartype in_progress_install_job_started_date_time: datetime + :ivar update_titles: The list of updates available for install. + :vartype update_titles: list[str] + :ivar total_update_size_in_bytes: The total size of updates available for + download in bytes. + :vartype total_update_size_in_bytes: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_completed_download_job_date_time': {'readonly': True}, + 'last_completed_install_job_date_time': {'readonly': True}, + 'total_number_of_updates_available': {'readonly': True}, + 'total_number_of_updates_pending_download': {'readonly': True}, + 'total_number_of_updates_pending_install': {'readonly': True}, + 'reboot_behavior': {'readonly': True}, + 'ongoing_update_operation': {'readonly': True}, + 'in_progress_download_job_id': {'readonly': True}, + 'in_progress_install_job_id': {'readonly': True}, + 'in_progress_download_job_started_date_time': {'readonly': True}, + 'in_progress_install_job_started_date_time': {'readonly': True}, + 'update_titles': {'readonly': True}, + 'total_update_size_in_bytes': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_version_number': {'key': 'properties.deviceVersionNumber', 'type': 'str'}, + 'friendly_device_version_name': {'key': 'properties.friendlyDeviceVersionName', 'type': 'str'}, + 'device_last_scanned_date_time': {'key': 'properties.deviceLastScannedDateTime', 'type': 'iso-8601'}, + 'last_completed_scan_job_date_time': {'key': 'properties.lastCompletedScanJobDateTime', 'type': 'iso-8601'}, + 'last_completed_download_job_date_time': {'key': 'properties.lastCompletedDownloadJobDateTime', 'type': 'iso-8601'}, + 'last_completed_install_job_date_time': {'key': 'properties.lastCompletedInstallJobDateTime', 'type': 'iso-8601'}, + 'total_number_of_updates_available': {'key': 'properties.totalNumberOfUpdatesAvailable', 'type': 'int'}, + 'total_number_of_updates_pending_download': {'key': 'properties.totalNumberOfUpdatesPendingDownload', 'type': 'int'}, + 'total_number_of_updates_pending_install': {'key': 'properties.totalNumberOfUpdatesPendingInstall', 'type': 'int'}, + 'reboot_behavior': {'key': 'properties.rebootBehavior', 'type': 'str'}, + 'ongoing_update_operation': {'key': 'properties.ongoingUpdateOperation', 'type': 'str'}, + 'in_progress_download_job_id': {'key': 'properties.inProgressDownloadJobId', 'type': 'str'}, + 'in_progress_install_job_id': {'key': 'properties.inProgressInstallJobId', 'type': 'str'}, + 'in_progress_download_job_started_date_time': {'key': 'properties.inProgressDownloadJobStartedDateTime', 'type': 'iso-8601'}, + 'in_progress_install_job_started_date_time': {'key': 'properties.inProgressInstallJobStartedDateTime', 'type': 'iso-8601'}, + 'update_titles': {'key': 'properties.updateTitles', 'type': '[str]'}, + 'total_update_size_in_bytes': {'key': 'properties.totalUpdateSizeInBytes', 'type': 'float'}, + } + + def __init__(self, *, device_version_number: str=None, friendly_device_version_name: str=None, device_last_scanned_date_time=None, last_completed_scan_job_date_time=None, **kwargs) -> None: + super(UpdateSummary, self).__init__(**kwargs) + self.device_version_number = device_version_number + self.friendly_device_version_name = friendly_device_version_name + self.device_last_scanned_date_time = device_last_scanned_date_time + self.last_completed_scan_job_date_time = last_completed_scan_job_date_time + self.last_completed_download_job_date_time = None + self.last_completed_install_job_date_time = None + self.total_number_of_updates_available = None + self.total_number_of_updates_pending_download = None + self.total_number_of_updates_pending_install = None + self.reboot_behavior = None + self.ongoing_update_operation = None + self.in_progress_download_job_id = None + self.in_progress_install_job_id = None + self.in_progress_download_job_started_date_time = None + self.in_progress_install_job_started_date_time = None + self.update_titles = None + self.total_update_size_in_bytes = None + + +class UploadCertificateRequest(Model): + """The upload certificate request. + + All required parameters must be populated in order to send to Azure. + + :param authentication_type: The authentication type. Possible values + include: 'Invalid', 'AzureActiveDirectory' + :type authentication_type: str or + ~azure.mgmt.databoxedge.models.AuthenticationType + :param certificate: Required. The base64 encoded certificate raw data. + :type certificate: str + """ + + _validation = { + 'certificate': {'required': True}, + } + + _attribute_map = { + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'str'}, + 'certificate': {'key': 'properties.certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str, authentication_type=None, **kwargs) -> None: + super(UploadCertificateRequest, self).__init__(**kwargs) + self.authentication_type = authentication_type + self.certificate = certificate + + +class UploadCertificateResponse(Model): + """The upload registration certificate response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param auth_type: Specifies authentication type. Possible values include: + 'Invalid', 'AzureActiveDirectory' + :type auth_type: str or ~azure.mgmt.databoxedge.models.AuthenticationType + :ivar resource_id: The resource ID of the Data Box Edge/Gateway device. + :vartype resource_id: str + :ivar aad_authority: Azure Active Directory tenant authority. + :vartype aad_authority: str + :ivar aad_tenant_id: Azure Active Directory tenant ID. + :vartype aad_tenant_id: str + :ivar service_principal_client_id: Azure Active Directory service + principal client ID. + :vartype service_principal_client_id: str + :ivar service_principal_object_id: Azure Active Directory service + principal object ID. + :vartype service_principal_object_id: str + :ivar azure_management_endpoint_audience: The azure management endpoint + audience. + :vartype azure_management_endpoint_audience: str + :ivar aad_audience: Identifier of the target resource that is the + recipient of the requested token. + :vartype aad_audience: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'aad_authority': {'readonly': True}, + 'aad_tenant_id': {'readonly': True}, + 'service_principal_client_id': {'readonly': True}, + 'service_principal_object_id': {'readonly': True}, + 'azure_management_endpoint_audience': {'readonly': True}, + 'aad_audience': {'readonly': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'aad_authority': {'key': 'aadAuthority', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, + 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + } + + def __init__(self, *, auth_type=None, **kwargs) -> None: + super(UploadCertificateResponse, self).__init__(**kwargs) + self.auth_type = auth_type + self.resource_id = None + self.aad_authority = None + self.aad_tenant_id = None + self.service_principal_client_id = None + self.service_principal_object_id = None + self.azure_management_endpoint_audience = None + self.aad_audience = None + + +class User(ARMBaseModel): + """Represents a user who has access to one or more shares on the Data Box + Edge/Gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: User in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param encrypted_password: The password details. + :type encrypted_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :ivar share_access_rights: List of shares that the user has rights on. + This field should not be specified during user creation. + :vartype share_access_rights: + list[~azure.mgmt.databoxedge.models.ShareAccessRight] + :param user_type: Type of the user. Possible values include: 'Share', + 'LocalManagement', 'ARM' + :type user_type: str or ~azure.mgmt.databoxedge.models.UserType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_access_rights': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'encrypted_password': {'key': 'properties.encryptedPassword', 'type': 'AsymmetricEncryptedSecret'}, + 'share_access_rights': {'key': 'properties.shareAccessRights', 'type': '[ShareAccessRight]'}, + 'user_type': {'key': 'properties.userType', 'type': 'str'}, + } + + def __init__(self, *, system_data=None, encrypted_password=None, user_type=None, **kwargs) -> None: + super(User, self).__init__(**kwargs) + self.system_data = system_data + self.encrypted_password = encrypted_password + self.share_access_rights = None + self.user_type = user_type + + +class UserAccessRight(Model): + """The mapping between a particular user and the access type on the SMB share. + + All required parameters must be populated in order to send to Azure. + + :param user_id: Required. User ID (already existing in the device). + :type user_id: str + :param access_type: Required. Type of access to be allowed for the user. + Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'user_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, *, user_id: str, access_type, **kwargs) -> None: + super(UserAccessRight, self).__init__(**kwargs) + self.user_id = user_id + self.access_type = access_type diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_paged_models.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_paged_models.py new file mode 100644 index 000000000000..644a4942ff0e --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/_paged_models.py @@ -0,0 +1,222 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class DataBoxEdgeSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`DataBoxEdgeSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataBoxEdgeSku]'} + } + + def __init__(self, *args, **kwargs): + + super(DataBoxEdgeSkuPaged, self).__init__(*args, **kwargs) +class DataBoxEdgeDevicePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataBoxEdgeDevice ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataBoxEdgeDevice]'} + } + + def __init__(self, *args, **kwargs): + + super(DataBoxEdgeDevicePaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class BandwidthSchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`BandwidthSchedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BandwidthSchedule]'} + } + + def __init__(self, *args, **kwargs): + + super(BandwidthSchedulePaged, self).__init__(*args, **kwargs) +class NodePaged(Paged): + """ + A paging container for iterating over a list of :class:`Node ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Node]'} + } + + def __init__(self, *args, **kwargs): + + super(NodePaged, self).__init__(*args, **kwargs) +class OrderPaged(Paged): + """ + A paging container for iterating over a list of :class:`Order ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Order]'} + } + + def __init__(self, *args, **kwargs): + + super(OrderPaged, self).__init__(*args, **kwargs) +class RolePaged(Paged): + """ + A paging container for iterating over a list of :class:`Role ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Role]'} + } + + def __init__(self, *args, **kwargs): + + super(RolePaged, self).__init__(*args, **kwargs) +class AddonPaged(Paged): + """ + A paging container for iterating over a list of :class:`Addon ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Addon]'} + } + + def __init__(self, *args, **kwargs): + + super(AddonPaged, self).__init__(*args, **kwargs) +class MonitoringMetricConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`MonitoringMetricConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MonitoringMetricConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(MonitoringMetricConfigurationPaged, self).__init__(*args, **kwargs) +class SharePaged(Paged): + """ + A paging container for iterating over a list of :class:`Share ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Share]'} + } + + def __init__(self, *args, **kwargs): + + super(SharePaged, self).__init__(*args, **kwargs) +class StorageAccountCredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`StorageAccountCredential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StorageAccountCredential]'} + } + + def __init__(self, *args, **kwargs): + + super(StorageAccountCredentialPaged, self).__init__(*args, **kwargs) +class StorageAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`StorageAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StorageAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(StorageAccountPaged, self).__init__(*args, **kwargs) +class ContainerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Container ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Container]'} + } + + def __init__(self, *args, **kwargs): + + super(ContainerPaged, self).__init__(*args, **kwargs) +class TriggerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Trigger ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Trigger]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggerPaged, self).__init__(*args, **kwargs) +class UserPaged(Paged): + """ + A paging container for iterating over a list of :class:`User ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[User]'} + } + + def __init__(self, *args, **kwargs): + + super(UserPaged, self).__init__(*args, **kwargs) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/__init__.py new file mode 100644 index 000000000000..fad9a2d17114 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/__init__.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 ._operations import Operations +from ._available_skus_operations import AvailableSkusOperations +from ._devices_operations import DevicesOperations +from ._alerts_operations import AlertsOperations +from ._bandwidth_schedules_operations import BandwidthSchedulesOperations +from ._jobs_operations import JobsOperations +from ._nodes_operations import NodesOperations +from ._operations_status_operations import OperationsStatusOperations +from ._orders_operations import OrdersOperations +from ._roles_operations import RolesOperations +from ._addons_operations import AddonsOperations +from ._monitoring_config_operations import MonitoringConfigOperations +from ._shares_operations import SharesOperations +from ._storage_account_credentials_operations import StorageAccountCredentialsOperations +from ._storage_accounts_operations import StorageAccountsOperations +from ._containers_operations import ContainersOperations +from ._triggers_operations import TriggersOperations +from ._users_operations import UsersOperations + +__all__ = [ + 'Operations', + 'AvailableSkusOperations', + 'DevicesOperations', + 'AlertsOperations', + 'BandwidthSchedulesOperations', + 'JobsOperations', + 'NodesOperations', + 'OperationsStatusOperations', + 'OrdersOperations', + 'RolesOperations', + 'AddonsOperations', + 'MonitoringConfigOperations', + 'SharesOperations', + 'StorageAccountCredentialsOperations', + 'StorageAccountsOperations', + 'ContainersOperations', + 'TriggersOperations', + 'UsersOperations', +] diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_addons_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_addons_operations.py new file mode 100644 index 000000000000..e3ebcadf3244 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_addons_operations.py @@ -0,0 +1,379 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +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 AddonsOperations(object): + """AddonsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_role( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the addons configured in the role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Addon + :rtype: + ~azure.mgmt.databoxedge.models.AddonPaged[~azure.mgmt.databoxedge.models.Addon] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_role.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AddonPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_role.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons'} + + def get( + self, device_name, role_name, addon_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific addon by name. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param addon_name: The addon name. + :type addon_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Addon or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Addon or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + 'addonName': self._serialize.url("addon_name", addon_name, 'str'), + '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') + + # 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('Addon', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}'} + + + def _create_or_update_initial( + self, device_name, role_name, addon_name, addon, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + 'addonName': self._serialize.url("addon_name", addon_name, 'str'), + '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') + + # 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(addon, 'Addon') + + # 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('Addon', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, role_name, addon_name, addon, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a addon. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param addon_name: The addon name. + :type addon_name: str + :param addon: The addon properties. + :type addon: ~azure.mgmt.databoxedge.models.Addon + :param resource_group_name: The resource group name. + :type resource_group_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 Addon or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Addon] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Addon]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + addon=addon, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Addon', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}'} + + + def _delete_initial( + self, device_name, role_name, addon_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + 'addonName': self._serialize.url("addon_name", addon_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, role_name, addon_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the addon on the device. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param addon_name: The addon name. + :type addon_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_alerts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_alerts_operations.py new file mode 100644 index 000000000000..5b20d4783e13 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_alerts_operations.py @@ -0,0 +1,176 @@ +# 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 AlertsOperations(object): + """AlertsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the alerts for a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Alert + :rtype: + ~azure.mgmt.databoxedge.models.AlertPaged[~azure.mgmt.databoxedge.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets an alert by name. + + :param device_name: The device name. + :type device_name: str + :param name: The alert name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Alert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Alert or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Alert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_available_skus_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_available_skus_operations.py new file mode 100644 index 000000000000..dcb1da759fc3 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_available_skus_operations.py @@ -0,0 +1,106 @@ +# 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 AvailableSkusOperations(object): + """AvailableSkusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all the available Skus and information related to them. + + :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 DataBoxEdgeSku + :rtype: + ~azure.mgmt.databoxedge.models.DataBoxEdgeSkuPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataBoxEdgeSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/availableSkus'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_bandwidth_schedules_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_bandwidth_schedules_operations.py new file mode 100644 index 000000000000..14da825f4859 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_bandwidth_schedules_operations.py @@ -0,0 +1,367 @@ +# 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 BandwidthSchedulesOperations(object): + """BandwidthSchedulesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 BandwidthSchedule + :rtype: + ~azure.mgmt.databoxedge.models.BandwidthSchedulePaged[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BandwidthSchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified bandwidth schedule. + + :param device_name: The device name. + :type device_name: str + :param name: The bandwidth schedule name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: BandwidthSchedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.BandwidthSchedule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('BandwidthSchedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} + + + def _create_or_update_initial( + self, device_name, name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(parameters, 'BandwidthSchedule') + + # 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('BandwidthSchedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, parameters, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. + :type device_name: str + :param name: The bandwidth schedule name which needs to be + added/updated. + :type name: str + :param parameters: The bandwidth schedule to be added or updated. + :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule + :param resource_group_name: The resource group name. + :type resource_group_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 BandwidthSchedule or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.BandwidthSchedule]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + parameters=parameters, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BandwidthSchedule', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified bandwidth schedule. + + :param device_name: The device name. + :type device_name: str + :param name: The bandwidth schedule name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_containers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_containers_operations.py new file mode 100644 index 000000000000..ff29846614e9 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_containers_operations.py @@ -0,0 +1,467 @@ +# 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 ContainersOperations(object): + """ContainersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_storage_account( + self, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the containers of a storage Account in a Data Box Edge/Data + Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The storage Account name. + :type storage_account_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Container + :rtype: + ~azure.mgmt.databoxedge.models.ContainerPaged[~azure.mgmt.databoxedge.models.Container] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_storage_account.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContainerPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_storage_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers'} + + def get( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a container by name. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container Name + :type container_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Container or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Container or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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('Container', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}'} + + + def _create_or_update_initial( + self, device_name, storage_account_name, container_name, container, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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(container, 'Container') + + # 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('Container', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, storage_account_name, container_name, container, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new container or updates an existing container on the device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container name. + :type container_name: str + :param container: The container properties. + :type container: ~azure.mgmt.databoxedge.models.Container + :param resource_group_name: The resource group name. + :type resource_group_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 Container or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Container] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Container]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + container=container, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Container', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}'} + + + def _delete_initial( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the container on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container name. + :type container_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}'} + + + def _refresh_initial( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.refresh.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def refresh( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Refreshes the container metadata with the data from the cloud. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container name. + :type container_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._refresh_initial( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_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) + refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}/refresh'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_devices_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_devices_operations.py new file mode 100644 index 000000000000..dbc06b87c6fc --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_devices_operations.py @@ -0,0 +1,1211 @@ +# 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 DevicesOperations(object): + """DevicesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_subscription( + self, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets all the Data Box Edge/Data Box Gateway devices in a subscription. + + :param expand: Specify $expand=details to populate additional fields + related to the resource or Specify $skipToken= to populate the + next page in the list. + :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: An iterator like instance of DataBoxEdgeDevice + :rtype: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.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 expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataBoxEdgeDevicePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices'} + + def list_by_resource_group( + self, resource_group_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets all the Data Box Edge/Data Box Gateway devices in a resource + group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param expand: Specify $expand=details to populate additional fields + related to the resource or Specify $skipToken= to populate the + next page in the list. + :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: An iterator like instance of DataBoxEdgeDevice + :rtype: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataBoxEdgeDevicePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices'} + + def get( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDevice or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('DataBoxEdgeDevice', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + + def _create_or_update_initial( + self, device_name, data_box_edge_device, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(data_box_edge_device, 'DataBoxEdgeDevice') + + # 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]: + 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('DataBoxEdgeDevice', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, data_box_edge_device, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. + :type device_name: str + :param data_box_edge_device: The resource object. + :type data_box_edge_device: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :param resource_group_name: The resource group name. + :type resource_group_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 DataBoxEdgeDevice or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + data_box_edge_device=data_box_edge_device, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('DataBoxEdgeDevice', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + + def _delete_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + def update( + self, device_name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. + :type device_name: str + :param parameters: The resource parameters. + :type parameters: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDevice or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(parameters, 'DataBoxEdgeDevicePatch') + + # 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]: + 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('DataBoxEdgeDevice', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + + def _download_updates_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.download_updates.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def download_updates( + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Downloads the updates on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._download_updates_initial( + device_name=device_name, + resource_group_name=resource_group_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) + download_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates'} + + def generate_certificate( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Generates certificate for activation key. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: GenerateCertResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.GenerateCertResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generate_certificate.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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 + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GenerateCertResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generate_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/generateCertificate'} + + def get_extended_information( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets additional information for the specified Azure Stack Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDeviceExtendedInfo or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_extended_information.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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 + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataBoxEdgeDeviceExtendedInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_extended_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation'} + + + def _install_updates_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_updates.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def install_updates( + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Installs the updates on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._install_updates_initial( + device_name=device_name, + resource_group_name=resource_group_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) + install_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates'} + + def get_network_settings( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the network settings of the specified Data Box Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: NetworkSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.NetworkSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_network_settings.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('NetworkSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default'} + + + def _scan_for_updates_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.scan_for_updates.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def scan_for_updates( + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Scans for updates on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._scan_for_updates_initial( + device_name=device_name, + resource_group_name=resource_group_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) + scan_for_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates'} + + + def _create_or_update_security_settings_initial( + self, device_name, security_settings, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_security_settings.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(security_settings, 'SecuritySettings') + + # 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 [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 create_or_update_security_settings( + self, device_name, security_settings, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates the security settings on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param security_settings: The security settings. + :type security_settings: + ~azure.mgmt.databoxedge.models.SecuritySettings + :param resource_group_name: The resource group name. + :type resource_group_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._create_or_update_security_settings_initial( + device_name=device_name, + security_settings=security_settings, + resource_group_name=resource_group_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) + create_or_update_security_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update'} + + def update_extended_information( + self, device_name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets additional information for the specified Data Box Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param parameters: The patch object. + :type parameters: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDeviceExtendedInfo or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_extended_information.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(parameters, 'DataBoxEdgeDeviceExtendedInfoPatch') + + # 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('DataBoxEdgeDeviceExtendedInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_extended_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateExtendedInformation'} + + def get_update_summary( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets information about the availability of updates based on the last + scan of the device. It also gets information about any ongoing download + or install jobs on the device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: UpdateSummary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.UpdateSummary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_update_summary.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('UpdateSummary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_update_summary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default'} + + def upload_certificate( + self, device_name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Uploads registration certificate for the device. + + :param device_name: The device name. + :type device_name: str + :param parameters: The upload certificate request. + :type parameters: + ~azure.mgmt.databoxedge.models.UploadCertificateRequest + :param resource_group_name: The resource group name. + :type resource_group_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: UploadCertificateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.upload_certificate.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(parameters, 'UploadCertificateRequest') + + # 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('UploadCertificateResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + upload_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_jobs_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_jobs_operations.py new file mode 100644 index 000000000000..67bc08d71008 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_jobs_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobsOperations(object): + """JobsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the details of a specified job on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param name: The job name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_monitoring_config_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_monitoring_config_operations.py new file mode 100644 index 000000000000..d30e18daf0d6 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_monitoring_config_operations.py @@ -0,0 +1,372 @@ +# 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 MonitoringConfigOperations(object): + """MonitoringConfigOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists metric configurations in a role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 MonitoringMetricConfiguration + :rtype: + ~azure.mgmt.databoxedge.models.MonitoringMetricConfigurationPaged[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MonitoringMetricConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig'} + + def get( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a metric configuration of a role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: MonitoringMetricConfiguration or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + # 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('MonitoringMetricConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default'} + + + def _create_or_update_initial( + self, device_name, role_name, monitoring_metric_configuration, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + # 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(monitoring_metric_configuration, 'MonitoringMetricConfiguration') + + # 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('MonitoringMetricConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, role_name, monitoring_metric_configuration, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new metric configuration or updates an existing one for a + role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param monitoring_metric_configuration: The metric configuration. + :type monitoring_metric_configuration: + ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration + :param resource_group_name: The resource group name. + :type resource_group_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 + MonitoringMetricConfiguration or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + role_name=role_name, + monitoring_metric_configuration=monitoring_metric_configuration, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MonitoringMetricConfiguration', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default'} + + + def _delete_initial( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, role_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """deletes a new metric configuration for a role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_nodes_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_nodes_operations.py new file mode 100644 index 000000000000..28d42685d56d --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_nodes_operations.py @@ -0,0 +1,113 @@ +# 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 NodesOperations(object): + """NodesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the nodes currently configured under this Data Box Edge + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Node + :rtype: + ~azure.mgmt.databoxedge.models.NodePaged[~azure.mgmt.databoxedge.models.Node] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NodePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/nodes'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_operations.py new file mode 100644 index 000000000000..1c0efd26f23d --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all the supported 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.databoxedge.models.OperationPaged[~azure.mgmt.databoxedge.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DataBoxEdge/operations'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_operations_status_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_operations_status_operations.py new file mode 100644 index 000000000000..6a8c5ba554ac --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_operations_status_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class OperationsStatusOperations(object): + """OperationsStatusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the details of a specified job on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param name: The job name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_orders_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_orders_operations.py new file mode 100644 index 000000000000..21da9d402c56 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_orders_operations.py @@ -0,0 +1,416 @@ +# 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 OrdersOperations(object): + """OrdersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the orders related to a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Order + :rtype: + ~azure.mgmt.databoxedge.models.OrderPaged[~azure.mgmt.databoxedge.models.Order] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders'} + + def get( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific order by name. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Order or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Order or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('Order', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + + + def _create_or_update_initial( + self, device_name, order, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(order, 'Order') + + # 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('Order', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, order, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an order. + + :param device_name: The order details of a device. + :type device_name: str + :param order: The order to be created or updated. + :type order: ~azure.mgmt.databoxedge.models.Order + :param resource_group_name: The resource group name. + :type resource_group_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 Order or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Order] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Order]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + order=order, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Order', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + + + def _delete_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the order related to the device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + + def list_dc_access_code( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the DCAccess Code. + + :param device_name: The device name + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: DCAccessCode or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.DCAccessCode or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_dc_access_code.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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 + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DCAccessCode', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_dc_access_code.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default/listDCAccessCode'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_roles_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_roles_operations.py new file mode 100644 index 000000000000..fdf156057228 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_roles_operations.py @@ -0,0 +1,366 @@ +# 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 RolesOperations(object): + """RolesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the roles configured in a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Role + :rtype: + ~azure.mgmt.databoxedge.models.RolePaged[~azure.mgmt.databoxedge.models.Role] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RolePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific role by name. + + :param device_name: The device name. + :type device_name: str + :param name: The role name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Role or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Role or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Role', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} + + + def _create_or_update_initial( + self, device_name, name, role, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(role, 'Role') + + # 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('Role', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, role, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a role. + + :param device_name: The device name. + :type device_name: str + :param name: The role name. + :type name: str + :param role: The role properties. + :type role: ~azure.mgmt.databoxedge.models.Role + :param resource_group_name: The resource group name. + :type resource_group_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 Role or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Role] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Role]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + role=role, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Role', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the role on the device. + + :param device_name: The device name. + :type device_name: str + :param name: The role name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_shares_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_shares_operations.py new file mode 100644 index 000000000000..e28b18a4ceb4 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_shares_operations.py @@ -0,0 +1,448 @@ +# 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 SharesOperations(object): + """SharesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the shares in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Share + :rtype: + ~azure.mgmt.databoxedge.models.SharePaged[~azure.mgmt.databoxedge.models.Share] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SharePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a share by name. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Share or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Share or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Share', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + + + def _create_or_update_initial( + self, device_name, name, share, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(share, 'Share') + + # 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('Share', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, share, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new share or updates an existing share on the device. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param share: The share properties. + :type share: ~azure.mgmt.databoxedge.models.Share + :param resource_group_name: The resource group name. + :type resource_group_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 Share or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Share] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Share]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + share=share, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Share', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the share on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + + + def _refresh_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.refresh.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def refresh( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Refreshes the share metadata with the data from the cloud. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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._refresh_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_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) + refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_storage_account_credentials_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_storage_account_credentials_operations.py new file mode 100644 index 000000000000..6425067c7b00 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_storage_account_credentials_operations.py @@ -0,0 +1,368 @@ +# 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 StorageAccountCredentialsOperations(object): + """StorageAccountCredentialsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the storage account credentials in a Data Box Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 StorageAccountCredential + :rtype: + ~azure.mgmt.databoxedge.models.StorageAccountCredentialPaged[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StorageAccountCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified storage account credential. + + :param device_name: The device name. + :type device_name: str + :param name: The storage account credential name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: StorageAccountCredential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.StorageAccountCredential or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('StorageAccountCredential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} + + + def _create_or_update_initial( + self, device_name, name, storage_account_credential, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(storage_account_credential, 'StorageAccountCredential') + + # 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('StorageAccountCredential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, storage_account_credential, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates the storage account credential. + + :param device_name: The device name. + :type device_name: str + :param name: The storage account credential name. + :type name: str + :param storage_account_credential: The storage account credential. + :type storage_account_credential: + ~azure.mgmt.databoxedge.models.StorageAccountCredential + :param resource_group_name: The resource group name. + :type resource_group_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 + StorageAccountCredential or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.StorageAccountCredential]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + storage_account_credential=storage_account_credential, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageAccountCredential', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the storage account credential. + + :param device_name: The device name. + :type device_name: str + :param name: The storage account credential name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_storage_accounts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_storage_accounts_operations.py new file mode 100644 index 000000000000..927bda3b7125 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_storage_accounts_operations.py @@ -0,0 +1,368 @@ +# 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 StorageAccountsOperations(object): + """StorageAccountsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 StorageAccount + :rtype: + ~azure.mgmt.databoxedge.models.StorageAccountPaged[~azure.mgmt.databoxedge.models.StorageAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts'} + + def get( + self, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a StorageAccount by name. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The storage account name. + :type storage_account_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: StorageAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.StorageAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + # 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('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'} + + + def _create_or_update_initial( + self, device_name, storage_account_name, storage_account, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + # 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(storage_account, 'StorageAccount') + + # 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('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, storage_account_name, storage_account, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new StorageAccount or updates an existing StorageAccount on + the device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The StorageAccount name. + :type storage_account_name: str + :param storage_account: The StorageAccount properties. + :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount + :param resource_group_name: The resource group name. + :type resource_group_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 StorageAccount or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.StorageAccount] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.StorageAccount]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + storage_account_name=storage_account_name, + storage_account=storage_account, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageAccount', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'} + + + def _delete_initial( + self, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + # 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, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the StorageAccount on the Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The StorageAccount name. + :type storage_account_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_triggers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_triggers_operations.py new file mode 100644 index 000000000000..dbdb9de929c2 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_triggers_operations.py @@ -0,0 +1,370 @@ +# 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 TriggersOperations(object): + """TriggersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists all the triggers configured in the device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param filter: Specify $filter='CustomContextTag eq ' to filter + on custom context tag property + :type filter: 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 Trigger + :rtype: + ~azure.mgmt.databoxedge.models.TriggerPaged[~azure.mgmt.databoxedge.models.Trigger] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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 filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggerPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get a specific trigger by name. + + :param device_name: The device name. + :type device_name: str + :param name: The trigger name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Trigger or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Trigger or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Trigger', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} + + + def _create_or_update_initial( + self, device_name, name, trigger, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(trigger, 'Trigger') + + # 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('Trigger', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, trigger, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a trigger. + + :param device_name: Creates or updates a trigger + :type device_name: str + :param name: The trigger name. + :type name: str + :param trigger: The trigger. + :type trigger: ~azure.mgmt.databoxedge.models.Trigger + :param resource_group_name: The resource group name. + :type resource_group_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 Trigger or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Trigger] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Trigger]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + trigger=trigger, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Trigger', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the trigger on the gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The trigger name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_users_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_users_operations.py new file mode 100644 index 000000000000..7f2e21aa9e55 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/operations/_users_operations.py @@ -0,0 +1,373 @@ +# 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 UsersOperations(object): + """UsersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets all the users registered on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param expand: Specify $expand=details to populate additional fields + related to the resource or Specify $skipToken= to populate the + next page in the list. + :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: An iterator like instance of User + :rtype: + ~azure.mgmt.databoxedge.models.UserPaged[~azure.mgmt.databoxedge.models.User] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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 expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified user. + + :param device_name: The device name. + :type device_name: str + :param name: The user name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} + + + def _create_or_update_initial( + self, device_name, name, user, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(user, 'User') + + # 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('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, user, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new user or updates an existing user's information on a Data + Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The user name. + :type name: str + :param user: The user details. + :type user: ~azure.mgmt.databoxedge.models.User + :param resource_group_name: The resource group name. + :type resource_group_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 User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.User]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + user=user, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the user on a databox edge/gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The user name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/version.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/version.py new file mode 100644 index 000000000000..16563e7d14cb --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/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 = "2020-09-01" + diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/__init__.py new file mode 100644 index 000000000000..5e369aac5f6e --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._configuration import DataBoxEdgeManagementClientConfiguration +from ._data_box_edge_management_client import DataBoxEdgeManagementClient +__all__ = ['DataBoxEdgeManagementClient', 'DataBoxEdgeManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/_configuration.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/_configuration.py new file mode 100644 index 000000000000..c234603c9bea --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class DataBoxEdgeManagementClientConfiguration(AzureConfiguration): + """Configuration for DataBoxEdgeManagementClient + 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(DataBoxEdgeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-databoxedge/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/_data_box_edge_management_client.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/_data_box_edge_management_client.py new file mode 100644 index 000000000000..e4960c7e3789 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/_data_box_edge_management_client.py @@ -0,0 +1,134 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import DataBoxEdgeManagementClientConfiguration +from .operations import Operations +from .operations import AvailableSkusOperations +from .operations import DevicesOperations +from .operations import AlertsOperations +from .operations import BandwidthSchedulesOperations +from .operations import JobsOperations +from .operations import NodesOperations +from .operations import OperationsStatusOperations +from .operations import OrdersOperations +from .operations import RolesOperations +from .operations import AddonsOperations +from .operations import MonitoringConfigOperations +from .operations import SharesOperations +from .operations import StorageAccountCredentialsOperations +from .operations import StorageAccountsOperations +from .operations import ContainersOperations +from .operations import TriggersOperations +from .operations import UsersOperations +from . import models + + +class DataBoxEdgeManagementClient(SDKClient): + """DataBoxEdgeManagementClient + + :ivar config: Configuration for client. + :vartype config: DataBoxEdgeManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databoxedge.operations.Operations + :ivar available_skus: AvailableSkus operations + :vartype available_skus: azure.mgmt.databoxedge.operations.AvailableSkusOperations + :ivar devices: Devices operations + :vartype devices: azure.mgmt.databoxedge.operations.DevicesOperations + :ivar alerts: Alerts operations + :vartype alerts: azure.mgmt.databoxedge.operations.AlertsOperations + :ivar bandwidth_schedules: BandwidthSchedules operations + :vartype bandwidth_schedules: azure.mgmt.databoxedge.operations.BandwidthSchedulesOperations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.databoxedge.operations.JobsOperations + :ivar nodes: Nodes operations + :vartype nodes: azure.mgmt.databoxedge.operations.NodesOperations + :ivar operations_status: OperationsStatus operations + :vartype operations_status: azure.mgmt.databoxedge.operations.OperationsStatusOperations + :ivar orders: Orders operations + :vartype orders: azure.mgmt.databoxedge.operations.OrdersOperations + :ivar roles: Roles operations + :vartype roles: azure.mgmt.databoxedge.operations.RolesOperations + :ivar addons: Addons operations + :vartype addons: azure.mgmt.databoxedge.operations.AddonsOperations + :ivar monitoring_config: MonitoringConfig operations + :vartype monitoring_config: azure.mgmt.databoxedge.operations.MonitoringConfigOperations + :ivar shares: Shares operations + :vartype shares: azure.mgmt.databoxedge.operations.SharesOperations + :ivar storage_account_credentials: StorageAccountCredentials operations + :vartype storage_account_credentials: azure.mgmt.databoxedge.operations.StorageAccountCredentialsOperations + :ivar storage_accounts: StorageAccounts operations + :vartype storage_accounts: azure.mgmt.databoxedge.operations.StorageAccountsOperations + :ivar containers: Containers operations + :vartype containers: azure.mgmt.databoxedge.operations.ContainersOperations + :ivar triggers: Triggers operations + :vartype triggers: azure.mgmt.databoxedge.operations.TriggersOperations + :ivar users: Users operations + :vartype users: azure.mgmt.databoxedge.operations.UsersOperations + + :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 = DataBoxEdgeManagementClientConfiguration(credentials, subscription_id, base_url) + super(DataBoxEdgeManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2020-12-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.available_skus = AvailableSkusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.devices = DevicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.alerts = AlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.bandwidth_schedules = BandwidthSchedulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.nodes = NodesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations_status = OperationsStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.orders = OrdersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.roles = RolesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.addons = AddonsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.monitoring_config = MonitoringConfigOperations( + self._client, self.config, self._serialize, self._deserialize) + self.shares = SharesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.storage_account_credentials = StorageAccountCredentialsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.storage_accounts = StorageAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.containers = ContainersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.triggers = TriggersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.users = UsersOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/__init__.py new file mode 100644 index 000000000000..6140f9ac44a7 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/__init__.py @@ -0,0 +1,466 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Addon + from ._models_py3 import Address + from ._models_py3 import Alert + from ._models_py3 import AlertErrorDetails + from ._models_py3 import ArcAddon + from ._models_py3 import ARMBaseModel + from ._models_py3 import AsymmetricEncryptedSecret + from ._models_py3 import Authentication + from ._models_py3 import AzureContainerInfo + from ._models_py3 import BandwidthSchedule + from ._models_py3 import ClientAccessRight + from ._models_py3 import CloudEdgeManagementRole + from ._models_py3 import CniConfig + from ._models_py3 import ComputeResource + from ._models_py3 import ContactDetails + from ._models_py3 import Container + from ._models_py3 import DataBoxEdgeDevice + from ._models_py3 import DataBoxEdgeDeviceExtendedInfo + from ._models_py3 import DataBoxEdgeDeviceExtendedInfoPatch + from ._models_py3 import DataBoxEdgeDevicePatch + from ._models_py3 import DataBoxEdgeMoveRequest + from ._models_py3 import DataBoxEdgeSku + from ._models_py3 import DCAccessCode + from ._models_py3 import DeviceSecrets + from ._models_py3 import EdgeProfile + from ._models_py3 import EdgeProfilePatch + from ._models_py3 import EdgeProfileSubscription + from ._models_py3 import EdgeProfileSubscriptionPatch + from ._models_py3 import EtcdInfo + from ._models_py3 import FileEventTrigger + from ._models_py3 import FileSourceInfo + from ._models_py3 import GenerateCertResponse + from ._models_py3 import ImageRepositoryCredential + from ._models_py3 import IoTAddon + from ._models_py3 import IoTDeviceInfo + from ._models_py3 import IoTEdgeAgentInfo + from ._models_py3 import IoTRole + from ._models_py3 import Ipv4Config + from ._models_py3 import Ipv6Config + from ._models_py3 import Job + from ._models_py3 import JobErrorDetails + from ._models_py3 import JobErrorItem + from ._models_py3 import KubernetesClusterInfo + from ._models_py3 import KubernetesIPConfiguration + from ._models_py3 import KubernetesRole + from ._models_py3 import KubernetesRoleCompute + from ._models_py3 import KubernetesRoleNetwork + from ._models_py3 import KubernetesRoleResources + from ._models_py3 import KubernetesRoleStorage + from ._models_py3 import KubernetesRoleStorageClassInfo + from ._models_py3 import LoadBalancerConfig + from ._models_py3 import MECRole + from ._models_py3 import MetricConfiguration + from ._models_py3 import MetricCounter + from ._models_py3 import MetricCounterSet + from ._models_py3 import MetricDimension + from ._models_py3 import MetricDimensionV1 + from ._models_py3 import MetricSpecificationV1 + from ._models_py3 import MonitoringMetricConfiguration + from ._models_py3 import MountPointMap + from ._models_py3 import NetworkAdapter + from ._models_py3 import NetworkAdapterPosition + from ._models_py3 import NetworkSettings + from ._models_py3 import Node + from ._models_py3 import NodeInfo + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import Order + from ._models_py3 import OrderStatus + from ._models_py3 import PeriodicTimerEventTrigger + from ._models_py3 import PeriodicTimerSourceInfo + from ._models_py3 import RefreshDetails + from ._models_py3 import ResourceIdentity + from ._models_py3 import ResourceMoveDetails + from ._models_py3 import ResourceTypeSku + from ._models_py3 import Role + from ._models_py3 import RoleSinkInfo + from ._models_py3 import Secret + from ._models_py3 import SecuritySettings + from ._models_py3 import ServiceSpecification + from ._models_py3 import Share + from ._models_py3 import ShareAccessRight + from ._models_py3 import Sku + from ._models_py3 import SkuCapability + from ._models_py3 import SkuCost + from ._models_py3 import SkuInformation + from ._models_py3 import SkuInformationList + from ._models_py3 import SkuLocationInfo + from ._models_py3 import StorageAccount + from ._models_py3 import StorageAccountCredential + from ._models_py3 import SubscriptionRegisteredFeatures + from ._models_py3 import SymmetricKey + from ._models_py3 import SystemData + from ._models_py3 import TrackingInfo + from ._models_py3 import Trigger + from ._models_py3 import UpdateDownloadProgress + from ._models_py3 import UpdateInstallProgress + from ._models_py3 import UpdateSummary + from ._models_py3 import UploadCertificateRequest + from ._models_py3 import UploadCertificateResponse + from ._models_py3 import User + from ._models_py3 import UserAccessRight +except (SyntaxError, ImportError): + from ._models import Addon + from ._models import Address + from ._models import Alert + from ._models import AlertErrorDetails + from ._models import ArcAddon + from ._models import ARMBaseModel + from ._models import AsymmetricEncryptedSecret + from ._models import Authentication + from ._models import AzureContainerInfo + from ._models import BandwidthSchedule + from ._models import ClientAccessRight + from ._models import CloudEdgeManagementRole + from ._models import CniConfig + from ._models import ComputeResource + from ._models import ContactDetails + from ._models import Container + from ._models import DataBoxEdgeDevice + from ._models import DataBoxEdgeDeviceExtendedInfo + from ._models import DataBoxEdgeDeviceExtendedInfoPatch + from ._models import DataBoxEdgeDevicePatch + from ._models import DataBoxEdgeMoveRequest + from ._models import DataBoxEdgeSku + from ._models import DCAccessCode + from ._models import DeviceSecrets + from ._models import EdgeProfile + from ._models import EdgeProfilePatch + from ._models import EdgeProfileSubscription + from ._models import EdgeProfileSubscriptionPatch + from ._models import EtcdInfo + from ._models import FileEventTrigger + from ._models import FileSourceInfo + from ._models import GenerateCertResponse + from ._models import ImageRepositoryCredential + from ._models import IoTAddon + from ._models import IoTDeviceInfo + from ._models import IoTEdgeAgentInfo + from ._models import IoTRole + from ._models import Ipv4Config + from ._models import Ipv6Config + from ._models import Job + from ._models import JobErrorDetails + from ._models import JobErrorItem + from ._models import KubernetesClusterInfo + from ._models import KubernetesIPConfiguration + from ._models import KubernetesRole + from ._models import KubernetesRoleCompute + from ._models import KubernetesRoleNetwork + from ._models import KubernetesRoleResources + from ._models import KubernetesRoleStorage + from ._models import KubernetesRoleStorageClassInfo + from ._models import LoadBalancerConfig + from ._models import MECRole + from ._models import MetricConfiguration + from ._models import MetricCounter + from ._models import MetricCounterSet + from ._models import MetricDimension + from ._models import MetricDimensionV1 + from ._models import MetricSpecificationV1 + from ._models import MonitoringMetricConfiguration + from ._models import MountPointMap + from ._models import NetworkAdapter + from ._models import NetworkAdapterPosition + from ._models import NetworkSettings + from ._models import Node + from ._models import NodeInfo + from ._models import Operation + from ._models import OperationDisplay + from ._models import Order + from ._models import OrderStatus + from ._models import PeriodicTimerEventTrigger + from ._models import PeriodicTimerSourceInfo + from ._models import RefreshDetails + from ._models import ResourceIdentity + from ._models import ResourceMoveDetails + from ._models import ResourceTypeSku + from ._models import Role + from ._models import RoleSinkInfo + from ._models import Secret + from ._models import SecuritySettings + from ._models import ServiceSpecification + from ._models import Share + from ._models import ShareAccessRight + from ._models import Sku + from ._models import SkuCapability + from ._models import SkuCost + from ._models import SkuInformation + from ._models import SkuInformationList + from ._models import SkuLocationInfo + from ._models import StorageAccount + from ._models import StorageAccountCredential + from ._models import SubscriptionRegisteredFeatures + from ._models import SymmetricKey + from ._models import SystemData + from ._models import TrackingInfo + from ._models import Trigger + from ._models import UpdateDownloadProgress + from ._models import UpdateInstallProgress + from ._models import UpdateSummary + from ._models import UploadCertificateRequest + from ._models import UploadCertificateResponse + from ._models import User + from ._models import UserAccessRight +from ._paged_models import AddonPaged +from ._paged_models import AlertPaged +from ._paged_models import BandwidthSchedulePaged +from ._paged_models import ContainerPaged +from ._paged_models import DataBoxEdgeDevicePaged +from ._paged_models import DataBoxEdgeSkuPaged +from ._paged_models import MonitoringMetricConfigurationPaged +from ._paged_models import NodePaged +from ._paged_models import OperationPaged +from ._paged_models import OrderPaged +from ._paged_models import RolePaged +from ._paged_models import SharePaged +from ._paged_models import StorageAccountCredentialPaged +from ._paged_models import StorageAccountPaged +from ._paged_models import TriggerPaged +from ._paged_models import UserPaged +from ._data_box_edge_management_client_enums import ( + CreatedByType, + AlertSeverity, + PlatformType, + HostPlatformType, + AddonState, + EncryptionAlgorithm, + AzureContainerDataFormat, + DayOfWeek, + ClientPermissionType, + RoleStatus, + SubscriptionState, + ContainerStatus, + SkuName, + SkuTier, + MsiIdentityType, + DataBoxEdgeDeviceKind, + DataBoxEdgeDeviceStatus, + DeviceType, + RoleTypes, + ResourceMoveStatus, + KeyVaultSyncStatus, + SkuSignupOption, + SkuVersion, + SkuAvailability, + ShipmentType, + MountType, + JobStatus, + JobType, + UpdateOperationStage, + DownloadPhase, + KubernetesNodeType, + KubernetesState, + PosixComplianceStatus, + MetricUnit, + MetricAggregationType, + MetricCategory, + TimeGrain, + NetworkGroup, + NetworkAdapterStatus, + NetworkAdapterRDMAStatus, + NetworkAdapterDHCPStatus, + NodeStatus, + OrderState, + AuthenticationType, + ShareStatus, + MonitoringStatus, + ShareAccessProtocol, + ShareAccessType, + DataPolicy, + StorageAccountStatus, + SSLStatus, + AccountType, + InstallRebootBehavior, + UpdateOperation, + UserType, +) + +__all__ = [ + 'Addon', + 'Address', + 'Alert', + 'AlertErrorDetails', + 'ArcAddon', + 'ARMBaseModel', + 'AsymmetricEncryptedSecret', + 'Authentication', + 'AzureContainerInfo', + 'BandwidthSchedule', + 'ClientAccessRight', + 'CloudEdgeManagementRole', + 'CniConfig', + 'ComputeResource', + 'ContactDetails', + 'Container', + 'DataBoxEdgeDevice', + 'DataBoxEdgeDeviceExtendedInfo', + 'DataBoxEdgeDeviceExtendedInfoPatch', + 'DataBoxEdgeDevicePatch', + 'DataBoxEdgeMoveRequest', + 'DataBoxEdgeSku', + 'DCAccessCode', + 'DeviceSecrets', + 'EdgeProfile', + 'EdgeProfilePatch', + 'EdgeProfileSubscription', + 'EdgeProfileSubscriptionPatch', + 'EtcdInfo', + 'FileEventTrigger', + 'FileSourceInfo', + 'GenerateCertResponse', + 'ImageRepositoryCredential', + 'IoTAddon', + 'IoTDeviceInfo', + 'IoTEdgeAgentInfo', + 'IoTRole', + 'Ipv4Config', + 'Ipv6Config', + 'Job', + 'JobErrorDetails', + 'JobErrorItem', + 'KubernetesClusterInfo', + 'KubernetesIPConfiguration', + 'KubernetesRole', + 'KubernetesRoleCompute', + 'KubernetesRoleNetwork', + 'KubernetesRoleResources', + 'KubernetesRoleStorage', + 'KubernetesRoleStorageClassInfo', + 'LoadBalancerConfig', + 'MECRole', + 'MetricConfiguration', + 'MetricCounter', + 'MetricCounterSet', + 'MetricDimension', + 'MetricDimensionV1', + 'MetricSpecificationV1', + 'MonitoringMetricConfiguration', + 'MountPointMap', + 'NetworkAdapter', + 'NetworkAdapterPosition', + 'NetworkSettings', + 'Node', + 'NodeInfo', + 'Operation', + 'OperationDisplay', + 'Order', + 'OrderStatus', + 'PeriodicTimerEventTrigger', + 'PeriodicTimerSourceInfo', + 'RefreshDetails', + 'ResourceIdentity', + 'ResourceMoveDetails', + 'ResourceTypeSku', + 'Role', + 'RoleSinkInfo', + 'Secret', + 'SecuritySettings', + 'ServiceSpecification', + 'Share', + 'ShareAccessRight', + 'Sku', + 'SkuCapability', + 'SkuCost', + 'SkuInformation', + 'SkuInformationList', + 'SkuLocationInfo', + 'StorageAccount', + 'StorageAccountCredential', + 'SubscriptionRegisteredFeatures', + 'SymmetricKey', + 'SystemData', + 'TrackingInfo', + 'Trigger', + 'UpdateDownloadProgress', + 'UpdateInstallProgress', + 'UpdateSummary', + 'UploadCertificateRequest', + 'UploadCertificateResponse', + 'User', + 'UserAccessRight', + 'OperationPaged', + 'DataBoxEdgeSkuPaged', + 'DataBoxEdgeDevicePaged', + 'AlertPaged', + 'BandwidthSchedulePaged', + 'NodePaged', + 'OrderPaged', + 'RolePaged', + 'AddonPaged', + 'MonitoringMetricConfigurationPaged', + 'SharePaged', + 'StorageAccountCredentialPaged', + 'StorageAccountPaged', + 'ContainerPaged', + 'TriggerPaged', + 'UserPaged', + 'CreatedByType', + 'AlertSeverity', + 'PlatformType', + 'HostPlatformType', + 'AddonState', + 'EncryptionAlgorithm', + 'AzureContainerDataFormat', + 'DayOfWeek', + 'ClientPermissionType', + 'RoleStatus', + 'SubscriptionState', + 'ContainerStatus', + 'SkuName', + 'SkuTier', + 'MsiIdentityType', + 'DataBoxEdgeDeviceKind', + 'DataBoxEdgeDeviceStatus', + 'DeviceType', + 'RoleTypes', + 'ResourceMoveStatus', + 'KeyVaultSyncStatus', + 'SkuSignupOption', + 'SkuVersion', + 'SkuAvailability', + 'ShipmentType', + 'MountType', + 'JobStatus', + 'JobType', + 'UpdateOperationStage', + 'DownloadPhase', + 'KubernetesNodeType', + 'KubernetesState', + 'PosixComplianceStatus', + 'MetricUnit', + 'MetricAggregationType', + 'MetricCategory', + 'TimeGrain', + 'NetworkGroup', + 'NetworkAdapterStatus', + 'NetworkAdapterRDMAStatus', + 'NetworkAdapterDHCPStatus', + 'NodeStatus', + 'OrderState', + 'AuthenticationType', + 'ShareStatus', + 'MonitoringStatus', + 'ShareAccessProtocol', + 'ShareAccessType', + 'DataPolicy', + 'StorageAccountStatus', + 'SSLStatus', + 'AccountType', + 'InstallRebootBehavior', + 'UpdateOperation', + 'UserType', +] diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_data_box_edge_management_client_enums.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_data_box_edge_management_client_enums.py new file mode 100644 index 000000000000..a6ebe656b407 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_data_box_edge_management_client_enums.py @@ -0,0 +1,482 @@ +# 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 CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + +class AlertSeverity(str, Enum): + + informational = "Informational" + warning = "Warning" + critical = "Critical" + + +class PlatformType(str, Enum): + + windows = "Windows" + linux = "Linux" + + +class HostPlatformType(str, Enum): + + kubernetes_cluster = "KubernetesCluster" + linux_vm = "LinuxVM" + + +class AddonState(str, Enum): + + invalid = "Invalid" + creating = "Creating" + created = "Created" + updating = "Updating" + reconfiguring = "Reconfiguring" + failed = "Failed" + deleting = "Deleting" + + +class EncryptionAlgorithm(str, Enum): + + none = "None" + aes256 = "AES256" + rsaes_pkcs1_v_1_5 = "RSAES_PKCS1_v_1_5" + + +class AzureContainerDataFormat(str, Enum): + + block_blob = "BlockBlob" + page_blob = "PageBlob" + azure_file = "AzureFile" + + +class DayOfWeek(str, Enum): + + sunday = "Sunday" + monday = "Monday" + tuesday = "Tuesday" + wednesday = "Wednesday" + thursday = "Thursday" + friday = "Friday" + saturday = "Saturday" + + +class ClientPermissionType(str, Enum): + + no_access = "NoAccess" + read_only = "ReadOnly" + read_write = "ReadWrite" + + +class RoleStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class SubscriptionState(str, Enum): + + registered = "Registered" + warned = "Warned" + suspended = "Suspended" + deleted = "Deleted" + unregistered = "Unregistered" + + +class ContainerStatus(str, Enum): + + ok = "OK" + offline = "Offline" + unknown = "Unknown" + updating = "Updating" + needs_attention = "NeedsAttention" + + +class SkuName(str, Enum): + + gateway = "Gateway" + edge = "Edge" + tea_1_node = "TEA_1Node" + tea_1_node_ups = "TEA_1Node_UPS" + tea_1_node_heater = "TEA_1Node_Heater" + tea_1_node_ups_heater = "TEA_1Node_UPS_Heater" + tea_4_node_heater = "TEA_4Node_Heater" + tea_4_node_ups_heater = "TEA_4Node_UPS_Heater" + tma = "TMA" + tdc = "TDC" + tca_small = "TCA_Small" + gpu = "GPU" + tca_large = "TCA_Large" + edge_p_base = "EdgeP_Base" + edge_p_high = "EdgeP_High" + edge_pr_base = "EdgePR_Base" + edge_pr_base_ups = "EdgePR_Base_UPS" + edge_mr_mini = "EdgeMR_Mini" + rca_small = "RCA_Small" + rca_large = "RCA_Large" + rdc = "RDC" + + +class SkuTier(str, Enum): + + standard = "Standard" + + +class MsiIdentityType(str, Enum): + + none = "None" + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + + +class DataBoxEdgeDeviceKind(str, Enum): + + azure_data_box_gateway = "AzureDataBoxGateway" + azure_stack_edge = "AzureStackEdge" + azure_stack_hub = "AzureStackHub" + azure_modular_data_centre = "AzureModularDataCentre" + + +class DataBoxEdgeDeviceStatus(str, Enum): + + ready_to_setup = "ReadyToSetup" + online = "Online" + offline = "Offline" + needs_attention = "NeedsAttention" + disconnected = "Disconnected" + partially_disconnected = "PartiallyDisconnected" + maintenance = "Maintenance" + + +class DeviceType(str, Enum): + + data_box_edge_device = "DataBoxEdgeDevice" + + +class RoleTypes(str, Enum): + + iot = "IOT" + asa = "ASA" + functions = "Functions" + cognitive = "Cognitive" + mec = "MEC" + cloud_edge_management = "CloudEdgeManagement" + kubernetes = "Kubernetes" + + +class ResourceMoveStatus(str, Enum): + + none = "None" + resource_move_in_progress = "ResourceMoveInProgress" + resource_move_failed = "ResourceMoveFailed" + + +class KeyVaultSyncStatus(str, Enum): + + key_vault_synced = "KeyVaultSynced" + key_vault_sync_failed = "KeyVaultSyncFailed" + key_vault_not_configured = "KeyVaultNotConfigured" + key_vault_sync_pending = "KeyVaultSyncPending" + key_vault_syncing = "KeyVaultSyncing" + + +class SkuSignupOption(str, Enum): + + none = "None" + available = "Available" + + +class SkuVersion(str, Enum): + + stable = "Stable" + preview = "Preview" + + +class SkuAvailability(str, Enum): + + available = "Available" + unavailable = "Unavailable" + + +class ShipmentType(str, Enum): + + not_applicable = "NotApplicable" + shipped_to_customer = "ShippedToCustomer" + self_pickup = "SelfPickup" + + +class MountType(str, Enum): + + volume = "Volume" + host_path = "HostPath" + + +class JobStatus(str, Enum): + + invalid = "Invalid" + running = "Running" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + paused = "Paused" + scheduled = "Scheduled" + + +class JobType(str, Enum): + + invalid = "Invalid" + scan_for_updates = "ScanForUpdates" + download_updates = "DownloadUpdates" + install_updates = "InstallUpdates" + refresh_share = "RefreshShare" + refresh_container = "RefreshContainer" + backup = "Backup" + restore = "Restore" + trigger_support_package = "TriggerSupportPackage" + + +class UpdateOperationStage(str, Enum): + + unknown = "Unknown" + initial = "Initial" + scan_started = "ScanStarted" + scan_complete = "ScanComplete" + scan_failed = "ScanFailed" + download_started = "DownloadStarted" + download_complete = "DownloadComplete" + download_failed = "DownloadFailed" + install_started = "InstallStarted" + install_complete = "InstallComplete" + install_failed = "InstallFailed" + reboot_initiated = "RebootInitiated" + success = "Success" + failure = "Failure" + rescan_started = "RescanStarted" + rescan_complete = "RescanComplete" + rescan_failed = "RescanFailed" + + +class DownloadPhase(str, Enum): + + unknown = "Unknown" + initializing = "Initializing" + downloading = "Downloading" + verifying = "Verifying" + + +class KubernetesNodeType(str, Enum): + + invalid = "Invalid" + master = "Master" + worker = "Worker" + + +class KubernetesState(str, Enum): + + invalid = "Invalid" + creating = "Creating" + created = "Created" + updating = "Updating" + reconfiguring = "Reconfiguring" + failed = "Failed" + deleting = "Deleting" + + +class PosixComplianceStatus(str, Enum): + + invalid = "Invalid" + enabled = "Enabled" + disabled = "Disabled" + + +class MetricUnit(str, Enum): + + not_specified = "NotSpecified" + percent = "Percent" + count = "Count" + seconds = "Seconds" + milliseconds = "Milliseconds" + bytes = "Bytes" + bytes_per_second = "BytesPerSecond" + count_per_second = "CountPerSecond" + + +class MetricAggregationType(str, Enum): + + not_specified = "NotSpecified" + none = "None" + average = "Average" + minimum = "Minimum" + maximum = "Maximum" + total = "Total" + count = "Count" + + +class MetricCategory(str, Enum): + + capacity = "Capacity" + transaction = "Transaction" + + +class TimeGrain(str, Enum): + + pt1_m = "PT1M" + pt5_m = "PT5M" + pt15_m = "PT15M" + pt30_m = "PT30M" + pt1_h = "PT1H" + pt6_h = "PT6H" + pt12_h = "PT12H" + pt1_d = "PT1D" + + +class NetworkGroup(str, Enum): + + none = "None" + non_rdma = "NonRDMA" + rdma = "RDMA" + + +class NetworkAdapterStatus(str, Enum): + + inactive = "Inactive" + active = "Active" + + +class NetworkAdapterRDMAStatus(str, Enum): + + incapable = "Incapable" + capable = "Capable" + + +class NetworkAdapterDHCPStatus(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class NodeStatus(str, Enum): + + unknown = "Unknown" + up = "Up" + down = "Down" + rebooting = "Rebooting" + shutting_down = "ShuttingDown" + + +class OrderState(str, Enum): + + untracked = "Untracked" + awaiting_fulfilment = "AwaitingFulfilment" + awaiting_preparation = "AwaitingPreparation" + awaiting_shipment = "AwaitingShipment" + shipped = "Shipped" + arriving = "Arriving" + delivered = "Delivered" + replacement_requested = "ReplacementRequested" + lost_device = "LostDevice" + declined = "Declined" + return_initiated = "ReturnInitiated" + awaiting_return_shipment = "AwaitingReturnShipment" + shipped_back = "ShippedBack" + collected_at_microsoft = "CollectedAtMicrosoft" + awaiting_pickup = "AwaitingPickup" + pickup_completed = "PickupCompleted" + awaiting_drop = "AwaitingDrop" + + +class AuthenticationType(str, Enum): + + invalid = "Invalid" + azure_active_directory = "AzureActiveDirectory" + + +class ShareStatus(str, Enum): + + offline = "Offline" + unknown = "Unknown" + ok = "OK" + updating = "Updating" + needs_attention = "NeedsAttention" + + +class MonitoringStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ShareAccessProtocol(str, Enum): + + smb = "SMB" + nfs = "NFS" + + +class ShareAccessType(str, Enum): + + change = "Change" + read = "Read" + custom = "Custom" + + +class DataPolicy(str, Enum): + + cloud = "Cloud" + local = "Local" + + +class StorageAccountStatus(str, Enum): + + ok = "OK" + offline = "Offline" + unknown = "Unknown" + updating = "Updating" + needs_attention = "NeedsAttention" + + +class SSLStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class AccountType(str, Enum): + + general_purpose_storage = "GeneralPurposeStorage" + blob_storage = "BlobStorage" + + +class InstallRebootBehavior(str, Enum): + + never_reboots = "NeverReboots" + requires_reboot = "RequiresReboot" + request_reboot = "RequestReboot" + + +class UpdateOperation(str, Enum): + + none = "None" + scan = "Scan" + download = "Download" + install = "Install" + + +class UserType(str, Enum): + + share = "Share" + local_management = "LocalManagement" + arm = "ARM" diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_models.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_models.py new file mode 100644 index 000000000000..f1962f01ab58 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_models.py @@ -0,0 +1,4556 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ARMBaseModel(Model): + """Represents the base class for all object models. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ARMBaseModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Addon(ARMBaseModel): + """Role Addon. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ArcAddon, IoTAddon + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ArcForKubernetes': 'ArcAddon', 'IotEdge': 'IoTAddon'} + } + + def __init__(self, **kwargs): + super(Addon, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.kind = None + self.kind = 'Addon' + + +class Address(Model): + """The shipping address of the customer. + + All required parameters must be populated in order to send to Azure. + + :param address_line1: The address line1. + :type address_line1: str + :param address_line2: The address line2. + :type address_line2: str + :param address_line3: The address line3. + :type address_line3: str + :param postal_code: The postal code. + :type postal_code: str + :param city: The city name. + :type city: str + :param state: The state name. + :type state: str + :param country: Required. The country name. + :type country: str + """ + + _validation = { + 'country': {'required': True}, + } + + _attribute_map = { + 'address_line1': {'key': 'addressLine1', 'type': 'str'}, + 'address_line2': {'key': 'addressLine2', 'type': 'str'}, + 'address_line3': {'key': 'addressLine3', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Address, self).__init__(**kwargs) + self.address_line1 = kwargs.get('address_line1', None) + self.address_line2 = kwargs.get('address_line2', None) + self.address_line3 = kwargs.get('address_line3', None) + self.postal_code = kwargs.get('postal_code', None) + self.city = kwargs.get('city', None) + self.state = kwargs.get('state', None) + self.country = kwargs.get('country', None) + + +class Alert(ARMBaseModel): + """Alert on the data box edge/gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Alert generated in the resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar title: Alert title. + :vartype title: str + :ivar alert_type: Alert type. + :vartype alert_type: str + :ivar appeared_at_date_time: UTC time when the alert appeared. + :vartype appeared_at_date_time: datetime + :ivar recommendation: Alert recommendation. + :vartype recommendation: str + :ivar severity: Severity of the alert. Possible values include: + 'Informational', 'Warning', 'Critical' + :vartype severity: str or ~azure.mgmt.databoxedge.models.AlertSeverity + :ivar error_details: Error details of the alert. + :vartype error_details: ~azure.mgmt.databoxedge.models.AlertErrorDetails + :ivar detailed_information: Alert details. + :vartype detailed_information: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'appeared_at_date_time': {'readonly': True}, + 'recommendation': {'readonly': True}, + 'severity': {'readonly': True}, + 'error_details': {'readonly': True}, + 'detailed_information': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'appeared_at_date_time': {'key': 'properties.appearedAtDateTime', 'type': 'iso-8601'}, + 'recommendation': {'key': 'properties.recommendation', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'error_details': {'key': 'properties.errorDetails', 'type': 'AlertErrorDetails'}, + 'detailed_information': {'key': 'properties.detailedInformation', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.title = None + self.alert_type = None + self.appeared_at_date_time = None + self.recommendation = None + self.severity = None + self.error_details = None + self.detailed_information = None + + +class AlertErrorDetails(Model): + """Error details for the alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_code: Error code. + :vartype error_code: str + :ivar error_message: Error Message. + :vartype error_message: str + :ivar occurrences: Number of occurrences. + :vartype occurrences: int + """ + + _validation = { + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'occurrences': {'readonly': True}, + } + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'occurrences': {'key': 'occurrences', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertErrorDetails, self).__init__(**kwargs) + self.error_code = None + self.error_message = None + self.occurrences = None + + +class ArcAddon(Addon): + """Arc Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param subscription_id: Required. Arc resource subscription Id + :type subscription_id: str + :param resource_group_name: Required. Arc resource group name + :type resource_group_name: str + :param resource_name: Required. Arc resource Name + :type resource_name: str + :param resource_location: Required. Arc resource location + :type resource_location: str + :ivar version: Arc resource version + :vartype version: str + :ivar host_platform: Host OS supported by the Arc addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'subscription_id': {'required': True}, + 'resource_group_name': {'required': True}, + 'resource_name': {'required': True}, + 'resource_location': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'properties.resourceGroupName', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArcAddon, self).__init__(**kwargs) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.resource_name = kwargs.get('resource_name', None) + self.resource_location = kwargs.get('resource_location', None) + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'ArcForKubernetes' + + +class AsymmetricEncryptedSecret(Model): + """Represent the secrets intended for encryption with asymmetric key pair. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. The value of the secret. + :type value: str + :param encryption_cert_thumbprint: Thumbprint certificate used to encrypt + \\"Value\\". If the value is unencrypted, it will be null. + :type encryption_cert_thumbprint: str + :param encryption_algorithm: Required. The algorithm used to encrypt + "Value". Possible values include: 'None', 'AES256', 'RSAES_PKCS1_v_1_5' + :type encryption_algorithm: str or + ~azure.mgmt.databoxedge.models.EncryptionAlgorithm + """ + + _validation = { + 'value': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'encryption_cert_thumbprint': {'key': 'encryptionCertThumbprint', 'type': 'str'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AsymmetricEncryptedSecret, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.encryption_cert_thumbprint = kwargs.get('encryption_cert_thumbprint', None) + self.encryption_algorithm = kwargs.get('encryption_algorithm', None) + + +class Authentication(Model): + """Authentication mechanism for IoT devices. + + :param symmetric_key: Symmetric key for authentication. + :type symmetric_key: ~azure.mgmt.databoxedge.models.SymmetricKey + """ + + _attribute_map = { + 'symmetric_key': {'key': 'symmetricKey', 'type': 'SymmetricKey'}, + } + + def __init__(self, **kwargs): + super(Authentication, self).__init__(**kwargs) + self.symmetric_key = kwargs.get('symmetric_key', None) + + +class AzureContainerInfo(Model): + """Azure container mapping of the endpoint. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_credential_id: Required. ID of the storage account + credential used to access storage. + :type storage_account_credential_id: str + :param container_name: Required. Container name (Based on the data format + specified, this represents the name of Azure Files/Page blob/Block blob). + :type container_name: str + :param data_format: Required. Storage format used for the file represented + by the share. Possible values include: 'BlockBlob', 'PageBlob', + 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + """ + + _validation = { + 'storage_account_credential_id': {'required': True}, + 'container_name': {'required': True}, + 'data_format': {'required': True}, + } + + _attribute_map = { + 'storage_account_credential_id': {'key': 'storageAccountCredentialId', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'data_format': {'key': 'dataFormat', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureContainerInfo, self).__init__(**kwargs) + self.storage_account_credential_id = kwargs.get('storage_account_credential_id', None) + self.container_name = kwargs.get('container_name', None) + self.data_format = kwargs.get('data_format', None) + + +class BandwidthSchedule(ARMBaseModel): + """The bandwidth schedule details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Bandwidth object related to ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param start: Required. The start time of the schedule in UTC. + :type start: str + :param stop: Required. The stop time of the schedule in UTC. + :type stop: str + :param rate_in_mbps: Required. The bandwidth rate in Mbps. + :type rate_in_mbps: int + :param days: Required. The days of the week when this schedule is + applicable. + :type days: list[str or ~azure.mgmt.databoxedge.models.DayOfWeek] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start': {'required': True}, + 'stop': {'required': True}, + 'rate_in_mbps': {'required': True}, + 'days': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'start': {'key': 'properties.start', 'type': 'str'}, + 'stop': {'key': 'properties.stop', 'type': 'str'}, + 'rate_in_mbps': {'key': 'properties.rateInMbps', 'type': 'int'}, + 'days': {'key': 'properties.days', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(BandwidthSchedule, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.start = kwargs.get('start', None) + self.stop = kwargs.get('stop', None) + self.rate_in_mbps = kwargs.get('rate_in_mbps', None) + self.days = kwargs.get('days', None) + + +class ClientAccessRight(Model): + """The mapping between a particular client IP and the type of access client + has on the NFS share. + + All required parameters must be populated in order to send to Azure. + + :param client: Required. IP of the client. + :type client: str + :param access_permission: Required. Type of access to be allowed for the + client. Possible values include: 'NoAccess', 'ReadOnly', 'ReadWrite' + :type access_permission: str or + ~azure.mgmt.databoxedge.models.ClientPermissionType + """ + + _validation = { + 'client': {'required': True}, + 'access_permission': {'required': True}, + } + + _attribute_map = { + 'client': {'key': 'client', 'type': 'str'}, + 'access_permission': {'key': 'accessPermission', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClientAccessRight, self).__init__(**kwargs) + self.client = kwargs.get('client', None) + self.access_permission = kwargs.get('access_permission', None) + + +class Role(ARMBaseModel): + """Compute role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CloudEdgeManagementRole, IoTRole, KubernetesRole, MECRole + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CloudEdgeManagement': 'CloudEdgeManagementRole', 'IOT': 'IoTRole', 'Kubernetes': 'KubernetesRole', 'MEC': 'MECRole'} + } + + def __init__(self, **kwargs): + super(Role, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.kind = None + self.kind = 'Role' + + +class CloudEdgeManagementRole(Role): + """CloudEdgeManagementRole role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :ivar local_management_status: Local Edge Management Status. Possible + values include: 'Enabled', 'Disabled' + :vartype local_management_status: str or + ~azure.mgmt.databoxedge.models.RoleStatus + :ivar edge_profile: Edge Profile of the resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'local_management_status': {'readonly': True}, + 'edge_profile': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'local_management_status': {'key': 'properties.localManagementStatus', 'type': 'str'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CloudEdgeManagementRole, self).__init__(**kwargs) + self.local_management_status = None + self.edge_profile = None + self.role_status = kwargs.get('role_status', None) + self.kind = 'CloudEdgeManagement' + + +class CloudError(Model): + """An error response from the service. + + :param error: The error details. + :type error: ~azure.mgmt.databoxedge.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.databoxedge.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class CniConfig(Model): + """Cni configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Cni type + :vartype type: str + :ivar version: Cni version + :vartype version: str + :ivar pod_subnet: Pod Subnet + :vartype pod_subnet: str + :ivar service_subnet: Service subnet + :vartype service_subnet: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + 'pod_subnet': {'readonly': True}, + 'service_subnet': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'pod_subnet': {'key': 'podSubnet', 'type': 'str'}, + 'service_subnet': {'key': 'serviceSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CniConfig, self).__init__(**kwargs) + self.type = None + self.version = None + self.pod_subnet = None + self.service_subnet = None + + +class ComputeResource(Model): + """Compute infrastructure Resource. + + All required parameters must be populated in order to send to Azure. + + :param processor_count: Required. Processor count + :type processor_count: int + :param memory_in_gb: Required. Memory in GB + :type memory_in_gb: long + """ + + _validation = { + 'processor_count': {'required': True}, + 'memory_in_gb': {'required': True}, + } + + _attribute_map = { + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(ComputeResource, self).__init__(**kwargs) + self.processor_count = kwargs.get('processor_count', None) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + + +class ContactDetails(Model): + """Contains all the contact details of the customer. + + All required parameters must be populated in order to send to Azure. + + :param contact_person: Required. The contact person name. + :type contact_person: str + :param company_name: Required. The name of the company. + :type company_name: str + :param phone: Required. The phone number. + :type phone: str + :param email_list: Required. The email list. + :type email_list: list[str] + """ + + _validation = { + 'contact_person': {'required': True}, + 'company_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_person': {'key': 'contactPerson', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ContactDetails, self).__init__(**kwargs) + self.contact_person = kwargs.get('contact_person', None) + self.company_name = kwargs.get('company_name', None) + self.phone = kwargs.get('phone', None) + self.email_list = kwargs.get('email_list', None) + + +class Container(ARMBaseModel): + """Represents a container on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Container in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar container_status: Current status of the container. Possible values + include: 'OK', 'Offline', 'Unknown', 'Updating', 'NeedsAttention' + :vartype container_status: str or + ~azure.mgmt.databoxedge.models.ContainerStatus + :param data_format: Required. DataFormat for Container. Possible values + include: 'BlockBlob', 'PageBlob', 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + :ivar refresh_details: Details of the refresh job on this container. + :vartype refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar created_date_time: The UTC time when container got created. + :vartype created_date_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'container_status': {'readonly': True}, + 'data_format': {'required': True}, + 'refresh_details': {'readonly': True}, + 'created_date_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'container_status': {'key': 'properties.containerStatus', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(Container, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.container_status = None + self.data_format = kwargs.get('data_format', None) + self.refresh_details = None + self.created_date_time = None + + +class DataBoxEdgeDevice(ARMBaseModel): + """The Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param location: Required. The location of the device. This is a supported + and registered Azure geographical region (for example, West US, East US, + or Southeast Asia). The geographical region of a device cannot be changed + once it is created, but if an identical geographical region is specified + on update, the request will succeed. + :type location: str + :param tags: The list of tags that describe the device. These tags can be + used to view and group this device (across resource groups). + :type tags: dict[str, str] + :param sku: The SKU type. + :type sku: ~azure.mgmt.databoxedge.models.Sku + :param etag: The etag for the devices. + :type etag: str + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :ivar kind: The etag for the devices. Possible values include: + 'AzureDataBoxGateway', 'AzureStackEdge', 'AzureStackHub', + 'AzureModularDataCentre' + :vartype kind: str or ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceKind + :param system_data: DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param data_box_edge_device_status: The status of the Data Box + Edge/Gateway device. Possible values include: 'ReadyToSetup', 'Online', + 'Offline', 'NeedsAttention', 'Disconnected', 'PartiallyDisconnected', + 'Maintenance' + :type data_box_edge_device_status: str or + ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceStatus + :ivar serial_number: The Serial Number of Data Box Edge/Gateway device. + :vartype serial_number: str + :ivar description: The Description of the Data Box Edge/Gateway device. + :vartype description: str + :ivar model_description: The description of the Data Box Edge/Gateway + device model. + :vartype model_description: str + :ivar device_type: The type of the Data Box Edge/Gateway device. Possible + values include: 'DataBoxEdgeDevice' + :vartype device_type: str or ~azure.mgmt.databoxedge.models.DeviceType + :ivar friendly_name: The Data Box Edge/Gateway device name. + :vartype friendly_name: str + :ivar culture: The Data Box Edge/Gateway device culture. + :vartype culture: str + :ivar device_model: The Data Box Edge/Gateway device model. + :vartype device_model: str + :ivar device_software_version: The Data Box Edge/Gateway device software + version. + :vartype device_software_version: str + :ivar device_local_capacity: The Data Box Edge/Gateway device local + capacity in MB. + :vartype device_local_capacity: long + :ivar time_zone: The Data Box Edge/Gateway device timezone. + :vartype time_zone: str + :ivar device_hcs_version: The device software version number of the device + (eg: 1.2.18105.6). + :vartype device_hcs_version: str + :ivar configured_role_types: Type of compute roles configured. + :vartype configured_role_types: list[str or + ~azure.mgmt.databoxedge.models.RoleTypes] + :ivar node_count: The number of nodes in the cluster. + :vartype node_count: int + :ivar resource_move_details: The details of the move operation on this + resource. + :vartype resource_move_details: + ~azure.mgmt.databoxedge.models.ResourceMoveDetails + :ivar edge_profile: The details of Edge Profile for this resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'description': {'readonly': True}, + 'model_description': {'readonly': True}, + 'device_type': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'culture': {'readonly': True}, + 'device_model': {'readonly': True}, + 'device_software_version': {'readonly': True}, + 'device_local_capacity': {'readonly': True}, + 'time_zone': {'readonly': True}, + 'device_hcs_version': {'readonly': True}, + 'configured_role_types': {'readonly': True}, + 'node_count': {'readonly': True}, + 'resource_move_details': {'readonly': True}, + 'edge_profile': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'data_box_edge_device_status': {'key': 'properties.dataBoxEdgeDeviceStatus', 'type': 'str'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'model_description': {'key': 'properties.modelDescription', 'type': 'str'}, + 'device_type': {'key': 'properties.deviceType', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'culture': {'key': 'properties.culture', 'type': 'str'}, + 'device_model': {'key': 'properties.deviceModel', 'type': 'str'}, + 'device_software_version': {'key': 'properties.deviceSoftwareVersion', 'type': 'str'}, + 'device_local_capacity': {'key': 'properties.deviceLocalCapacity', 'type': 'long'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'device_hcs_version': {'key': 'properties.deviceHcsVersion', 'type': 'str'}, + 'configured_role_types': {'key': 'properties.configuredRoleTypes', 'type': '[str]'}, + 'node_count': {'key': 'properties.nodeCount', 'type': 'int'}, + 'resource_move_details': {'key': 'properties.resourceMoveDetails', 'type': 'ResourceMoveDetails'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDevice, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.etag = kwargs.get('etag', None) + self.identity = kwargs.get('identity', None) + self.kind = None + self.system_data = kwargs.get('system_data', None) + self.data_box_edge_device_status = kwargs.get('data_box_edge_device_status', None) + self.serial_number = None + self.description = None + self.model_description = None + self.device_type = None + self.friendly_name = None + self.culture = None + self.device_model = None + self.device_software_version = None + self.device_local_capacity = None + self.time_zone = None + self.device_hcs_version = None + self.configured_role_types = None + self.node_count = None + self.resource_move_details = None + self.edge_profile = None + + +class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel): + """The extended Info of the Data Box Edge/Gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param encryption_key_thumbprint: The digital signature of encrypted + certificate. + :type encryption_key_thumbprint: str + :param encryption_key: The public part of the encryption certificate. + Client uses this to encrypt any secret. + :type encryption_key: str + :ivar resource_key: The Resource ID of the Resource. + :vartype resource_key: str + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + :param key_vault_sync_status: Key vault sync status. Possible values + include: 'KeyVaultSynced', 'KeyVaultSyncFailed', 'KeyVaultNotConfigured', + 'KeyVaultSyncPending', 'KeyVaultSyncing' + :type key_vault_sync_status: str or + ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus + :ivar device_secrets: Device secrets, will be returned only with + ODataFilter $expand=deviceSecrets + :vartype device_secrets: ~azure.mgmt.databoxedge.models.DeviceSecrets + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_key': {'readonly': True}, + 'device_secrets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'}, + 'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'}, + 'resource_key': {'key': 'properties.resourceKey', 'type': 'str'}, + 'client_secret_store_id': {'key': 'properties.clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'properties.clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'properties.channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'properties.channelIntegrityKeyVersion', 'type': 'str'}, + 'key_vault_sync_status': {'key': 'properties.keyVaultSyncStatus', 'type': 'str'}, + 'device_secrets': {'key': 'properties.deviceSecrets', 'type': 'DeviceSecrets'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDeviceExtendedInfo, self).__init__(**kwargs) + self.encryption_key_thumbprint = kwargs.get('encryption_key_thumbprint', None) + self.encryption_key = kwargs.get('encryption_key', None) + self.resource_key = None + self.client_secret_store_id = kwargs.get('client_secret_store_id', None) + self.client_secret_store_url = kwargs.get('client_secret_store_url', None) + self.channel_integrity_key_name = kwargs.get('channel_integrity_key_name', None) + self.channel_integrity_key_version = kwargs.get('channel_integrity_key_version', None) + self.key_vault_sync_status = kwargs.get('key_vault_sync_status', None) + self.device_secrets = None + + +class DataBoxEdgeDeviceExtendedInfoPatch(Model): + """The Data Box Edge/Gateway device extended info patch. + + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name for Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + :param sync_status: For changing or to initiate the resync to key-vault + set the status to KeyVaultSyncPending, rest of the status will not be + applicable. Possible values include: 'KeyVaultSynced', + 'KeyVaultSyncFailed', 'KeyVaultNotConfigured', 'KeyVaultSyncPending', + 'KeyVaultSyncing' + :type sync_status: str or + ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus + """ + + _attribute_map = { + 'client_secret_store_id': {'key': 'clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'channelIntegrityKeyVersion', 'type': 'str'}, + 'sync_status': {'key': 'syncStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDeviceExtendedInfoPatch, self).__init__(**kwargs) + self.client_secret_store_id = kwargs.get('client_secret_store_id', None) + self.client_secret_store_url = kwargs.get('client_secret_store_url', None) + self.channel_integrity_key_name = kwargs.get('channel_integrity_key_name', None) + self.channel_integrity_key_version = kwargs.get('channel_integrity_key_version', None) + self.sync_status = kwargs.get('sync_status', None) + + +class DataBoxEdgeDevicePatch(Model): + """The Data Box Edge/Gateway device patch. + + :param tags: The tags attached to the Data Box Edge/Gateway resource. + :type tags: dict[str, str] + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :param edge_profile: Edge Profile property of the Data Box Edge/Gateway + device + :type edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfilePatch + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfilePatch'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDevicePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.edge_profile = kwargs.get('edge_profile', None) + + +class DataBoxEdgeMoveRequest(Model): + """Resource Move details. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_group: Required. Target resource group ARMId + :type target_resource_group: str + :param resources: Required. List of resources to be moved + :type resources: list[str] + """ + + _validation = { + 'target_resource_group': {'required': True}, + 'resources': {'required': True}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeMoveRequest, self).__init__(**kwargs) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.resources = kwargs.get('resources', None) + + +class DataBoxEdgeSku(Model): + """The Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar name: The Sku name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC' + :vartype name: str or ~azure.mgmt.databoxedge.models.SkuName + :ivar kind: The Sku kind. + :vartype kind: str + :ivar tier: The Sku tier. Possible values include: 'Standard' + :vartype tier: str or ~azure.mgmt.databoxedge.models.SkuTier + :ivar size: The Sku kind. + :vartype size: str + :ivar family: The Sku family. + :vartype family: str + :ivar locations: Availability of the Sku for the region. + :vartype locations: list[str] + :ivar api_versions: The API versions in which Sku is available. + :vartype api_versions: list[str] + :ivar location_info: Availability of the Sku for the location/zone/site. + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar signup_option: Sku can be signed up by customer or not. Possible + values include: 'None', 'Available' + :vartype signup_option: str or + ~azure.mgmt.databoxedge.models.SkuSignupOption + :ivar version: Availability of the Sku as preview/stable. Possible values + include: 'Stable', 'Preview' + :vartype version: str or ~azure.mgmt.databoxedge.models.SkuVersion + :ivar availability: Links to the next set of results. Possible values + include: 'Available', 'Unavailable' + :vartype availability: str or + ~azure.mgmt.databoxedge.models.SkuAvailability + :ivar shipment_types: List of Shipment Types supported by this SKU + :vartype shipment_types: list[str or + ~azure.mgmt.databoxedge.models.ShipmentType] + :ivar capabilities: The capability info of the SKU. + :vartype capabilities: list[~azure.mgmt.databoxedge.models.SkuCapability] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'locations': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'location_info': {'readonly': True}, + 'costs': {'readonly': True}, + 'signup_option': {'readonly': True}, + 'version': {'readonly': True}, + 'availability': {'readonly': True}, + 'shipment_types': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'signup_option': {'key': 'signupOption', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'availability': {'key': 'availability', 'type': 'str'}, + 'shipment_types': {'key': 'shipmentTypes', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SkuCapability]'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.kind = None + self.tier = None + self.size = None + self.family = None + self.locations = None + self.api_versions = None + self.location_info = None + self.costs = None + self.signup_option = None + self.version = None + self.availability = None + self.shipment_types = None + self.capabilities = None + + +class DCAccessCode(Model): + """DC Access code in the case of Self Managed Shipping. + + :param auth_code: DCAccess Code for the Self Managed shipment. + :type auth_code: str + """ + + _attribute_map = { + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DCAccessCode, self).__init__(**kwargs) + self.auth_code = kwargs.get('auth_code', None) + + +class DeviceSecrets(Model): + """Device Secrets. + + :param hcs_data_volume_bit_locker_external_key: Keyvault Id of + HcsDataVolumeBitLockerExternalKey + :type hcs_data_volume_bit_locker_external_key: + ~azure.mgmt.databoxedge.models.Secret + :param hcs_internal_volume_bit_locker_external_key: Keyvault Id of + HcsInternalVolumeBitLockerExternalKey + :type hcs_internal_volume_bit_locker_external_key: + ~azure.mgmt.databoxedge.models.Secret + :param system_volume_bit_locker_recovery_key: Keyvault Id of + SystemVolumeBitLockerRecoveryKey + :type system_volume_bit_locker_recovery_key: + ~azure.mgmt.databoxedge.models.Secret + :param sed_encryption_external_key_id: Keyvault Id of + SEDEncryptionExternalKeyId + :type sed_encryption_external_key_id: + ~azure.mgmt.databoxedge.models.Secret + :param sed_encryption_external_key: Keyvault Id of + SEDEncryptionExternalKey + :type sed_encryption_external_key: ~azure.mgmt.databoxedge.models.Secret + :param bmc_default_user_password: Keyvault Id of BMCDefaultUserPassword + :type bmc_default_user_password: ~azure.mgmt.databoxedge.models.Secret + :param rotate_key_for_data_volume_bitlocker: Keyvault Id of + RotateKeyForDataVolumeBitlocker + :type rotate_key_for_data_volume_bitlocker: + ~azure.mgmt.databoxedge.models.Secret + :param rotate_keys_for_sed_drives_serialized: Keyvault Id of + RotateKeysForSedDrivesSerialized + :type rotate_keys_for_sed_drives_serialized: + ~azure.mgmt.databoxedge.models.Secret + """ + + _attribute_map = { + 'hcs_data_volume_bit_locker_external_key': {'key': 'hcsDataVolumeBitLockerExternalKey', 'type': 'Secret'}, + 'hcs_internal_volume_bit_locker_external_key': {'key': 'hcsInternalVolumeBitLockerExternalKey', 'type': 'Secret'}, + 'system_volume_bit_locker_recovery_key': {'key': 'systemVolumeBitLockerRecoveryKey', 'type': 'Secret'}, + 'sed_encryption_external_key_id': {'key': 'sedEncryptionExternalKeyId', 'type': 'Secret'}, + 'sed_encryption_external_key': {'key': 'sedEncryptionExternalKey', 'type': 'Secret'}, + 'bmc_default_user_password': {'key': 'bmcDefaultUserPassword', 'type': 'Secret'}, + 'rotate_key_for_data_volume_bitlocker': {'key': 'rotateKeyForDataVolumeBitlocker', 'type': 'Secret'}, + 'rotate_keys_for_sed_drives_serialized': {'key': 'rotateKeysForSedDrivesSerialized', 'type': 'Secret'}, + } + + def __init__(self, **kwargs): + super(DeviceSecrets, self).__init__(**kwargs) + self.hcs_data_volume_bit_locker_external_key = kwargs.get('hcs_data_volume_bit_locker_external_key', None) + self.hcs_internal_volume_bit_locker_external_key = kwargs.get('hcs_internal_volume_bit_locker_external_key', None) + self.system_volume_bit_locker_recovery_key = kwargs.get('system_volume_bit_locker_recovery_key', None) + self.sed_encryption_external_key_id = kwargs.get('sed_encryption_external_key_id', None) + self.sed_encryption_external_key = kwargs.get('sed_encryption_external_key', None) + self.bmc_default_user_password = kwargs.get('bmc_default_user_password', None) + self.rotate_key_for_data_volume_bitlocker = kwargs.get('rotate_key_for_data_volume_bitlocker', None) + self.rotate_keys_for_sed_drives_serialized = kwargs.get('rotate_keys_for_sed_drives_serialized', None) + + +class EdgeProfile(Model): + """Details about Edge Profile for the resource. + + :param subscription: Edge Profile Subscription + :type subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscription + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscription'}, + } + + def __init__(self, **kwargs): + super(EdgeProfile, self).__init__(**kwargs) + self.subscription = kwargs.get('subscription', None) + + +class EdgeProfilePatch(Model): + """The Data Box Edge/Gateway Edge Profile patch. + + :param subscription: The Data Box Edge/Gateway Edge Profile Subscription + patch + :type subscription: + ~azure.mgmt.databoxedge.models.EdgeProfileSubscriptionPatch + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscriptionPatch'}, + } + + def __init__(self, **kwargs): + super(EdgeProfilePatch, self).__init__(**kwargs) + self.subscription = kwargs.get('subscription', None) + + +class EdgeProfileSubscription(Model): + """Subscription details for the Edge Profile. + + :param registration_id: Edge Subscription Registration ID + :type registration_id: str + :param id: ARM ID of the subscription + :type id: str + :param state: Possible values include: 'Registered', 'Warned', + 'Suspended', 'Deleted', 'Unregistered' + :type state: str or ~azure.mgmt.databoxedge.models.SubscriptionState + :param registration_date: + :type registration_date: str + :param subscription_id: + :type subscription_id: str + :param tenant_id: + :type tenant_id: str + :param location_placement_id: + :type location_placement_id: str + :param quota_id: + :type quota_id: str + :param serialized_details: + :type serialized_details: str + :param registered_features: + :type registered_features: + list[~azure.mgmt.databoxedge.models.SubscriptionRegisteredFeatures] + """ + + _attribute_map = { + 'registration_id': {'key': 'registrationId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'registration_date': {'key': 'registrationDate', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'location_placement_id': {'key': 'properties.locationPlacementId', 'type': 'str'}, + 'quota_id': {'key': 'properties.quotaId', 'type': 'str'}, + 'serialized_details': {'key': 'properties.serializedDetails', 'type': 'str'}, + 'registered_features': {'key': 'properties.registeredFeatures', 'type': '[SubscriptionRegisteredFeatures]'}, + } + + def __init__(self, **kwargs): + super(EdgeProfileSubscription, self).__init__(**kwargs) + self.registration_id = kwargs.get('registration_id', None) + self.id = kwargs.get('id', None) + self.state = kwargs.get('state', None) + self.registration_date = kwargs.get('registration_date', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.location_placement_id = kwargs.get('location_placement_id', None) + self.quota_id = kwargs.get('quota_id', None) + self.serialized_details = kwargs.get('serialized_details', None) + self.registered_features = kwargs.get('registered_features', None) + + +class EdgeProfileSubscriptionPatch(Model): + """The Data Box Edge/Gateway Edge Profile Subscription patch. + + :param id: The path ID that uniquely identifies the subscription of the + edge profile. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EdgeProfileSubscriptionPatch, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class EtcdInfo(Model): + """Etcd configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Etcd type + :vartype type: str + :ivar version: Etcd version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EtcdInfo, self).__init__(**kwargs) + self.type = None + self.version = None + + +class Trigger(ARMBaseModel): + """Trigger details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FileEventTrigger, PeriodicTimerEventTrigger + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'FileEvent': 'FileEventTrigger', 'PeriodicTimerEvent': 'PeriodicTimerEventTrigger'} + } + + def __init__(self, **kwargs): + super(Trigger, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.kind = None + self.kind = 'Trigger' + + +class FileEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. File event source details. + :type source_info: ~azure.mgmt.databoxedge.models.FileSourceInfo + :param sink_info: Required. Role sink info. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'FileSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileEventTrigger, self).__init__(**kwargs) + self.source_info = kwargs.get('source_info', None) + self.sink_info = kwargs.get('sink_info', None) + self.custom_context_tag = kwargs.get('custom_context_tag', None) + self.kind = 'FileEvent' + + +class FileSourceInfo(Model): + """File source details. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. File share ID. + :type share_id: str + """ + + _validation = { + 'share_id': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileSourceInfo, self).__init__(**kwargs) + self.share_id = kwargs.get('share_id', None) + + +class GenerateCertResponse(Model): + """Used in activation key generation flow. + + :param public_key: Gets or sets base64 encoded certificate raw data, + this is the public part needed to be uploaded to cert vault + :type public_key: str + :param private_key: Gets or sets base64 encoded private part of the + certificate, + needed to form the activation key + :type private_key: str + :param expiry_time_in_utc: Gets or sets expiry time in UTC + :type expiry_time_in_utc: str + """ + + _attribute_map = { + 'public_key': {'key': 'publicKey', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'expiry_time_in_utc': {'key': 'expiryTimeInUTC', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateCertResponse, self).__init__(**kwargs) + self.public_key = kwargs.get('public_key', None) + self.private_key = kwargs.get('private_key', None) + self.expiry_time_in_utc = kwargs.get('expiry_time_in_utc', None) + + +class ImageRepositoryCredential(Model): + """Image repository credential. + + All required parameters must be populated in order to send to Azure. + + :param image_repository_url: Required. Image repository url (e.g.: + mcr.microsoft.com). + :type image_repository_url: str + :param user_name: Required. Repository user name. + :type user_name: str + :param password: Repository user password. + :type password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'image_repository_url': {'required': True}, + 'user_name': {'required': True}, + } + + _attribute_map = { + 'image_repository_url': {'key': 'imageRepositoryUrl', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, **kwargs): + super(ImageRepositoryCredential, self).__init__(**kwargs) + self.image_repository_url = kwargs.get('image_repository_url', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + + +class IoTAddon(Addon): + """IoT Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param io_tdevice_details: Required. IoT device metadata to which + appliance needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + Addon needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :ivar version: Version of IoT running on the appliance. + :vartype version: str + :ivar host_platform: Host OS supported by the IoT addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTAddon, self).__init__(**kwargs) + self.io_tdevice_details = kwargs.get('io_tdevice_details', None) + self.io_tedge_device_details = kwargs.get('io_tedge_device_details', None) + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'IotEdge' + + +class IoTDeviceInfo(Model): + """Metadata of IoT device/IoT Edge device to be configured. + + All required parameters must be populated in order to send to Azure. + + :param device_id: Required. ID of the IoT device/edge device. + :type device_id: str + :param io_thost_hub: Required. Host name for the IoT hub associated to the + device. + :type io_thost_hub: str + :param io_thost_hub_id: Id for the IoT hub associated to the device. + :type io_thost_hub_id: str + :param authentication: Encrypted IoT device/IoT edge device connection + string. + :type authentication: ~azure.mgmt.databoxedge.models.Authentication + """ + + _validation = { + 'device_id': {'required': True}, + 'io_thost_hub': {'required': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'io_thost_hub': {'key': 'ioTHostHub', 'type': 'str'}, + 'io_thost_hub_id': {'key': 'ioTHostHubId', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'Authentication'}, + } + + def __init__(self, **kwargs): + super(IoTDeviceInfo, self).__init__(**kwargs) + self.device_id = kwargs.get('device_id', None) + self.io_thost_hub = kwargs.get('io_thost_hub', None) + self.io_thost_hub_id = kwargs.get('io_thost_hub_id', None) + self.authentication = kwargs.get('authentication', None) + + +class IoTEdgeAgentInfo(Model): + """IoT edge agent details is optional, this will be used for download system + Agent module while bootstrapping IoT Role if specified. + + All required parameters must be populated in order to send to Azure. + + :param image_name: Required. Name of the IoT edge agent image. + :type image_name: str + :param tag: Required. Image Tag. + :type tag: str + :param image_repository: Image repository details. + :type image_repository: + ~azure.mgmt.databoxedge.models.ImageRepositoryCredential + """ + + _validation = { + 'image_name': {'required': True}, + 'tag': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'image_repository': {'key': 'imageRepository', 'type': 'ImageRepositoryCredential'}, + } + + def __init__(self, **kwargs): + super(IoTEdgeAgentInfo, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.tag = kwargs.get('tag', None) + self.image_repository = kwargs.get('image_repository', None) + + +class IoTRole(Role): + """Compute role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the IoT role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :param io_tdevice_details: Required. IoT device metadata to which data box + edge device needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + role needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param share_mappings: Mount points of shares in role(s). + :type share_mappings: list[~azure.mgmt.databoxedge.models.MountPointMap] + :param io_tedge_agent_info: Iot edge agent details to download the agent + and bootstrap iot runtime. + :type io_tedge_agent_info: ~azure.mgmt.databoxedge.models.IoTEdgeAgentInfo + :ivar host_platform_type: Platform where the Iot runtime is hosted. + Possible values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param compute_resource: Resource allocation + :type compute_resource: ~azure.mgmt.databoxedge.models.ComputeResource + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'host_platform_type': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'io_tedge_agent_info': {'key': 'properties.ioTEdgeAgentInfo', 'type': 'IoTEdgeAgentInfo'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'compute_resource': {'key': 'properties.computeResource', 'type': 'ComputeResource'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTRole, self).__init__(**kwargs) + self.host_platform = kwargs.get('host_platform', None) + self.io_tdevice_details = kwargs.get('io_tdevice_details', None) + self.io_tedge_device_details = kwargs.get('io_tedge_device_details', None) + self.share_mappings = kwargs.get('share_mappings', None) + self.io_tedge_agent_info = kwargs.get('io_tedge_agent_info', None) + self.host_platform_type = None + self.compute_resource = kwargs.get('compute_resource', None) + self.role_status = kwargs.get('role_status', None) + self.kind = 'IOT' + + +class Ipv4Config(Model): + """Details related to the IPv4 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv4 address of the network adapter. + :vartype ip_address: str + :ivar subnet: The IPv4 subnet of the network adapter. + :vartype subnet: str + :ivar gateway: The IPv4 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'subnet': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Ipv4Config, self).__init__(**kwargs) + self.ip_address = None + self.subnet = None + self.gateway = None + + +class Ipv6Config(Model): + """Details related to the IPv6 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv6 address of the network adapter. + :vartype ip_address: str + :ivar prefix_length: The IPv6 prefix of the network adapter. + :vartype prefix_length: int + :ivar gateway: The IPv6 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'prefix_length': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Ipv6Config, self).__init__(**kwargs) + self.ip_address = None + self.prefix_length = None + self.gateway = None + + +class Job(Model): + """A device job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The name of the object. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar status: The current status of the job. Possible values include: + 'Invalid', 'Running', 'Succeeded', 'Failed', 'Canceled', 'Paused', + 'Scheduled' + :vartype status: str or ~azure.mgmt.databoxedge.models.JobStatus + :ivar start_time: The UTC date and time at which the job started. + :vartype start_time: datetime + :ivar end_time: The UTC date and time at which the job completed. + :vartype end_time: datetime + :ivar percent_complete: The percentage of the job that is complete. + :vartype percent_complete: int + :ivar error: The error details. + :vartype error: ~azure.mgmt.databoxedge.models.JobErrorDetails + :ivar job_type: The type of the job. Possible values include: 'Invalid', + 'ScanForUpdates', 'DownloadUpdates', 'InstallUpdates', 'RefreshShare', + 'RefreshContainer', 'Backup', 'Restore', 'TriggerSupportPackage' + :vartype job_type: str or ~azure.mgmt.databoxedge.models.JobType + :ivar current_stage: Current stage of the update operation. Possible + values include: 'Unknown', 'Initial', 'ScanStarted', 'ScanComplete', + 'ScanFailed', 'DownloadStarted', 'DownloadComplete', 'DownloadFailed', + 'InstallStarted', 'InstallComplete', 'InstallFailed', 'RebootInitiated', + 'Success', 'Failure', 'RescanStarted', 'RescanComplete', 'RescanFailed' + :vartype current_stage: str or + ~azure.mgmt.databoxedge.models.UpdateOperationStage + :ivar download_progress: The download progress. + :vartype download_progress: + ~azure.mgmt.databoxedge.models.UpdateDownloadProgress + :ivar install_progress: The install progress. + :vartype install_progress: + ~azure.mgmt.databoxedge.models.UpdateInstallProgress + :ivar total_refresh_errors: Total number of errors encountered during the + refresh process. + :vartype total_refresh_errors: int + :ivar error_manifest_file: Local share/remote container relative path to + the error manifest file of the refresh. + :vartype error_manifest_file: str + :ivar refreshed_entity_id: ARM ID of the entity that was refreshed. + :vartype refreshed_entity_id: str + :param folder: If only subfolders need to be refreshed, then the subfolder + path inside the share or container. (The path is empty if there are no + subfolders.) + :type folder: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'error': {'readonly': True}, + 'job_type': {'readonly': True}, + 'current_stage': {'readonly': True}, + 'download_progress': {'readonly': True}, + 'install_progress': {'readonly': True}, + 'total_refresh_errors': {'readonly': True}, + 'error_manifest_file': {'readonly': True}, + 'refreshed_entity_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'error': {'key': 'error', 'type': 'JobErrorDetails'}, + 'job_type': {'key': 'properties.jobType', 'type': 'str'}, + 'current_stage': {'key': 'properties.currentStage', 'type': 'str'}, + 'download_progress': {'key': 'properties.downloadProgress', 'type': 'UpdateDownloadProgress'}, + 'install_progress': {'key': 'properties.installProgress', 'type': 'UpdateInstallProgress'}, + 'total_refresh_errors': {'key': 'properties.totalRefreshErrors', 'type': 'int'}, + 'error_manifest_file': {'key': 'properties.errorManifestFile', 'type': 'str'}, + 'refreshed_entity_id': {'key': 'properties.refreshedEntityId', 'type': 'str'}, + 'folder': {'key': 'properties.folder', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.status = None + self.start_time = None + self.end_time = None + self.percent_complete = None + self.error = None + self.job_type = None + self.current_stage = None + self.download_progress = None + self.install_progress = None + self.total_refresh_errors = None + self.error_manifest_file = None + self.refreshed_entity_id = None + self.folder = kwargs.get('folder', None) + + +class JobErrorDetails(Model): + """The job error information containing the list of job errors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_details: The error details. + :vartype error_details: list[~azure.mgmt.databoxedge.models.JobErrorItem] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'error_details': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorItem]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobErrorDetails, self).__init__(**kwargs) + self.error_details = None + self.code = None + self.message = None + + +class JobErrorItem(Model): + """The job error items. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendations: The recommended actions. + :vartype recommendations: list[str] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'recommendations': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobErrorItem, self).__init__(**kwargs) + self.recommendations = None + self.code = None + self.message = None + + +class KubernetesClusterInfo(Model): + """Kubernetes cluster configuration. + + Variables are only 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 etcd_info: Etcd configuration + :vartype etcd_info: ~azure.mgmt.databoxedge.models.EtcdInfo + :ivar nodes: Kubernetes cluster nodes + :vartype nodes: list[~azure.mgmt.databoxedge.models.NodeInfo] + :param version: Required. Kubernetes cluster version + :type version: str + """ + + _validation = { + 'etcd_info': {'readonly': True}, + 'nodes': {'readonly': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'etcd_info': {'key': 'etcdInfo', 'type': 'EtcdInfo'}, + 'nodes': {'key': 'nodes', 'type': '[NodeInfo]'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesClusterInfo, self).__init__(**kwargs) + self.etcd_info = None + self.nodes = None + self.version = kwargs.get('version', None) + + +class KubernetesIPConfiguration(Model): + """Kubernetes node IP configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar port: Port of the Kubernetes node. + :vartype port: str + :param ip_address: IP address of the Kubernetes node. + :type ip_address: str + """ + + _validation = { + 'port': {'readonly': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesIPConfiguration, self).__init__(**kwargs) + self.port = None + self.ip_address = kwargs.get('ip_address', None) + + +class KubernetesRole(Role): + """Kubernetes role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the Kubernetes role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar provisioning_state: State of Kubernetes deployment. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.KubernetesState + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param kubernetes_cluster_info: Required. Kubernetes cluster configuration + :type kubernetes_cluster_info: + ~azure.mgmt.databoxedge.models.KubernetesClusterInfo + :param kubernetes_role_resources: Required. Kubernetes role resources + :type kubernetes_role_resources: + ~azure.mgmt.databoxedge.models.KubernetesRoleResources + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'kubernetes_cluster_info': {'required': True}, + 'kubernetes_role_resources': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'kubernetes_cluster_info': {'key': 'properties.kubernetesClusterInfo', 'type': 'KubernetesClusterInfo'}, + 'kubernetes_role_resources': {'key': 'properties.kubernetesRoleResources', 'type': 'KubernetesRoleResources'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesRole, self).__init__(**kwargs) + self.host_platform = kwargs.get('host_platform', None) + self.provisioning_state = None + self.host_platform_type = None + self.kubernetes_cluster_info = kwargs.get('kubernetes_cluster_info', None) + self.kubernetes_role_resources = kwargs.get('kubernetes_role_resources', None) + self.role_status = kwargs.get('role_status', None) + self.kind = 'Kubernetes' + + +class KubernetesRoleCompute(Model): + """Kubernetes role compute 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 vm_profile: Required. VM profile + :type vm_profile: str + :ivar memory_in_bytes: Memory in bytes + :vartype memory_in_bytes: long + :ivar processor_count: Processor count + :vartype processor_count: int + """ + + _validation = { + 'vm_profile': {'required': True}, + 'memory_in_bytes': {'readonly': True}, + 'processor_count': {'readonly': True}, + } + + _attribute_map = { + 'vm_profile': {'key': 'vmProfile', 'type': 'str'}, + 'memory_in_bytes': {'key': 'memoryInBytes', 'type': 'long'}, + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleCompute, self).__init__(**kwargs) + self.vm_profile = kwargs.get('vm_profile', None) + self.memory_in_bytes = None + self.processor_count = None + + +class KubernetesRoleNetwork(Model): + """Kubernetes role network resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar cni_config: Cni configuration + :vartype cni_config: ~azure.mgmt.databoxedge.models.CniConfig + :ivar load_balancer_config: Load balancer configuration + :vartype load_balancer_config: + ~azure.mgmt.databoxedge.models.LoadBalancerConfig + """ + + _validation = { + 'cni_config': {'readonly': True}, + 'load_balancer_config': {'readonly': True}, + } + + _attribute_map = { + 'cni_config': {'key': 'cniConfig', 'type': 'CniConfig'}, + 'load_balancer_config': {'key': 'loadBalancerConfig', 'type': 'LoadBalancerConfig'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleNetwork, self).__init__(**kwargs) + self.cni_config = None + self.load_balancer_config = None + + +class KubernetesRoleResources(Model): + """Kubernetes role resources. + + Variables are only 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 storage: Kubernetes role storage resource + :type storage: ~azure.mgmt.databoxedge.models.KubernetesRoleStorage + :param compute: Required. Kubernetes role compute resource + :type compute: ~azure.mgmt.databoxedge.models.KubernetesRoleCompute + :ivar network: Kubernetes role network resource + :vartype network: ~azure.mgmt.databoxedge.models.KubernetesRoleNetwork + """ + + _validation = { + 'compute': {'required': True}, + 'network': {'readonly': True}, + } + + _attribute_map = { + 'storage': {'key': 'storage', 'type': 'KubernetesRoleStorage'}, + 'compute': {'key': 'compute', 'type': 'KubernetesRoleCompute'}, + 'network': {'key': 'network', 'type': 'KubernetesRoleNetwork'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleResources, self).__init__(**kwargs) + self.storage = kwargs.get('storage', None) + self.compute = kwargs.get('compute', None) + self.network = None + + +class KubernetesRoleStorage(Model): + """Kubernetes role storage resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar storage_classes: Kubernetes storage class info. + :vartype storage_classes: + list[~azure.mgmt.databoxedge.models.KubernetesRoleStorageClassInfo] + :param endpoints: Mount points of shares in role(s). + :type endpoints: list[~azure.mgmt.databoxedge.models.MountPointMap] + """ + + _validation = { + 'storage_classes': {'readonly': True}, + } + + _attribute_map = { + 'storage_classes': {'key': 'storageClasses', 'type': '[KubernetesRoleStorageClassInfo]'}, + 'endpoints': {'key': 'endpoints', 'type': '[MountPointMap]'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleStorage, self).__init__(**kwargs) + self.storage_classes = None + self.endpoints = kwargs.get('endpoints', None) + + +class KubernetesRoleStorageClassInfo(Model): + """Kubernetes storage class info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Storage class name. + :vartype name: str + :ivar type: Storage class type. + :vartype type: str + :ivar posix_compliant: If provisioned storage is posix compliant. Possible + values include: 'Invalid', 'Enabled', 'Disabled' + :vartype posix_compliant: str or + ~azure.mgmt.databoxedge.models.PosixComplianceStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'posix_compliant': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'posix_compliant': {'key': 'posixCompliant', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleStorageClassInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.posix_compliant = None + + +class LoadBalancerConfig(Model): + """Load balancer configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Load balancer type + :vartype type: str + :ivar version: Load balancer version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadBalancerConfig, self).__init__(**kwargs) + self.type = None + self.version = None + + +class MECRole(Role): + """MEC role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param connection_string: Activation key of the MEC. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'AsymmetricEncryptedSecret'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MECRole, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.role_status = kwargs.get('role_status', None) + self.kind = 'MEC' + + +class MetricConfiguration(Model): + """Metric configuration. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The Resource ID on which the metrics should + be pushed. + :type resource_id: str + :param mdm_account: The MDM account to which the counters should be + pushed. + :type mdm_account: str + :param metric_name_space: The MDM namespace to which the counters should + be pushed. This is required if MDMAccount is specified + :type metric_name_space: str + :param counter_sets: Required. Host name for the IoT hub associated to the + device. + :type counter_sets: list[~azure.mgmt.databoxedge.models.MetricCounterSet] + """ + + _validation = { + 'resource_id': {'required': True}, + 'counter_sets': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'mdm_account': {'key': 'mdmAccount', 'type': 'str'}, + 'metric_name_space': {'key': 'metricNameSpace', 'type': 'str'}, + 'counter_sets': {'key': 'counterSets', 'type': '[MetricCounterSet]'}, + } + + def __init__(self, **kwargs): + super(MetricConfiguration, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.mdm_account = kwargs.get('mdm_account', None) + self.metric_name_space = kwargs.get('metric_name_space', None) + self.counter_sets = kwargs.get('counter_sets', None) + + +class MetricCounter(Model): + """The metric counter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The counter name. + :type name: str + :param instance: The instance from which counter should be collected. + :type instance: str + :param dimension_filter: The dimension filter. + :type dimension_filter: + list[~azure.mgmt.databoxedge.models.MetricDimension] + :param additional_dimensions: The additional dimensions to be added to + metric. + :type additional_dimensions: + list[~azure.mgmt.databoxedge.models.MetricDimension] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'str'}, + 'dimension_filter': {'key': 'dimensionFilter', 'type': '[MetricDimension]'}, + 'additional_dimensions': {'key': 'additionalDimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, **kwargs): + super(MetricCounter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.instance = kwargs.get('instance', None) + self.dimension_filter = kwargs.get('dimension_filter', None) + self.additional_dimensions = kwargs.get('additional_dimensions', None) + + +class MetricCounterSet(Model): + """The metric counter set. + + All required parameters must be populated in order to send to Azure. + + :param counters: Required. The counters that should be collected in this + set. + :type counters: list[~azure.mgmt.databoxedge.models.MetricCounter] + """ + + _validation = { + 'counters': {'required': True}, + } + + _attribute_map = { + 'counters': {'key': 'counters', 'type': '[MetricCounter]'}, + } + + def __init__(self, **kwargs): + super(MetricCounterSet, self).__init__(**kwargs) + self.counters = kwargs.get('counters', None) + + +class MetricDimension(Model): + """The metric dimension. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. The dimension type. + :type source_type: str + :param source_name: Required. The dimension value. + :type source_name: str + """ + + _validation = { + 'source_type': {'required': True}, + 'source_name': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'source_name': {'key': 'sourceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricDimension, self).__init__(**kwargs) + self.source_type = kwargs.get('source_type', None) + self.source_name = kwargs.get('source_name', None) + + +class MetricDimensionV1(Model): + """Metric Dimension v1. + + :param name: Name of the metrics dimension. + :type name: str + :param display_name: Display name of the metrics dimension. + :type display_name: str + :param to_be_exported_for_shoebox: To be exported to shoe box. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MetricDimensionV1, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class MetricSpecificationV1(Model): + """Metric specification version 1. + + :param name: Name of the metric. + :type name: str + :param display_name: Display name of the metric. + :type display_name: str + :param display_description: Description of the metric to be displayed. + :type display_description: str + :param unit: Metric units. Possible values include: 'NotSpecified', + 'Percent', 'Count', 'Seconds', 'Milliseconds', 'Bytes', 'BytesPerSecond', + 'CountPerSecond' + :type unit: str or ~azure.mgmt.databoxedge.models.MetricUnit + :param aggregation_type: Metric aggregation type. Possible values include: + 'NotSpecified', 'None', 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + :type aggregation_type: str or + ~azure.mgmt.databoxedge.models.MetricAggregationType + :param dimensions: Metric dimensions, other than default dimension which + is resource. + :type dimensions: list[~azure.mgmt.databoxedge.models.MetricDimensionV1] + :param fill_gap_with_zero: Set true to fill the gaps with zero. + :type fill_gap_with_zero: bool + :param category: Metric category. Possible values include: 'Capacity', + 'Transaction' + :type category: str or ~azure.mgmt.databoxedge.models.MetricCategory + :param resource_id_dimension_name_override: Resource name override. + :type resource_id_dimension_name_override: str + :param supported_time_grain_types: Support granularity of metrics. + :type supported_time_grain_types: list[str or + ~azure.mgmt.databoxedge.models.TimeGrain] + :param supported_aggregation_types: Support metric aggregation type. + :type supported_aggregation_types: list[str or + ~azure.mgmt.databoxedge.models.MetricAggregationType] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimensionV1]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(MetricSpecificationV1, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.dimensions = kwargs.get('dimensions', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.category = kwargs.get('category', None) + self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) + self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + + +class MonitoringMetricConfiguration(ARMBaseModel): + """The metric setting details for the role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param metric_configurations: Required. The metrics configuration details + :type metric_configurations: + list[~azure.mgmt.databoxedge.models.MetricConfiguration] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metric_configurations': {'key': 'properties.metricConfigurations', 'type': '[MetricConfiguration]'}, + } + + def __init__(self, **kwargs): + super(MonitoringMetricConfiguration, self).__init__(**kwargs) + self.metric_configurations = kwargs.get('metric_configurations', None) + + +class MountPointMap(Model): + """The share mount point. + + Variables are only 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 share_id: Required. ID of the share mounted to the role VM. + :type share_id: str + :ivar role_id: ID of the role to which share is mounted. + :vartype role_id: str + :ivar mount_point: Mount point for the share. + :vartype mount_point: str + :ivar mount_type: Mounting type. Possible values include: 'Volume', + 'HostPath' + :vartype mount_type: str or ~azure.mgmt.databoxedge.models.MountType + :ivar role_type: Role type. Possible values include: 'IOT', 'ASA', + 'Functions', 'Cognitive', 'MEC', 'CloudEdgeManagement', 'Kubernetes' + :vartype role_type: str or ~azure.mgmt.databoxedge.models.RoleTypes + """ + + _validation = { + 'share_id': {'required': True}, + 'role_id': {'readonly': True}, + 'mount_point': {'readonly': True}, + 'mount_type': {'readonly': True}, + 'role_type': {'readonly': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'role_id': {'key': 'roleId', 'type': 'str'}, + 'mount_point': {'key': 'mountPoint', 'type': 'str'}, + 'mount_type': {'key': 'mountType', 'type': 'str'}, + 'role_type': {'key': 'roleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MountPointMap, self).__init__(**kwargs) + self.share_id = kwargs.get('share_id', None) + self.role_id = None + self.mount_point = None + self.mount_type = None + self.role_type = None + + +class NetworkAdapter(Model): + """Represents the networkAdapter on a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar adapter_id: Instance ID of network adapter. + :vartype adapter_id: str + :ivar adapter_position: Hardware position of network adapter. + :vartype adapter_position: + ~azure.mgmt.databoxedge.models.NetworkAdapterPosition + :ivar index: Logical index of the adapter. + :vartype index: int + :ivar node_id: Node ID of the network adapter. + :vartype node_id: str + :ivar network_adapter_name: Network adapter name. + :vartype network_adapter_name: str + :ivar label: Hardware label for the adapter. + :vartype label: str + :ivar mac_address: MAC address. + :vartype mac_address: str + :ivar link_speed: Link speed. + :vartype link_speed: long + :ivar status: Value indicating whether this adapter is valid. Possible + values include: 'Inactive', 'Active' + :vartype status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterStatus + :param rdma_status: Value indicating whether this adapter is RDMA capable. + Possible values include: 'Incapable', 'Capable' + :type rdma_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterRDMAStatus + :param dhcp_status: Value indicating whether this adapter has DHCP + enabled. Possible values include: 'Disabled', 'Enabled' + :type dhcp_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterDHCPStatus + :ivar ipv4_configuration: The IPv4 configuration of the network adapter. + :vartype ipv4_configuration: ~azure.mgmt.databoxedge.models.Ipv4Config + :ivar ipv6_configuration: The IPv6 configuration of the network adapter. + :vartype ipv6_configuration: ~azure.mgmt.databoxedge.models.Ipv6Config + :ivar ipv6_link_local_address: The IPv6 local address. + :vartype ipv6_link_local_address: str + :ivar dns_servers: The list of DNS Servers of the device. + :vartype dns_servers: list[str] + """ + + _validation = { + 'adapter_id': {'readonly': True}, + 'adapter_position': {'readonly': True}, + 'index': {'readonly': True}, + 'node_id': {'readonly': True}, + 'network_adapter_name': {'readonly': True}, + 'label': {'readonly': True}, + 'mac_address': {'readonly': True}, + 'link_speed': {'readonly': True}, + 'status': {'readonly': True}, + 'ipv4_configuration': {'readonly': True}, + 'ipv6_configuration': {'readonly': True}, + 'ipv6_link_local_address': {'readonly': True}, + 'dns_servers': {'readonly': True}, + } + + _attribute_map = { + 'adapter_id': {'key': 'adapterId', 'type': 'str'}, + 'adapter_position': {'key': 'adapterPosition', 'type': 'NetworkAdapterPosition'}, + 'index': {'key': 'index', 'type': 'int'}, + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'network_adapter_name': {'key': 'networkAdapterName', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + 'link_speed': {'key': 'linkSpeed', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'rdma_status': {'key': 'rdmaStatus', 'type': 'str'}, + 'dhcp_status': {'key': 'dhcpStatus', 'type': 'str'}, + 'ipv4_configuration': {'key': 'ipv4Configuration', 'type': 'Ipv4Config'}, + 'ipv6_configuration': {'key': 'ipv6Configuration', 'type': 'Ipv6Config'}, + 'ipv6_link_local_address': {'key': 'ipv6LinkLocalAddress', 'type': 'str'}, + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NetworkAdapter, self).__init__(**kwargs) + self.adapter_id = None + self.adapter_position = None + self.index = None + self.node_id = None + self.network_adapter_name = None + self.label = None + self.mac_address = None + self.link_speed = None + self.status = None + self.rdma_status = kwargs.get('rdma_status', None) + self.dhcp_status = kwargs.get('dhcp_status', None) + self.ipv4_configuration = None + self.ipv6_configuration = None + self.ipv6_link_local_address = None + self.dns_servers = None + + +class NetworkAdapterPosition(Model): + """The network adapter position. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar network_group: The network group. Possible values include: 'None', + 'NonRDMA', 'RDMA' + :vartype network_group: str or ~azure.mgmt.databoxedge.models.NetworkGroup + :ivar port: The port. + :vartype port: int + """ + + _validation = { + 'network_group': {'readonly': True}, + 'port': {'readonly': True}, + } + + _attribute_map = { + 'network_group': {'key': 'networkGroup', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NetworkAdapterPosition, self).__init__(**kwargs) + self.network_group = None + self.port = None + + +class NetworkSettings(ARMBaseModel): + """The network settings of a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar network_adapters: The network adapter list on the device. + :vartype network_adapters: + list[~azure.mgmt.databoxedge.models.NetworkAdapter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'network_adapters': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'network_adapters': {'key': 'properties.networkAdapters', 'type': '[NetworkAdapter]'}, + } + + def __init__(self, **kwargs): + super(NetworkSettings, self).__init__(**kwargs) + self.network_adapters = None + + +class Node(ARMBaseModel): + """Represents a single node in a Data box Edge/Gateway device + Gateway devices, standalone Edge devices and a single node cluster Edge + device will all have 1 node + Multi-node Edge devices will have more than 1 nodes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar node_status: The current status of the individual node. Possible + values include: 'Unknown', 'Up', 'Down', 'Rebooting', 'ShuttingDown' + :vartype node_status: str or ~azure.mgmt.databoxedge.models.NodeStatus + :ivar node_chassis_serial_number: Serial number of the Chassis + :vartype node_chassis_serial_number: str + :ivar node_serial_number: Serial number of the individual node + :vartype node_serial_number: str + :ivar node_display_name: Display Name of the individual node + :vartype node_display_name: str + :ivar node_friendly_software_version: Friendly software version name that + is currently installed on the node + :vartype node_friendly_software_version: str + :ivar node_hcs_version: HCS version that is currently installed on the + node + :vartype node_hcs_version: str + :ivar node_instance_id: Guid instance id of the node + :vartype node_instance_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'node_status': {'readonly': True}, + 'node_chassis_serial_number': {'readonly': True}, + 'node_serial_number': {'readonly': True}, + 'node_display_name': {'readonly': True}, + 'node_friendly_software_version': {'readonly': True}, + 'node_hcs_version': {'readonly': True}, + 'node_instance_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'node_status': {'key': 'properties.nodeStatus', 'type': 'str'}, + 'node_chassis_serial_number': {'key': 'properties.nodeChassisSerialNumber', 'type': 'str'}, + 'node_serial_number': {'key': 'properties.nodeSerialNumber', 'type': 'str'}, + 'node_display_name': {'key': 'properties.nodeDisplayName', 'type': 'str'}, + 'node_friendly_software_version': {'key': 'properties.nodeFriendlySoftwareVersion', 'type': 'str'}, + 'node_hcs_version': {'key': 'properties.nodeHcsVersion', 'type': 'str'}, + 'node_instance_id': {'key': 'properties.nodeInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Node, self).__init__(**kwargs) + self.node_status = None + self.node_chassis_serial_number = None + self.node_serial_number = None + self.node_display_name = None + self.node_friendly_software_version = None + self.node_hcs_version = None + self.node_instance_id = None + + +class NodeInfo(Model): + """Kubernetes node info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Node name. + :vartype name: str + :ivar type: Node type - Master/Worker. Possible values include: 'Invalid', + 'Master', 'Worker' + :vartype type: str or ~azure.mgmt.databoxedge.models.KubernetesNodeType + :param ip_configuration: IP Configuration of the Kubernetes node. + :type ip_configuration: + list[~azure.mgmt.databoxedge.models.KubernetesIPConfiguration] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_configuration': {'key': 'ipConfiguration', 'type': '[KubernetesIPConfiguration]'}, + } + + def __init__(self, **kwargs): + super(NodeInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.ip_configuration = kwargs.get('ip_configuration', None) + + +class Operation(Model): + """Operations. + + :param name: Name of the operation. + :type name: str + :param is_data_action: Is data action. + :type is_data_action: bool + :param display: Properties displayed for the operation. + :type display: ~azure.mgmt.databoxedge.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param service_specification: Service specification. + :type service_specification: + ~azure.mgmt.databoxedge.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationDisplay(Model): + """Operation display properties. + + :param provider: Provider name. + :type provider: str + :param resource: The type of resource in which the operation is performed. + :type resource: str + :param operation: Operation to be performed on the resource. + :type operation: str + :param description: Description of the operation to be performed. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class Order(ARMBaseModel): + """The order details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param contact_information: Required. The contact details. + :type contact_information: ~azure.mgmt.databoxedge.models.ContactDetails + :param shipping_address: The shipping address. + :type shipping_address: ~azure.mgmt.databoxedge.models.Address + :ivar current_status: Current status of the order. + :vartype current_status: ~azure.mgmt.databoxedge.models.OrderStatus + :ivar order_history: List of status changes in the order. + :vartype order_history: list[~azure.mgmt.databoxedge.models.OrderStatus] + :ivar serial_number: Serial number of the device. + :vartype serial_number: str + :ivar delivery_tracking_info: Tracking information for the package + delivered to the customer whether it has an original or a replacement + device. + :vartype delivery_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :ivar return_tracking_info: Tracking information for the package returned + from the customer whether it has an original or a replacement device. + :vartype return_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :param shipment_type: ShipmentType of the order. Possible values include: + 'NotApplicable', 'ShippedToCustomer', 'SelfPickup' + :type shipment_type: str or ~azure.mgmt.databoxedge.models.ShipmentType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_information': {'required': True}, + 'current_status': {'readonly': True}, + 'order_history': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'delivery_tracking_info': {'readonly': True}, + 'return_tracking_info': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'contact_information': {'key': 'properties.contactInformation', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'Address'}, + 'current_status': {'key': 'properties.currentStatus', 'type': 'OrderStatus'}, + 'order_history': {'key': 'properties.orderHistory', 'type': '[OrderStatus]'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'delivery_tracking_info': {'key': 'properties.deliveryTrackingInfo', 'type': '[TrackingInfo]'}, + 'return_tracking_info': {'key': 'properties.returnTrackingInfo', 'type': '[TrackingInfo]'}, + 'shipment_type': {'key': 'properties.shipmentType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Order, self).__init__(**kwargs) + self.contact_information = kwargs.get('contact_information', None) + self.shipping_address = kwargs.get('shipping_address', None) + self.current_status = None + self.order_history = None + self.serial_number = None + self.delivery_tracking_info = None + self.return_tracking_info = None + self.shipment_type = kwargs.get('shipment_type', None) + + +class OrderStatus(Model): + """Represents a single status change. + + Variables are only 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 status: Required. Status of the order as per the allowed status + types. Possible values include: 'Untracked', 'AwaitingFulfilment', + 'AwaitingPreparation', 'AwaitingShipment', 'Shipped', 'Arriving', + 'Delivered', 'ReplacementRequested', 'LostDevice', 'Declined', + 'ReturnInitiated', 'AwaitingReturnShipment', 'ShippedBack', + 'CollectedAtMicrosoft', 'AwaitingPickup', 'PickupCompleted', + 'AwaitingDrop' + :type status: str or ~azure.mgmt.databoxedge.models.OrderState + :ivar update_date_time: Time of status update. + :vartype update_date_time: datetime + :param comments: Comments related to this status change. + :type comments: str + :ivar tracking_information: Tracking information related to the state in + the ordering flow + :vartype tracking_information: ~azure.mgmt.databoxedge.models.TrackingInfo + :ivar additional_order_details: Dictionary to hold generic information + which is not stored + by the already existing properties + :vartype additional_order_details: dict[str, str] + """ + + _validation = { + 'status': {'required': True}, + 'update_date_time': {'readonly': True}, + 'tracking_information': {'readonly': True}, + 'additional_order_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'update_date_time': {'key': 'updateDateTime', 'type': 'iso-8601'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'tracking_information': {'key': 'trackingInformation', 'type': 'TrackingInfo'}, + 'additional_order_details': {'key': 'additionalOrderDetails', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(OrderStatus, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.update_date_time = None + self.comments = kwargs.get('comments', None) + self.tracking_information = None + self.additional_order_details = None + + +class PeriodicTimerEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. Periodic timer details. + :type source_info: ~azure.mgmt.databoxedge.models.PeriodicTimerSourceInfo + :param sink_info: Required. Role Sink information. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'PeriodicTimerSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PeriodicTimerEventTrigger, self).__init__(**kwargs) + self.source_info = kwargs.get('source_info', None) + self.sink_info = kwargs.get('sink_info', None) + self.custom_context_tag = kwargs.get('custom_context_tag', None) + self.kind = 'PeriodicTimerEvent' + + +class PeriodicTimerSourceInfo(Model): + """Periodic timer event source. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. The time of the day that results in a valid + trigger. Schedule is computed with reference to the time specified upto + seconds. If timezone is not specified the time will considered to be in + device timezone. The value will always be returned as UTC time. + :type start_time: datetime + :param schedule: Required. Periodic frequency at which timer event needs + to be raised. Supports daily, hourly, minutes, and seconds. + :type schedule: str + :param topic: Topic where periodic events are published to IoT device. + :type topic: str + """ + + _validation = { + 'start_time': {'required': True}, + 'schedule': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'schedule': {'key': 'schedule', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PeriodicTimerSourceInfo, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.schedule = kwargs.get('schedule', None) + self.topic = kwargs.get('topic', None) + + +class RefreshDetails(Model): + """Fields for tracking refresh job on the share or container. + + :param in_progress_refresh_job_id: If a refresh job is currently in + progress on this share or container, this field indicates the ARM resource + ID of that job. The field is empty if no job is in progress. + :type in_progress_refresh_job_id: str + :param last_completed_refresh_job_time_in_utc: Indicates the completed + time for the last refresh job on this particular share or container, if + any.This could be a failed job or a successful job. + :type last_completed_refresh_job_time_in_utc: datetime + :param error_manifest_file: Indicates the relative path of the error xml + for the last refresh job on this particular share or container, if any. + This could be a failed job or a successful job. + :type error_manifest_file: str + :param last_job: Indicates the id of the last refresh job on this + particular share or container,if any. This could be a failed job or a + successful job. + :type last_job: str + """ + + _attribute_map = { + 'in_progress_refresh_job_id': {'key': 'inProgressRefreshJobId', 'type': 'str'}, + 'last_completed_refresh_job_time_in_utc': {'key': 'lastCompletedRefreshJobTimeInUTC', 'type': 'iso-8601'}, + 'error_manifest_file': {'key': 'errorManifestFile', 'type': 'str'}, + 'last_job': {'key': 'lastJob', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RefreshDetails, self).__init__(**kwargs) + self.in_progress_refresh_job_id = kwargs.get('in_progress_refresh_job_id', None) + self.last_completed_refresh_job_time_in_utc = kwargs.get('last_completed_refresh_job_time_in_utc', None) + self.error_manifest_file = kwargs.get('error_manifest_file', None) + self.last_job = kwargs.get('last_job', None) + + +class ResourceIdentity(Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: Identity type. Possible values include: 'None', + 'SystemAssigned', 'UserAssigned' + :type type: str or ~azure.mgmt.databoxedge.models.MsiIdentityType + :ivar principal_id: Service Principal Id backing the Msi + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = None + self.tenant_id = None + + +class ResourceMoveDetails(Model): + """Fields for tracking resource move. + + :param operation_in_progress: Denotes whether move operation is in + progress. Possible values include: 'None', 'ResourceMoveInProgress', + 'ResourceMoveFailed' + :type operation_in_progress: str or + ~azure.mgmt.databoxedge.models.ResourceMoveStatus + :param operation_in_progress_lock_timeout_in_utc: Denotes the timeout of + the operation to finish + :type operation_in_progress_lock_timeout_in_utc: datetime + """ + + _attribute_map = { + 'operation_in_progress': {'key': 'operationInProgress', 'type': 'str'}, + 'operation_in_progress_lock_timeout_in_utc': {'key': 'operationInProgressLockTimeoutInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ResourceMoveDetails, self).__init__(**kwargs) + self.operation_in_progress = kwargs.get('operation_in_progress', None) + self.operation_in_progress_lock_timeout_in_utc = kwargs.get('operation_in_progress_lock_timeout_in_utc', None) + + +class ResourceTypeSku(Model): + """Resource type Sku object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The resource type. + :vartype resource_type: str + :ivar skus: The skus. + :vartype skus: list[~azure.mgmt.databoxedge.models.SkuInformation] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'skus': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[SkuInformation]'}, + } + + def __init__(self, **kwargs): + super(ResourceTypeSku, self).__init__(**kwargs) + self.resource_type = None + self.skus = None + + +class RoleSinkInfo(Model): + """Compute role against which events will be raised. + + All required parameters must be populated in order to send to Azure. + + :param role_id: Required. Compute role ID. + :type role_id: str + """ + + _validation = { + 'role_id': {'required': True}, + } + + _attribute_map = { + 'role_id': {'key': 'roleId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoleSinkInfo, self).__init__(**kwargs) + self.role_id = kwargs.get('role_id', None) + + +class Secret(Model): + """Holds device secret either as a KeyVault reference or as an encrypted + value. + + :param encrypted_secret: Encrypted (using device public key) secret value. + :type encrypted_secret: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param key_vault_id: Id of the Key-Vault where secret is stored (ex: + secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). + :type key_vault_id: str + """ + + _attribute_map = { + 'encrypted_secret': {'key': 'encryptedSecret', 'type': 'AsymmetricEncryptedSecret'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Secret, self).__init__(**kwargs) + self.encrypted_secret = kwargs.get('encrypted_secret', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class SecuritySettings(ARMBaseModel): + """The security settings of a device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param device_admin_password: Required. Device administrator password as + an encrypted string (encrypted using RSA PKCS #1) is used to sign into the + local web UI of the device. The Actual password should have at least 8 + characters that are a combination of uppercase, lowercase, numeric, and + special characters. + :type device_admin_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'device_admin_password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_admin_password': {'key': 'properties.deviceAdminPassword', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, **kwargs): + super(SecuritySettings, self).__init__(**kwargs) + self.device_admin_password = kwargs.get('device_admin_password', None) + + +class ServiceSpecification(Model): + """Service specification. + + :param metric_specifications: Metric specification as defined by shoebox. + :type metric_specifications: + list[~azure.mgmt.databoxedge.models.MetricSpecificationV1] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecificationV1]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class Share(ARMBaseModel): + """Represents a share on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Share on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the share. + :type description: str + :param share_status: Required. Current status of the share. Possible + values include: 'Offline', 'Unknown', 'OK', 'Updating', 'NeedsAttention' + :type share_status: str or ~azure.mgmt.databoxedge.models.ShareStatus + :param monitoring_status: Required. Current monitoring status of the + share. Possible values include: 'Enabled', 'Disabled' + :type monitoring_status: str or + ~azure.mgmt.databoxedge.models.MonitoringStatus + :param azure_container_info: Azure container mapping for the share. + :type azure_container_info: + ~azure.mgmt.databoxedge.models.AzureContainerInfo + :param access_protocol: Required. Access protocol to be used by the share. + Possible values include: 'SMB', 'NFS' + :type access_protocol: str or + ~azure.mgmt.databoxedge.models.ShareAccessProtocol + :param user_access_rights: Mapping of users and corresponding access + rights on the share (required for SMB protocol). + :type user_access_rights: + list[~azure.mgmt.databoxedge.models.UserAccessRight] + :param client_access_rights: List of IP addresses and corresponding access + rights on the share(required for NFS protocol). + :type client_access_rights: + list[~azure.mgmt.databoxedge.models.ClientAccessRight] + :param refresh_details: Details of the refresh job on this share. + :type refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar share_mappings: Share mount point to the role. + :vartype share_mappings: + list[~azure.mgmt.databoxedge.models.MountPointMap] + :param data_policy: Data policy of the share. Possible values include: + 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_status': {'required': True}, + 'monitoring_status': {'required': True}, + 'access_protocol': {'required': True}, + 'share_mappings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'share_status': {'key': 'properties.shareStatus', 'type': 'str'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + 'azure_container_info': {'key': 'properties.azureContainerInfo', 'type': 'AzureContainerInfo'}, + 'access_protocol': {'key': 'properties.accessProtocol', 'type': 'str'}, + 'user_access_rights': {'key': 'properties.userAccessRights', 'type': '[UserAccessRight]'}, + 'client_access_rights': {'key': 'properties.clientAccessRights', 'type': '[ClientAccessRight]'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Share, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.description = kwargs.get('description', None) + self.share_status = kwargs.get('share_status', None) + self.monitoring_status = kwargs.get('monitoring_status', None) + self.azure_container_info = kwargs.get('azure_container_info', None) + self.access_protocol = kwargs.get('access_protocol', None) + self.user_access_rights = kwargs.get('user_access_rights', None) + self.client_access_rights = kwargs.get('client_access_rights', None) + self.refresh_details = kwargs.get('refresh_details', None) + self.share_mappings = None + self.data_policy = kwargs.get('data_policy', None) + + +class ShareAccessRight(Model): + """Specifies the mapping between this particular user and the type of access + he has on shares on this device. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. The share ID. + :type share_id: str + :param access_type: Required. Type of access to be allowed on the share + for this user. Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'share_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShareAccessRight, self).__init__(**kwargs) + self.share_id = kwargs.get('share_id', None) + self.access_type = kwargs.get('access_type', None) + + +class Sku(Model): + """The SKU type. + + :param name: SKU name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC' + :type name: str or ~azure.mgmt.databoxedge.models.SkuName + :param tier: The SKU tier. This is based on the SKU name. Possible values + include: 'Standard' + :type tier: str or ~azure.mgmt.databoxedge.models.SkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + + +class SkuCapability(Model): + """The metadata to describe the capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuCapability, self).__init__(**kwargs) + self.name = None + self.value = None + + +class SkuCost(Model): + """The metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The cost quantity. + :vartype quantity: long + :ivar extended_unit: The extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class SkuInformation(Model): + """Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The sku name. + :vartype name: str + :ivar tier: The sku tier. + :vartype tier: str + :ivar kind: The sku kind. + :vartype kind: str + :ivar family: The Sku family. + :vartype family: str + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar locations: The locations where Sku is available. + :vartype locations: list[str] + :ivar location_info: The locations where Sku is available with zones and + sites info + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar required_quota_ids: The required quotaIds for the sku to be + available. + :vartype required_quota_ids: list[str] + :ivar required_features: The required features for the sku to be + available. + :vartype required_features: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'kind': {'readonly': True}, + 'family': {'readonly': True}, + 'costs': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'required_quota_ids': {'readonly': True}, + 'required_features': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'required_quota_ids': {'key': 'requiredQuotaIds', 'type': '[str]'}, + 'required_features': {'key': 'requiredFeatures', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SkuInformation, self).__init__(**kwargs) + self.name = None + self.tier = None + self.kind = None + self.family = None + self.costs = None + self.locations = None + self.location_info = None + self.required_quota_ids = None + self.required_features = None + + +class SkuInformationList(Model): + """List of SKU Information objects. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of ResourceTypeSku objects + :vartype value: list[~azure.mgmt.databoxedge.models.ResourceTypeSku] + :ivar next_link: Links to the next set of results + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceTypeSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuInformationList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class SkuLocationInfo(Model): + """The location info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: The location. + :vartype location: str + :ivar zones: The zones. + :vartype zones: list[str] + :ivar sites: The sites. + :vartype sites: list[str] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'sites': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'sites': {'key': 'sites', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.sites = None + + +class StorageAccount(ARMBaseModel): + """Represents a Storage Account on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccount object on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the storage Account. + :type description: str + :param storage_account_status: Current status of the storage account. + Possible values include: 'OK', 'Offline', 'Unknown', 'Updating', + 'NeedsAttention' + :type storage_account_status: str or + ~azure.mgmt.databoxedge.models.StorageAccountStatus + :param data_policy: Required. Data policy of the storage Account. Possible + values include: 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + :param storage_account_credential_id: Storage Account Credential Id + :type storage_account_credential_id: str + :ivar blob_endpoint: BlobEndpoint of Storage Account + :vartype blob_endpoint: str + :ivar container_count: The Container Count. Present only for Storage + Accounts with DataPolicy set to Cloud. + :vartype container_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_policy': {'required': True}, + 'blob_endpoint': {'readonly': True}, + 'container_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'storage_account_status': {'key': 'properties.storageAccountStatus', 'type': 'str'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + 'storage_account_credential_id': {'key': 'properties.storageAccountCredentialId', 'type': 'str'}, + 'blob_endpoint': {'key': 'properties.blobEndpoint', 'type': 'str'}, + 'container_count': {'key': 'properties.containerCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(StorageAccount, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.description = kwargs.get('description', None) + self.storage_account_status = kwargs.get('storage_account_status', None) + self.data_policy = kwargs.get('data_policy', None) + self.storage_account_credential_id = kwargs.get('storage_account_credential_id', None) + self.blob_endpoint = None + self.container_count = None + + +class StorageAccountCredential(ARMBaseModel): + """The storage account credential. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccountCredential object + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param alias: Required. Alias for the storage account. + :type alias: str + :param user_name: Username for the storage account. + :type user_name: str + :param account_key: Encrypted storage key. + :type account_key: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param connection_string: Connection string for the storage account. Use + this string if username and account key are not specified. + :type connection_string: str + :param ssl_status: Required. Signifies whether SSL needs to be enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type ssl_status: str or ~azure.mgmt.databoxedge.models.SSLStatus + :param blob_domain_name: Blob end point for private clouds. + :type blob_domain_name: str + :param account_type: Required. Type of storage accessed on the storage + account. Possible values include: 'GeneralPurposeStorage', 'BlobStorage' + :type account_type: str or ~azure.mgmt.databoxedge.models.AccountType + :param storage_account_id: Id of the storage account. + :type storage_account_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alias': {'required': True}, + 'ssl_status': {'required': True}, + 'account_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'alias': {'key': 'properties.alias', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'account_key': {'key': 'properties.accountKey', 'type': 'AsymmetricEncryptedSecret'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'ssl_status': {'key': 'properties.sslStatus', 'type': 'str'}, + 'blob_domain_name': {'key': 'properties.blobDomainName', 'type': 'str'}, + 'account_type': {'key': 'properties.accountType', 'type': 'str'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccountCredential, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.alias = kwargs.get('alias', None) + self.user_name = kwargs.get('user_name', None) + self.account_key = kwargs.get('account_key', None) + self.connection_string = kwargs.get('connection_string', None) + self.ssl_status = kwargs.get('ssl_status', None) + self.blob_domain_name = kwargs.get('blob_domain_name', None) + self.account_type = kwargs.get('account_type', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + + +class SubscriptionRegisteredFeatures(Model): + """SubscriptionRegisteredFeatures. + + :param name: + :type name: str + :param state: + :type state: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionRegisteredFeatures, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.state = kwargs.get('state', None) + + +class SymmetricKey(Model): + """Symmetric key for authentication. + + :param connection_string: Connection string based on the symmetric key. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, **kwargs): + super(SymmetricKey, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.databoxedge.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TrackingInfo(Model): + """Tracking courier information. + + :param serial_number: Serial number of the device being tracked. + :type serial_number: str + :param carrier_name: Name of the carrier used in the delivery. + :type carrier_name: str + :param tracking_id: Tracking ID of the shipment. + :type tracking_id: str + :param tracking_url: Tracking URL of the shipment. + :type tracking_url: str + """ + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackingInfo, self).__init__(**kwargs) + self.serial_number = kwargs.get('serial_number', None) + self.carrier_name = kwargs.get('carrier_name', None) + self.tracking_id = kwargs.get('tracking_id', None) + self.tracking_url = kwargs.get('tracking_url', None) + + +class UpdateDownloadProgress(Model): + """Details about the download progress of update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar download_phase: The download phase. Possible values include: + 'Unknown', 'Initializing', 'Downloading', 'Verifying' + :vartype download_phase: str or + ~azure.mgmt.databoxedge.models.DownloadPhase + :ivar percent_complete: Percentage of completion. + :vartype percent_complete: int + :ivar total_bytes_to_download: Total bytes to download. + :vartype total_bytes_to_download: float + :ivar total_bytes_downloaded: Total bytes downloaded. + :vartype total_bytes_downloaded: float + :ivar number_of_updates_to_download: Number of updates to download. + :vartype number_of_updates_to_download: int + :ivar number_of_updates_downloaded: Number of updates downloaded. + :vartype number_of_updates_downloaded: int + """ + + _validation = { + 'download_phase': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'total_bytes_to_download': {'readonly': True}, + 'total_bytes_downloaded': {'readonly': True}, + 'number_of_updates_to_download': {'readonly': True}, + 'number_of_updates_downloaded': {'readonly': True}, + } + + _attribute_map = { + 'download_phase': {'key': 'downloadPhase', 'type': 'str'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'total_bytes_to_download': {'key': 'totalBytesToDownload', 'type': 'float'}, + 'total_bytes_downloaded': {'key': 'totalBytesDownloaded', 'type': 'float'}, + 'number_of_updates_to_download': {'key': 'numberOfUpdatesToDownload', 'type': 'int'}, + 'number_of_updates_downloaded': {'key': 'numberOfUpdatesDownloaded', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdateDownloadProgress, self).__init__(**kwargs) + self.download_phase = None + self.percent_complete = None + self.total_bytes_to_download = None + self.total_bytes_downloaded = None + self.number_of_updates_to_download = None + self.number_of_updates_downloaded = None + + +class UpdateInstallProgress(Model): + """Progress details during installation of updates. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar percent_complete: Percentage completed. + :vartype percent_complete: int + :ivar number_of_updates_to_install: Number of updates to install. + :vartype number_of_updates_to_install: int + :ivar number_of_updates_installed: Number of updates installed. + :vartype number_of_updates_installed: int + """ + + _validation = { + 'percent_complete': {'readonly': True}, + 'number_of_updates_to_install': {'readonly': True}, + 'number_of_updates_installed': {'readonly': True}, + } + + _attribute_map = { + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'number_of_updates_to_install': {'key': 'numberOfUpdatesToInstall', 'type': 'int'}, + 'number_of_updates_installed': {'key': 'numberOfUpdatesInstalled', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdateInstallProgress, self).__init__(**kwargs) + self.percent_complete = None + self.number_of_updates_to_install = None + self.number_of_updates_installed = None + + +class UpdateSummary(ARMBaseModel): + """Details about ongoing updates and availability of updates on the device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param device_version_number: The current version of the device in format: + 1.2.17312.13.", + :type device_version_number: str + :param friendly_device_version_name: The current version of the device in + text format. + :type friendly_device_version_name: str + :param device_last_scanned_date_time: The last time when a scan was done + on the device. + :type device_last_scanned_date_time: datetime + :param last_completed_scan_job_date_time: The time when the last scan job + was completed (success/cancelled/failed) on the appliance. + :type last_completed_scan_job_date_time: datetime + :ivar last_completed_download_job_date_time: The time when the last + Download job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_download_job_date_time: datetime + :ivar last_completed_install_job_date_time: The time when the last Install + job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_install_job_date_time: datetime + :ivar total_number_of_updates_available: The number of updates available + for the current device version as per the last device scan. + :vartype total_number_of_updates_available: int + :ivar total_number_of_updates_pending_download: The total number of items + pending download. + :vartype total_number_of_updates_pending_download: int + :ivar total_number_of_updates_pending_install: The total number of items + pending install. + :vartype total_number_of_updates_pending_install: int + :ivar reboot_behavior: Indicates if updates are available and at least one + of the updates needs a reboot. Possible values include: 'NeverReboots', + 'RequiresReboot', 'RequestReboot' + :vartype reboot_behavior: str or + ~azure.mgmt.databoxedge.models.InstallRebootBehavior + :ivar ongoing_update_operation: The current update operation. Possible + values include: 'None', 'Scan', 'Download', 'Install' + :vartype ongoing_update_operation: str or + ~azure.mgmt.databoxedge.models.UpdateOperation + :ivar in_progress_download_job_id: The job ID of the download job in + progress. + :vartype in_progress_download_job_id: str + :ivar in_progress_install_job_id: The job ID of the install job in + progress. + :vartype in_progress_install_job_id: str + :ivar in_progress_download_job_started_date_time: The time when the + currently running download (if any) started. + :vartype in_progress_download_job_started_date_time: datetime + :ivar in_progress_install_job_started_date_time: The time when the + currently running install (if any) started. + :vartype in_progress_install_job_started_date_time: datetime + :ivar update_titles: The list of updates available for install. + :vartype update_titles: list[str] + :ivar total_update_size_in_bytes: The total size of updates available for + download in bytes. + :vartype total_update_size_in_bytes: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_completed_download_job_date_time': {'readonly': True}, + 'last_completed_install_job_date_time': {'readonly': True}, + 'total_number_of_updates_available': {'readonly': True}, + 'total_number_of_updates_pending_download': {'readonly': True}, + 'total_number_of_updates_pending_install': {'readonly': True}, + 'reboot_behavior': {'readonly': True}, + 'ongoing_update_operation': {'readonly': True}, + 'in_progress_download_job_id': {'readonly': True}, + 'in_progress_install_job_id': {'readonly': True}, + 'in_progress_download_job_started_date_time': {'readonly': True}, + 'in_progress_install_job_started_date_time': {'readonly': True}, + 'update_titles': {'readonly': True}, + 'total_update_size_in_bytes': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_version_number': {'key': 'properties.deviceVersionNumber', 'type': 'str'}, + 'friendly_device_version_name': {'key': 'properties.friendlyDeviceVersionName', 'type': 'str'}, + 'device_last_scanned_date_time': {'key': 'properties.deviceLastScannedDateTime', 'type': 'iso-8601'}, + 'last_completed_scan_job_date_time': {'key': 'properties.lastCompletedScanJobDateTime', 'type': 'iso-8601'}, + 'last_completed_download_job_date_time': {'key': 'properties.lastCompletedDownloadJobDateTime', 'type': 'iso-8601'}, + 'last_completed_install_job_date_time': {'key': 'properties.lastCompletedInstallJobDateTime', 'type': 'iso-8601'}, + 'total_number_of_updates_available': {'key': 'properties.totalNumberOfUpdatesAvailable', 'type': 'int'}, + 'total_number_of_updates_pending_download': {'key': 'properties.totalNumberOfUpdatesPendingDownload', 'type': 'int'}, + 'total_number_of_updates_pending_install': {'key': 'properties.totalNumberOfUpdatesPendingInstall', 'type': 'int'}, + 'reboot_behavior': {'key': 'properties.rebootBehavior', 'type': 'str'}, + 'ongoing_update_operation': {'key': 'properties.ongoingUpdateOperation', 'type': 'str'}, + 'in_progress_download_job_id': {'key': 'properties.inProgressDownloadJobId', 'type': 'str'}, + 'in_progress_install_job_id': {'key': 'properties.inProgressInstallJobId', 'type': 'str'}, + 'in_progress_download_job_started_date_time': {'key': 'properties.inProgressDownloadJobStartedDateTime', 'type': 'iso-8601'}, + 'in_progress_install_job_started_date_time': {'key': 'properties.inProgressInstallJobStartedDateTime', 'type': 'iso-8601'}, + 'update_titles': {'key': 'properties.updateTitles', 'type': '[str]'}, + 'total_update_size_in_bytes': {'key': 'properties.totalUpdateSizeInBytes', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(UpdateSummary, self).__init__(**kwargs) + self.device_version_number = kwargs.get('device_version_number', None) + self.friendly_device_version_name = kwargs.get('friendly_device_version_name', None) + self.device_last_scanned_date_time = kwargs.get('device_last_scanned_date_time', None) + self.last_completed_scan_job_date_time = kwargs.get('last_completed_scan_job_date_time', None) + self.last_completed_download_job_date_time = None + self.last_completed_install_job_date_time = None + self.total_number_of_updates_available = None + self.total_number_of_updates_pending_download = None + self.total_number_of_updates_pending_install = None + self.reboot_behavior = None + self.ongoing_update_operation = None + self.in_progress_download_job_id = None + self.in_progress_install_job_id = None + self.in_progress_download_job_started_date_time = None + self.in_progress_install_job_started_date_time = None + self.update_titles = None + self.total_update_size_in_bytes = None + + +class UploadCertificateRequest(Model): + """The upload certificate request. + + All required parameters must be populated in order to send to Azure. + + :param authentication_type: The authentication type. Possible values + include: 'Invalid', 'AzureActiveDirectory' + :type authentication_type: str or + ~azure.mgmt.databoxedge.models.AuthenticationType + :param certificate: Required. The base64 encoded certificate raw data. + :type certificate: str + """ + + _validation = { + 'certificate': {'required': True}, + } + + _attribute_map = { + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'str'}, + 'certificate': {'key': 'properties.certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UploadCertificateRequest, self).__init__(**kwargs) + self.authentication_type = kwargs.get('authentication_type', None) + self.certificate = kwargs.get('certificate', None) + + +class UploadCertificateResponse(Model): + """The upload registration certificate response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param auth_type: Specifies authentication type. Possible values include: + 'Invalid', 'AzureActiveDirectory' + :type auth_type: str or ~azure.mgmt.databoxedge.models.AuthenticationType + :ivar resource_id: The resource ID of the Data Box Edge/Gateway device. + :vartype resource_id: str + :ivar aad_authority: Azure Active Directory tenant authority. + :vartype aad_authority: str + :ivar aad_tenant_id: Azure Active Directory tenant ID. + :vartype aad_tenant_id: str + :ivar service_principal_client_id: Azure Active Directory service + principal client ID. + :vartype service_principal_client_id: str + :ivar service_principal_object_id: Azure Active Directory service + principal object ID. + :vartype service_principal_object_id: str + :ivar azure_management_endpoint_audience: The azure management endpoint + audience. + :vartype azure_management_endpoint_audience: str + :ivar aad_audience: Identifier of the target resource that is the + recipient of the requested token. + :vartype aad_audience: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'aad_authority': {'readonly': True}, + 'aad_tenant_id': {'readonly': True}, + 'service_principal_client_id': {'readonly': True}, + 'service_principal_object_id': {'readonly': True}, + 'azure_management_endpoint_audience': {'readonly': True}, + 'aad_audience': {'readonly': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'aad_authority': {'key': 'aadAuthority', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, + 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UploadCertificateResponse, self).__init__(**kwargs) + self.auth_type = kwargs.get('auth_type', None) + self.resource_id = None + self.aad_authority = None + self.aad_tenant_id = None + self.service_principal_client_id = None + self.service_principal_object_id = None + self.azure_management_endpoint_audience = None + self.aad_audience = None + + +class User(ARMBaseModel): + """Represents a user who has access to one or more shares on the Data Box + Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: User in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param encrypted_password: The password details. + :type encrypted_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :ivar share_access_rights: List of shares that the user has rights on. + This field should not be specified during user creation. + :vartype share_access_rights: + list[~azure.mgmt.databoxedge.models.ShareAccessRight] + :param user_type: Required. Type of the user. Possible values include: + 'Share', 'LocalManagement', 'ARM' + :type user_type: str or ~azure.mgmt.databoxedge.models.UserType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_access_rights': {'readonly': True}, + 'user_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'encrypted_password': {'key': 'properties.encryptedPassword', 'type': 'AsymmetricEncryptedSecret'}, + 'share_access_rights': {'key': 'properties.shareAccessRights', 'type': '[ShareAccessRight]'}, + 'user_type': {'key': 'properties.userType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.encrypted_password = kwargs.get('encrypted_password', None) + self.share_access_rights = None + self.user_type = kwargs.get('user_type', None) + + +class UserAccessRight(Model): + """The mapping between a particular user and the access type on the SMB share. + + All required parameters must be populated in order to send to Azure. + + :param user_id: Required. User ID (already existing in the device). + :type user_id: str + :param access_type: Required. Type of access to be allowed for the user. + Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'user_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserAccessRight, self).__init__(**kwargs) + self.user_id = kwargs.get('user_id', None) + self.access_type = kwargs.get('access_type', None) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_models_py3.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_models_py3.py new file mode 100644 index 000000000000..f7168de87cf5 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_models_py3.py @@ -0,0 +1,4556 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ARMBaseModel(Model): + """Represents the base class for all object models. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ARMBaseModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Addon(ARMBaseModel): + """Role Addon. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ArcAddon, IoTAddon + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ArcForKubernetes': 'ArcAddon', 'IotEdge': 'IoTAddon'} + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Addon, self).__init__(**kwargs) + self.system_data = system_data + self.kind = None + self.kind = 'Addon' + + +class Address(Model): + """The shipping address of the customer. + + All required parameters must be populated in order to send to Azure. + + :param address_line1: The address line1. + :type address_line1: str + :param address_line2: The address line2. + :type address_line2: str + :param address_line3: The address line3. + :type address_line3: str + :param postal_code: The postal code. + :type postal_code: str + :param city: The city name. + :type city: str + :param state: The state name. + :type state: str + :param country: Required. The country name. + :type country: str + """ + + _validation = { + 'country': {'required': True}, + } + + _attribute_map = { + 'address_line1': {'key': 'addressLine1', 'type': 'str'}, + 'address_line2': {'key': 'addressLine2', 'type': 'str'}, + 'address_line3': {'key': 'addressLine3', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__(self, *, country: str, address_line1: str=None, address_line2: str=None, address_line3: str=None, postal_code: str=None, city: str=None, state: str=None, **kwargs) -> None: + super(Address, self).__init__(**kwargs) + self.address_line1 = address_line1 + self.address_line2 = address_line2 + self.address_line3 = address_line3 + self.postal_code = postal_code + self.city = city + self.state = state + self.country = country + + +class Alert(ARMBaseModel): + """Alert on the data box edge/gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Alert generated in the resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar title: Alert title. + :vartype title: str + :ivar alert_type: Alert type. + :vartype alert_type: str + :ivar appeared_at_date_time: UTC time when the alert appeared. + :vartype appeared_at_date_time: datetime + :ivar recommendation: Alert recommendation. + :vartype recommendation: str + :ivar severity: Severity of the alert. Possible values include: + 'Informational', 'Warning', 'Critical' + :vartype severity: str or ~azure.mgmt.databoxedge.models.AlertSeverity + :ivar error_details: Error details of the alert. + :vartype error_details: ~azure.mgmt.databoxedge.models.AlertErrorDetails + :ivar detailed_information: Alert details. + :vartype detailed_information: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'appeared_at_date_time': {'readonly': True}, + 'recommendation': {'readonly': True}, + 'severity': {'readonly': True}, + 'error_details': {'readonly': True}, + 'detailed_information': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'appeared_at_date_time': {'key': 'properties.appearedAtDateTime', 'type': 'iso-8601'}, + 'recommendation': {'key': 'properties.recommendation', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'error_details': {'key': 'properties.errorDetails', 'type': 'AlertErrorDetails'}, + 'detailed_information': {'key': 'properties.detailedInformation', 'type': '{str}'}, + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.system_data = system_data + self.title = None + self.alert_type = None + self.appeared_at_date_time = None + self.recommendation = None + self.severity = None + self.error_details = None + self.detailed_information = None + + +class AlertErrorDetails(Model): + """Error details for the alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_code: Error code. + :vartype error_code: str + :ivar error_message: Error Message. + :vartype error_message: str + :ivar occurrences: Number of occurrences. + :vartype occurrences: int + """ + + _validation = { + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'occurrences': {'readonly': True}, + } + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'occurrences': {'key': 'occurrences', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(AlertErrorDetails, self).__init__(**kwargs) + self.error_code = None + self.error_message = None + self.occurrences = None + + +class ArcAddon(Addon): + """Arc Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param subscription_id: Required. Arc resource subscription Id + :type subscription_id: str + :param resource_group_name: Required. Arc resource group name + :type resource_group_name: str + :param resource_name: Required. Arc resource Name + :type resource_name: str + :param resource_location: Required. Arc resource location + :type resource_location: str + :ivar version: Arc resource version + :vartype version: str + :ivar host_platform: Host OS supported by the Arc addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'subscription_id': {'required': True}, + 'resource_group_name': {'required': True}, + 'resource_name': {'required': True}, + 'resource_location': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'properties.resourceGroupName', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, subscription_id: str, resource_group_name: str, resource_name: str, resource_location: str, system_data=None, **kwargs) -> None: + super(ArcAddon, self).__init__(system_data=system_data, **kwargs) + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.resource_name = resource_name + self.resource_location = resource_location + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'ArcForKubernetes' + + +class AsymmetricEncryptedSecret(Model): + """Represent the secrets intended for encryption with asymmetric key pair. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. The value of the secret. + :type value: str + :param encryption_cert_thumbprint: Thumbprint certificate used to encrypt + \\"Value\\". If the value is unencrypted, it will be null. + :type encryption_cert_thumbprint: str + :param encryption_algorithm: Required. The algorithm used to encrypt + "Value". Possible values include: 'None', 'AES256', 'RSAES_PKCS1_v_1_5' + :type encryption_algorithm: str or + ~azure.mgmt.databoxedge.models.EncryptionAlgorithm + """ + + _validation = { + 'value': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'encryption_cert_thumbprint': {'key': 'encryptionCertThumbprint', 'type': 'str'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + } + + def __init__(self, *, value: str, encryption_algorithm, encryption_cert_thumbprint: str=None, **kwargs) -> None: + super(AsymmetricEncryptedSecret, self).__init__(**kwargs) + self.value = value + self.encryption_cert_thumbprint = encryption_cert_thumbprint + self.encryption_algorithm = encryption_algorithm + + +class Authentication(Model): + """Authentication mechanism for IoT devices. + + :param symmetric_key: Symmetric key for authentication. + :type symmetric_key: ~azure.mgmt.databoxedge.models.SymmetricKey + """ + + _attribute_map = { + 'symmetric_key': {'key': 'symmetricKey', 'type': 'SymmetricKey'}, + } + + def __init__(self, *, symmetric_key=None, **kwargs) -> None: + super(Authentication, self).__init__(**kwargs) + self.symmetric_key = symmetric_key + + +class AzureContainerInfo(Model): + """Azure container mapping of the endpoint. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_credential_id: Required. ID of the storage account + credential used to access storage. + :type storage_account_credential_id: str + :param container_name: Required. Container name (Based on the data format + specified, this represents the name of Azure Files/Page blob/Block blob). + :type container_name: str + :param data_format: Required. Storage format used for the file represented + by the share. Possible values include: 'BlockBlob', 'PageBlob', + 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + """ + + _validation = { + 'storage_account_credential_id': {'required': True}, + 'container_name': {'required': True}, + 'data_format': {'required': True}, + } + + _attribute_map = { + 'storage_account_credential_id': {'key': 'storageAccountCredentialId', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'data_format': {'key': 'dataFormat', 'type': 'str'}, + } + + def __init__(self, *, storage_account_credential_id: str, container_name: str, data_format, **kwargs) -> None: + super(AzureContainerInfo, self).__init__(**kwargs) + self.storage_account_credential_id = storage_account_credential_id + self.container_name = container_name + self.data_format = data_format + + +class BandwidthSchedule(ARMBaseModel): + """The bandwidth schedule details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Bandwidth object related to ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param start: Required. The start time of the schedule in UTC. + :type start: str + :param stop: Required. The stop time of the schedule in UTC. + :type stop: str + :param rate_in_mbps: Required. The bandwidth rate in Mbps. + :type rate_in_mbps: int + :param days: Required. The days of the week when this schedule is + applicable. + :type days: list[str or ~azure.mgmt.databoxedge.models.DayOfWeek] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start': {'required': True}, + 'stop': {'required': True}, + 'rate_in_mbps': {'required': True}, + 'days': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'start': {'key': 'properties.start', 'type': 'str'}, + 'stop': {'key': 'properties.stop', 'type': 'str'}, + 'rate_in_mbps': {'key': 'properties.rateInMbps', 'type': 'int'}, + 'days': {'key': 'properties.days', 'type': '[str]'}, + } + + def __init__(self, *, start: str, stop: str, rate_in_mbps: int, days, system_data=None, **kwargs) -> None: + super(BandwidthSchedule, self).__init__(**kwargs) + self.system_data = system_data + self.start = start + self.stop = stop + self.rate_in_mbps = rate_in_mbps + self.days = days + + +class ClientAccessRight(Model): + """The mapping between a particular client IP and the type of access client + has on the NFS share. + + All required parameters must be populated in order to send to Azure. + + :param client: Required. IP of the client. + :type client: str + :param access_permission: Required. Type of access to be allowed for the + client. Possible values include: 'NoAccess', 'ReadOnly', 'ReadWrite' + :type access_permission: str or + ~azure.mgmt.databoxedge.models.ClientPermissionType + """ + + _validation = { + 'client': {'required': True}, + 'access_permission': {'required': True}, + } + + _attribute_map = { + 'client': {'key': 'client', 'type': 'str'}, + 'access_permission': {'key': 'accessPermission', 'type': 'str'}, + } + + def __init__(self, *, client: str, access_permission, **kwargs) -> None: + super(ClientAccessRight, self).__init__(**kwargs) + self.client = client + self.access_permission = access_permission + + +class Role(ARMBaseModel): + """Compute role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CloudEdgeManagementRole, IoTRole, KubernetesRole, MECRole + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CloudEdgeManagement': 'CloudEdgeManagementRole', 'IOT': 'IoTRole', 'Kubernetes': 'KubernetesRole', 'MEC': 'MECRole'} + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Role, self).__init__(**kwargs) + self.system_data = system_data + self.kind = None + self.kind = 'Role' + + +class CloudEdgeManagementRole(Role): + """CloudEdgeManagementRole role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :ivar local_management_status: Local Edge Management Status. Possible + values include: 'Enabled', 'Disabled' + :vartype local_management_status: str or + ~azure.mgmt.databoxedge.models.RoleStatus + :ivar edge_profile: Edge Profile of the resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'local_management_status': {'readonly': True}, + 'edge_profile': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'local_management_status': {'key': 'properties.localManagementStatus', 'type': 'str'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, role_status, system_data=None, **kwargs) -> None: + super(CloudEdgeManagementRole, self).__init__(system_data=system_data, **kwargs) + self.local_management_status = None + self.edge_profile = None + self.role_status = role_status + self.kind = 'CloudEdgeManagement' + + +class CloudError(Model): + """An error response from the service. + + :param error: The error details. + :type error: ~azure.mgmt.databoxedge.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.databoxedge.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class CniConfig(Model): + """Cni configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Cni type + :vartype type: str + :ivar version: Cni version + :vartype version: str + :ivar pod_subnet: Pod Subnet + :vartype pod_subnet: str + :ivar service_subnet: Service subnet + :vartype service_subnet: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + 'pod_subnet': {'readonly': True}, + 'service_subnet': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'pod_subnet': {'key': 'podSubnet', 'type': 'str'}, + 'service_subnet': {'key': 'serviceSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CniConfig, self).__init__(**kwargs) + self.type = None + self.version = None + self.pod_subnet = None + self.service_subnet = None + + +class ComputeResource(Model): + """Compute infrastructure Resource. + + All required parameters must be populated in order to send to Azure. + + :param processor_count: Required. Processor count + :type processor_count: int + :param memory_in_gb: Required. Memory in GB + :type memory_in_gb: long + """ + + _validation = { + 'processor_count': {'required': True}, + 'memory_in_gb': {'required': True}, + } + + _attribute_map = { + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'long'}, + } + + def __init__(self, *, processor_count: int, memory_in_gb: int, **kwargs) -> None: + super(ComputeResource, self).__init__(**kwargs) + self.processor_count = processor_count + self.memory_in_gb = memory_in_gb + + +class ContactDetails(Model): + """Contains all the contact details of the customer. + + All required parameters must be populated in order to send to Azure. + + :param contact_person: Required. The contact person name. + :type contact_person: str + :param company_name: Required. The name of the company. + :type company_name: str + :param phone: Required. The phone number. + :type phone: str + :param email_list: Required. The email list. + :type email_list: list[str] + """ + + _validation = { + 'contact_person': {'required': True}, + 'company_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_person': {'key': 'contactPerson', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + } + + def __init__(self, *, contact_person: str, company_name: str, phone: str, email_list, **kwargs) -> None: + super(ContactDetails, self).__init__(**kwargs) + self.contact_person = contact_person + self.company_name = company_name + self.phone = phone + self.email_list = email_list + + +class Container(ARMBaseModel): + """Represents a container on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Container in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar container_status: Current status of the container. Possible values + include: 'OK', 'Offline', 'Unknown', 'Updating', 'NeedsAttention' + :vartype container_status: str or + ~azure.mgmt.databoxedge.models.ContainerStatus + :param data_format: Required. DataFormat for Container. Possible values + include: 'BlockBlob', 'PageBlob', 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + :ivar refresh_details: Details of the refresh job on this container. + :vartype refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar created_date_time: The UTC time when container got created. + :vartype created_date_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'container_status': {'readonly': True}, + 'data_format': {'required': True}, + 'refresh_details': {'readonly': True}, + 'created_date_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'container_status': {'key': 'properties.containerStatus', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, data_format, system_data=None, **kwargs) -> None: + super(Container, self).__init__(**kwargs) + self.system_data = system_data + self.container_status = None + self.data_format = data_format + self.refresh_details = None + self.created_date_time = None + + +class DataBoxEdgeDevice(ARMBaseModel): + """The Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param location: Required. The location of the device. This is a supported + and registered Azure geographical region (for example, West US, East US, + or Southeast Asia). The geographical region of a device cannot be changed + once it is created, but if an identical geographical region is specified + on update, the request will succeed. + :type location: str + :param tags: The list of tags that describe the device. These tags can be + used to view and group this device (across resource groups). + :type tags: dict[str, str] + :param sku: The SKU type. + :type sku: ~azure.mgmt.databoxedge.models.Sku + :param etag: The etag for the devices. + :type etag: str + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :ivar kind: The etag for the devices. Possible values include: + 'AzureDataBoxGateway', 'AzureStackEdge', 'AzureStackHub', + 'AzureModularDataCentre' + :vartype kind: str or ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceKind + :param system_data: DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param data_box_edge_device_status: The status of the Data Box + Edge/Gateway device. Possible values include: 'ReadyToSetup', 'Online', + 'Offline', 'NeedsAttention', 'Disconnected', 'PartiallyDisconnected', + 'Maintenance' + :type data_box_edge_device_status: str or + ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceStatus + :ivar serial_number: The Serial Number of Data Box Edge/Gateway device. + :vartype serial_number: str + :ivar description: The Description of the Data Box Edge/Gateway device. + :vartype description: str + :ivar model_description: The description of the Data Box Edge/Gateway + device model. + :vartype model_description: str + :ivar device_type: The type of the Data Box Edge/Gateway device. Possible + values include: 'DataBoxEdgeDevice' + :vartype device_type: str or ~azure.mgmt.databoxedge.models.DeviceType + :ivar friendly_name: The Data Box Edge/Gateway device name. + :vartype friendly_name: str + :ivar culture: The Data Box Edge/Gateway device culture. + :vartype culture: str + :ivar device_model: The Data Box Edge/Gateway device model. + :vartype device_model: str + :ivar device_software_version: The Data Box Edge/Gateway device software + version. + :vartype device_software_version: str + :ivar device_local_capacity: The Data Box Edge/Gateway device local + capacity in MB. + :vartype device_local_capacity: long + :ivar time_zone: The Data Box Edge/Gateway device timezone. + :vartype time_zone: str + :ivar device_hcs_version: The device software version number of the device + (eg: 1.2.18105.6). + :vartype device_hcs_version: str + :ivar configured_role_types: Type of compute roles configured. + :vartype configured_role_types: list[str or + ~azure.mgmt.databoxedge.models.RoleTypes] + :ivar node_count: The number of nodes in the cluster. + :vartype node_count: int + :ivar resource_move_details: The details of the move operation on this + resource. + :vartype resource_move_details: + ~azure.mgmt.databoxedge.models.ResourceMoveDetails + :ivar edge_profile: The details of Edge Profile for this resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'description': {'readonly': True}, + 'model_description': {'readonly': True}, + 'device_type': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'culture': {'readonly': True}, + 'device_model': {'readonly': True}, + 'device_software_version': {'readonly': True}, + 'device_local_capacity': {'readonly': True}, + 'time_zone': {'readonly': True}, + 'device_hcs_version': {'readonly': True}, + 'configured_role_types': {'readonly': True}, + 'node_count': {'readonly': True}, + 'resource_move_details': {'readonly': True}, + 'edge_profile': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'data_box_edge_device_status': {'key': 'properties.dataBoxEdgeDeviceStatus', 'type': 'str'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'model_description': {'key': 'properties.modelDescription', 'type': 'str'}, + 'device_type': {'key': 'properties.deviceType', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'culture': {'key': 'properties.culture', 'type': 'str'}, + 'device_model': {'key': 'properties.deviceModel', 'type': 'str'}, + 'device_software_version': {'key': 'properties.deviceSoftwareVersion', 'type': 'str'}, + 'device_local_capacity': {'key': 'properties.deviceLocalCapacity', 'type': 'long'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'device_hcs_version': {'key': 'properties.deviceHcsVersion', 'type': 'str'}, + 'configured_role_types': {'key': 'properties.configuredRoleTypes', 'type': '[str]'}, + 'node_count': {'key': 'properties.nodeCount', 'type': 'int'}, + 'resource_move_details': {'key': 'properties.resourceMoveDetails', 'type': 'ResourceMoveDetails'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, etag: str=None, identity=None, system_data=None, data_box_edge_device_status=None, **kwargs) -> None: + super(DataBoxEdgeDevice, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.sku = sku + self.etag = etag + self.identity = identity + self.kind = None + self.system_data = system_data + self.data_box_edge_device_status = data_box_edge_device_status + self.serial_number = None + self.description = None + self.model_description = None + self.device_type = None + self.friendly_name = None + self.culture = None + self.device_model = None + self.device_software_version = None + self.device_local_capacity = None + self.time_zone = None + self.device_hcs_version = None + self.configured_role_types = None + self.node_count = None + self.resource_move_details = None + self.edge_profile = None + + +class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel): + """The extended Info of the Data Box Edge/Gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param encryption_key_thumbprint: The digital signature of encrypted + certificate. + :type encryption_key_thumbprint: str + :param encryption_key: The public part of the encryption certificate. + Client uses this to encrypt any secret. + :type encryption_key: str + :ivar resource_key: The Resource ID of the Resource. + :vartype resource_key: str + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + :param key_vault_sync_status: Key vault sync status. Possible values + include: 'KeyVaultSynced', 'KeyVaultSyncFailed', 'KeyVaultNotConfigured', + 'KeyVaultSyncPending', 'KeyVaultSyncing' + :type key_vault_sync_status: str or + ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus + :ivar device_secrets: Device secrets, will be returned only with + ODataFilter $expand=deviceSecrets + :vartype device_secrets: ~azure.mgmt.databoxedge.models.DeviceSecrets + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_key': {'readonly': True}, + 'device_secrets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'}, + 'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'}, + 'resource_key': {'key': 'properties.resourceKey', 'type': 'str'}, + 'client_secret_store_id': {'key': 'properties.clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'properties.clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'properties.channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'properties.channelIntegrityKeyVersion', 'type': 'str'}, + 'key_vault_sync_status': {'key': 'properties.keyVaultSyncStatus', 'type': 'str'}, + 'device_secrets': {'key': 'properties.deviceSecrets', 'type': 'DeviceSecrets'}, + } + + def __init__(self, *, encryption_key_thumbprint: str=None, encryption_key: str=None, client_secret_store_id: str=None, client_secret_store_url: str=None, channel_integrity_key_name: str=None, channel_integrity_key_version: str=None, key_vault_sync_status=None, **kwargs) -> None: + super(DataBoxEdgeDeviceExtendedInfo, self).__init__(**kwargs) + self.encryption_key_thumbprint = encryption_key_thumbprint + self.encryption_key = encryption_key + self.resource_key = None + self.client_secret_store_id = client_secret_store_id + self.client_secret_store_url = client_secret_store_url + self.channel_integrity_key_name = channel_integrity_key_name + self.channel_integrity_key_version = channel_integrity_key_version + self.key_vault_sync_status = key_vault_sync_status + self.device_secrets = None + + +class DataBoxEdgeDeviceExtendedInfoPatch(Model): + """The Data Box Edge/Gateway device extended info patch. + + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name for Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + :param sync_status: For changing or to initiate the resync to key-vault + set the status to KeyVaultSyncPending, rest of the status will not be + applicable. Possible values include: 'KeyVaultSynced', + 'KeyVaultSyncFailed', 'KeyVaultNotConfigured', 'KeyVaultSyncPending', + 'KeyVaultSyncing' + :type sync_status: str or + ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus + """ + + _attribute_map = { + 'client_secret_store_id': {'key': 'clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'channelIntegrityKeyVersion', 'type': 'str'}, + 'sync_status': {'key': 'syncStatus', 'type': 'str'}, + } + + def __init__(self, *, client_secret_store_id: str=None, client_secret_store_url: str=None, channel_integrity_key_name: str=None, channel_integrity_key_version: str=None, sync_status=None, **kwargs) -> None: + super(DataBoxEdgeDeviceExtendedInfoPatch, self).__init__(**kwargs) + self.client_secret_store_id = client_secret_store_id + self.client_secret_store_url = client_secret_store_url + self.channel_integrity_key_name = channel_integrity_key_name + self.channel_integrity_key_version = channel_integrity_key_version + self.sync_status = sync_status + + +class DataBoxEdgeDevicePatch(Model): + """The Data Box Edge/Gateway device patch. + + :param tags: The tags attached to the Data Box Edge/Gateway resource. + :type tags: dict[str, str] + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :param edge_profile: Edge Profile property of the Data Box Edge/Gateway + device + :type edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfilePatch + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfilePatch'}, + } + + def __init__(self, *, tags=None, identity=None, edge_profile=None, **kwargs) -> None: + super(DataBoxEdgeDevicePatch, self).__init__(**kwargs) + self.tags = tags + self.identity = identity + self.edge_profile = edge_profile + + +class DataBoxEdgeMoveRequest(Model): + """Resource Move details. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_group: Required. Target resource group ARMId + :type target_resource_group: str + :param resources: Required. List of resources to be moved + :type resources: list[str] + """ + + _validation = { + 'target_resource_group': {'required': True}, + 'resources': {'required': True}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + } + + def __init__(self, *, target_resource_group: str, resources, **kwargs) -> None: + super(DataBoxEdgeMoveRequest, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources + + +class DataBoxEdgeSku(Model): + """The Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar name: The Sku name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC' + :vartype name: str or ~azure.mgmt.databoxedge.models.SkuName + :ivar kind: The Sku kind. + :vartype kind: str + :ivar tier: The Sku tier. Possible values include: 'Standard' + :vartype tier: str or ~azure.mgmt.databoxedge.models.SkuTier + :ivar size: The Sku kind. + :vartype size: str + :ivar family: The Sku family. + :vartype family: str + :ivar locations: Availability of the Sku for the region. + :vartype locations: list[str] + :ivar api_versions: The API versions in which Sku is available. + :vartype api_versions: list[str] + :ivar location_info: Availability of the Sku for the location/zone/site. + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar signup_option: Sku can be signed up by customer or not. Possible + values include: 'None', 'Available' + :vartype signup_option: str or + ~azure.mgmt.databoxedge.models.SkuSignupOption + :ivar version: Availability of the Sku as preview/stable. Possible values + include: 'Stable', 'Preview' + :vartype version: str or ~azure.mgmt.databoxedge.models.SkuVersion + :ivar availability: Links to the next set of results. Possible values + include: 'Available', 'Unavailable' + :vartype availability: str or + ~azure.mgmt.databoxedge.models.SkuAvailability + :ivar shipment_types: List of Shipment Types supported by this SKU + :vartype shipment_types: list[str or + ~azure.mgmt.databoxedge.models.ShipmentType] + :ivar capabilities: The capability info of the SKU. + :vartype capabilities: list[~azure.mgmt.databoxedge.models.SkuCapability] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'locations': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'location_info': {'readonly': True}, + 'costs': {'readonly': True}, + 'signup_option': {'readonly': True}, + 'version': {'readonly': True}, + 'availability': {'readonly': True}, + 'shipment_types': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'signup_option': {'key': 'signupOption', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'availability': {'key': 'availability', 'type': 'str'}, + 'shipment_types': {'key': 'shipmentTypes', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SkuCapability]'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxEdgeSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.kind = None + self.tier = None + self.size = None + self.family = None + self.locations = None + self.api_versions = None + self.location_info = None + self.costs = None + self.signup_option = None + self.version = None + self.availability = None + self.shipment_types = None + self.capabilities = None + + +class DCAccessCode(Model): + """DC Access code in the case of Self Managed Shipping. + + :param auth_code: DCAccess Code for the Self Managed shipment. + :type auth_code: str + """ + + _attribute_map = { + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, auth_code: str=None, **kwargs) -> None: + super(DCAccessCode, self).__init__(**kwargs) + self.auth_code = auth_code + + +class DeviceSecrets(Model): + """Device Secrets. + + :param hcs_data_volume_bit_locker_external_key: Keyvault Id of + HcsDataVolumeBitLockerExternalKey + :type hcs_data_volume_bit_locker_external_key: + ~azure.mgmt.databoxedge.models.Secret + :param hcs_internal_volume_bit_locker_external_key: Keyvault Id of + HcsInternalVolumeBitLockerExternalKey + :type hcs_internal_volume_bit_locker_external_key: + ~azure.mgmt.databoxedge.models.Secret + :param system_volume_bit_locker_recovery_key: Keyvault Id of + SystemVolumeBitLockerRecoveryKey + :type system_volume_bit_locker_recovery_key: + ~azure.mgmt.databoxedge.models.Secret + :param sed_encryption_external_key_id: Keyvault Id of + SEDEncryptionExternalKeyId + :type sed_encryption_external_key_id: + ~azure.mgmt.databoxedge.models.Secret + :param sed_encryption_external_key: Keyvault Id of + SEDEncryptionExternalKey + :type sed_encryption_external_key: ~azure.mgmt.databoxedge.models.Secret + :param bmc_default_user_password: Keyvault Id of BMCDefaultUserPassword + :type bmc_default_user_password: ~azure.mgmt.databoxedge.models.Secret + :param rotate_key_for_data_volume_bitlocker: Keyvault Id of + RotateKeyForDataVolumeBitlocker + :type rotate_key_for_data_volume_bitlocker: + ~azure.mgmt.databoxedge.models.Secret + :param rotate_keys_for_sed_drives_serialized: Keyvault Id of + RotateKeysForSedDrivesSerialized + :type rotate_keys_for_sed_drives_serialized: + ~azure.mgmt.databoxedge.models.Secret + """ + + _attribute_map = { + 'hcs_data_volume_bit_locker_external_key': {'key': 'hcsDataVolumeBitLockerExternalKey', 'type': 'Secret'}, + 'hcs_internal_volume_bit_locker_external_key': {'key': 'hcsInternalVolumeBitLockerExternalKey', 'type': 'Secret'}, + 'system_volume_bit_locker_recovery_key': {'key': 'systemVolumeBitLockerRecoveryKey', 'type': 'Secret'}, + 'sed_encryption_external_key_id': {'key': 'sedEncryptionExternalKeyId', 'type': 'Secret'}, + 'sed_encryption_external_key': {'key': 'sedEncryptionExternalKey', 'type': 'Secret'}, + 'bmc_default_user_password': {'key': 'bmcDefaultUserPassword', 'type': 'Secret'}, + 'rotate_key_for_data_volume_bitlocker': {'key': 'rotateKeyForDataVolumeBitlocker', 'type': 'Secret'}, + 'rotate_keys_for_sed_drives_serialized': {'key': 'rotateKeysForSedDrivesSerialized', 'type': 'Secret'}, + } + + def __init__(self, *, hcs_data_volume_bit_locker_external_key=None, hcs_internal_volume_bit_locker_external_key=None, system_volume_bit_locker_recovery_key=None, sed_encryption_external_key_id=None, sed_encryption_external_key=None, bmc_default_user_password=None, rotate_key_for_data_volume_bitlocker=None, rotate_keys_for_sed_drives_serialized=None, **kwargs) -> None: + super(DeviceSecrets, self).__init__(**kwargs) + self.hcs_data_volume_bit_locker_external_key = hcs_data_volume_bit_locker_external_key + self.hcs_internal_volume_bit_locker_external_key = hcs_internal_volume_bit_locker_external_key + self.system_volume_bit_locker_recovery_key = system_volume_bit_locker_recovery_key + self.sed_encryption_external_key_id = sed_encryption_external_key_id + self.sed_encryption_external_key = sed_encryption_external_key + self.bmc_default_user_password = bmc_default_user_password + self.rotate_key_for_data_volume_bitlocker = rotate_key_for_data_volume_bitlocker + self.rotate_keys_for_sed_drives_serialized = rotate_keys_for_sed_drives_serialized + + +class EdgeProfile(Model): + """Details about Edge Profile for the resource. + + :param subscription: Edge Profile Subscription + :type subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscription + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscription'}, + } + + def __init__(self, *, subscription=None, **kwargs) -> None: + super(EdgeProfile, self).__init__(**kwargs) + self.subscription = subscription + + +class EdgeProfilePatch(Model): + """The Data Box Edge/Gateway Edge Profile patch. + + :param subscription: The Data Box Edge/Gateway Edge Profile Subscription + patch + :type subscription: + ~azure.mgmt.databoxedge.models.EdgeProfileSubscriptionPatch + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscriptionPatch'}, + } + + def __init__(self, *, subscription=None, **kwargs) -> None: + super(EdgeProfilePatch, self).__init__(**kwargs) + self.subscription = subscription + + +class EdgeProfileSubscription(Model): + """Subscription details for the Edge Profile. + + :param registration_id: Edge Subscription Registration ID + :type registration_id: str + :param id: ARM ID of the subscription + :type id: str + :param state: Possible values include: 'Registered', 'Warned', + 'Suspended', 'Deleted', 'Unregistered' + :type state: str or ~azure.mgmt.databoxedge.models.SubscriptionState + :param registration_date: + :type registration_date: str + :param subscription_id: + :type subscription_id: str + :param tenant_id: + :type tenant_id: str + :param location_placement_id: + :type location_placement_id: str + :param quota_id: + :type quota_id: str + :param serialized_details: + :type serialized_details: str + :param registered_features: + :type registered_features: + list[~azure.mgmt.databoxedge.models.SubscriptionRegisteredFeatures] + """ + + _attribute_map = { + 'registration_id': {'key': 'registrationId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'registration_date': {'key': 'registrationDate', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'location_placement_id': {'key': 'properties.locationPlacementId', 'type': 'str'}, + 'quota_id': {'key': 'properties.quotaId', 'type': 'str'}, + 'serialized_details': {'key': 'properties.serializedDetails', 'type': 'str'}, + 'registered_features': {'key': 'properties.registeredFeatures', 'type': '[SubscriptionRegisteredFeatures]'}, + } + + def __init__(self, *, registration_id: str=None, id: str=None, state=None, registration_date: str=None, subscription_id: str=None, tenant_id: str=None, location_placement_id: str=None, quota_id: str=None, serialized_details: str=None, registered_features=None, **kwargs) -> None: + super(EdgeProfileSubscription, self).__init__(**kwargs) + self.registration_id = registration_id + self.id = id + self.state = state + self.registration_date = registration_date + self.subscription_id = subscription_id + self.tenant_id = tenant_id + self.location_placement_id = location_placement_id + self.quota_id = quota_id + self.serialized_details = serialized_details + self.registered_features = registered_features + + +class EdgeProfileSubscriptionPatch(Model): + """The Data Box Edge/Gateway Edge Profile Subscription patch. + + :param id: The path ID that uniquely identifies the subscription of the + edge profile. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(EdgeProfileSubscriptionPatch, self).__init__(**kwargs) + self.id = id + + +class EtcdInfo(Model): + """Etcd configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Etcd type + :vartype type: str + :ivar version: Etcd version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(EtcdInfo, self).__init__(**kwargs) + self.type = None + self.version = None + + +class Trigger(ARMBaseModel): + """Trigger details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FileEventTrigger, PeriodicTimerEventTrigger + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'FileEvent': 'FileEventTrigger', 'PeriodicTimerEvent': 'PeriodicTimerEventTrigger'} + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Trigger, self).__init__(**kwargs) + self.system_data = system_data + self.kind = None + self.kind = 'Trigger' + + +class FileEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. File event source details. + :type source_info: ~azure.mgmt.databoxedge.models.FileSourceInfo + :param sink_info: Required. Role sink info. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'FileSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, *, source_info, sink_info, system_data=None, custom_context_tag: str=None, **kwargs) -> None: + super(FileEventTrigger, self).__init__(system_data=system_data, **kwargs) + self.source_info = source_info + self.sink_info = sink_info + self.custom_context_tag = custom_context_tag + self.kind = 'FileEvent' + + +class FileSourceInfo(Model): + """File source details. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. File share ID. + :type share_id: str + """ + + _validation = { + 'share_id': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + } + + def __init__(self, *, share_id: str, **kwargs) -> None: + super(FileSourceInfo, self).__init__(**kwargs) + self.share_id = share_id + + +class GenerateCertResponse(Model): + """Used in activation key generation flow. + + :param public_key: Gets or sets base64 encoded certificate raw data, + this is the public part needed to be uploaded to cert vault + :type public_key: str + :param private_key: Gets or sets base64 encoded private part of the + certificate, + needed to form the activation key + :type private_key: str + :param expiry_time_in_utc: Gets or sets expiry time in UTC + :type expiry_time_in_utc: str + """ + + _attribute_map = { + 'public_key': {'key': 'publicKey', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'expiry_time_in_utc': {'key': 'expiryTimeInUTC', 'type': 'str'}, + } + + def __init__(self, *, public_key: str=None, private_key: str=None, expiry_time_in_utc: str=None, **kwargs) -> None: + super(GenerateCertResponse, self).__init__(**kwargs) + self.public_key = public_key + self.private_key = private_key + self.expiry_time_in_utc = expiry_time_in_utc + + +class ImageRepositoryCredential(Model): + """Image repository credential. + + All required parameters must be populated in order to send to Azure. + + :param image_repository_url: Required. Image repository url (e.g.: + mcr.microsoft.com). + :type image_repository_url: str + :param user_name: Required. Repository user name. + :type user_name: str + :param password: Repository user password. + :type password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'image_repository_url': {'required': True}, + 'user_name': {'required': True}, + } + + _attribute_map = { + 'image_repository_url': {'key': 'imageRepositoryUrl', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, *, image_repository_url: str, user_name: str, password=None, **kwargs) -> None: + super(ImageRepositoryCredential, self).__init__(**kwargs) + self.image_repository_url = image_repository_url + self.user_name = user_name + self.password = password + + +class IoTAddon(Addon): + """IoT Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param io_tdevice_details: Required. IoT device metadata to which + appliance needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + Addon needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :ivar version: Version of IoT running on the appliance. + :vartype version: str + :ivar host_platform: Host OS supported by the IoT addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, io_tdevice_details, io_tedge_device_details, system_data=None, **kwargs) -> None: + super(IoTAddon, self).__init__(system_data=system_data, **kwargs) + self.io_tdevice_details = io_tdevice_details + self.io_tedge_device_details = io_tedge_device_details + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'IotEdge' + + +class IoTDeviceInfo(Model): + """Metadata of IoT device/IoT Edge device to be configured. + + All required parameters must be populated in order to send to Azure. + + :param device_id: Required. ID of the IoT device/edge device. + :type device_id: str + :param io_thost_hub: Required. Host name for the IoT hub associated to the + device. + :type io_thost_hub: str + :param io_thost_hub_id: Id for the IoT hub associated to the device. + :type io_thost_hub_id: str + :param authentication: Encrypted IoT device/IoT edge device connection + string. + :type authentication: ~azure.mgmt.databoxedge.models.Authentication + """ + + _validation = { + 'device_id': {'required': True}, + 'io_thost_hub': {'required': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'io_thost_hub': {'key': 'ioTHostHub', 'type': 'str'}, + 'io_thost_hub_id': {'key': 'ioTHostHubId', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'Authentication'}, + } + + def __init__(self, *, device_id: str, io_thost_hub: str, io_thost_hub_id: str=None, authentication=None, **kwargs) -> None: + super(IoTDeviceInfo, self).__init__(**kwargs) + self.device_id = device_id + self.io_thost_hub = io_thost_hub + self.io_thost_hub_id = io_thost_hub_id + self.authentication = authentication + + +class IoTEdgeAgentInfo(Model): + """IoT edge agent details is optional, this will be used for download system + Agent module while bootstrapping IoT Role if specified. + + All required parameters must be populated in order to send to Azure. + + :param image_name: Required. Name of the IoT edge agent image. + :type image_name: str + :param tag: Required. Image Tag. + :type tag: str + :param image_repository: Image repository details. + :type image_repository: + ~azure.mgmt.databoxedge.models.ImageRepositoryCredential + """ + + _validation = { + 'image_name': {'required': True}, + 'tag': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'image_repository': {'key': 'imageRepository', 'type': 'ImageRepositoryCredential'}, + } + + def __init__(self, *, image_name: str, tag: str, image_repository=None, **kwargs) -> None: + super(IoTEdgeAgentInfo, self).__init__(**kwargs) + self.image_name = image_name + self.tag = tag + self.image_repository = image_repository + + +class IoTRole(Role): + """Compute role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the IoT role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :param io_tdevice_details: Required. IoT device metadata to which data box + edge device needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + role needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param share_mappings: Mount points of shares in role(s). + :type share_mappings: list[~azure.mgmt.databoxedge.models.MountPointMap] + :param io_tedge_agent_info: Iot edge agent details to download the agent + and bootstrap iot runtime. + :type io_tedge_agent_info: ~azure.mgmt.databoxedge.models.IoTEdgeAgentInfo + :ivar host_platform_type: Platform where the Iot runtime is hosted. + Possible values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param compute_resource: Resource allocation + :type compute_resource: ~azure.mgmt.databoxedge.models.ComputeResource + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'host_platform_type': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'io_tedge_agent_info': {'key': 'properties.ioTEdgeAgentInfo', 'type': 'IoTEdgeAgentInfo'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'compute_resource': {'key': 'properties.computeResource', 'type': 'ComputeResource'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, host_platform, io_tdevice_details, io_tedge_device_details, role_status, system_data=None, share_mappings=None, io_tedge_agent_info=None, compute_resource=None, **kwargs) -> None: + super(IoTRole, self).__init__(system_data=system_data, **kwargs) + self.host_platform = host_platform + self.io_tdevice_details = io_tdevice_details + self.io_tedge_device_details = io_tedge_device_details + self.share_mappings = share_mappings + self.io_tedge_agent_info = io_tedge_agent_info + self.host_platform_type = None + self.compute_resource = compute_resource + self.role_status = role_status + self.kind = 'IOT' + + +class Ipv4Config(Model): + """Details related to the IPv4 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv4 address of the network adapter. + :vartype ip_address: str + :ivar subnet: The IPv4 subnet of the network adapter. + :vartype subnet: str + :ivar gateway: The IPv4 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'subnet': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Ipv4Config, self).__init__(**kwargs) + self.ip_address = None + self.subnet = None + self.gateway = None + + +class Ipv6Config(Model): + """Details related to the IPv6 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv6 address of the network adapter. + :vartype ip_address: str + :ivar prefix_length: The IPv6 prefix of the network adapter. + :vartype prefix_length: int + :ivar gateway: The IPv6 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'prefix_length': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Ipv6Config, self).__init__(**kwargs) + self.ip_address = None + self.prefix_length = None + self.gateway = None + + +class Job(Model): + """A device job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The name of the object. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar status: The current status of the job. Possible values include: + 'Invalid', 'Running', 'Succeeded', 'Failed', 'Canceled', 'Paused', + 'Scheduled' + :vartype status: str or ~azure.mgmt.databoxedge.models.JobStatus + :ivar start_time: The UTC date and time at which the job started. + :vartype start_time: datetime + :ivar end_time: The UTC date and time at which the job completed. + :vartype end_time: datetime + :ivar percent_complete: The percentage of the job that is complete. + :vartype percent_complete: int + :ivar error: The error details. + :vartype error: ~azure.mgmt.databoxedge.models.JobErrorDetails + :ivar job_type: The type of the job. Possible values include: 'Invalid', + 'ScanForUpdates', 'DownloadUpdates', 'InstallUpdates', 'RefreshShare', + 'RefreshContainer', 'Backup', 'Restore', 'TriggerSupportPackage' + :vartype job_type: str or ~azure.mgmt.databoxedge.models.JobType + :ivar current_stage: Current stage of the update operation. Possible + values include: 'Unknown', 'Initial', 'ScanStarted', 'ScanComplete', + 'ScanFailed', 'DownloadStarted', 'DownloadComplete', 'DownloadFailed', + 'InstallStarted', 'InstallComplete', 'InstallFailed', 'RebootInitiated', + 'Success', 'Failure', 'RescanStarted', 'RescanComplete', 'RescanFailed' + :vartype current_stage: str or + ~azure.mgmt.databoxedge.models.UpdateOperationStage + :ivar download_progress: The download progress. + :vartype download_progress: + ~azure.mgmt.databoxedge.models.UpdateDownloadProgress + :ivar install_progress: The install progress. + :vartype install_progress: + ~azure.mgmt.databoxedge.models.UpdateInstallProgress + :ivar total_refresh_errors: Total number of errors encountered during the + refresh process. + :vartype total_refresh_errors: int + :ivar error_manifest_file: Local share/remote container relative path to + the error manifest file of the refresh. + :vartype error_manifest_file: str + :ivar refreshed_entity_id: ARM ID of the entity that was refreshed. + :vartype refreshed_entity_id: str + :param folder: If only subfolders need to be refreshed, then the subfolder + path inside the share or container. (The path is empty if there are no + subfolders.) + :type folder: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'error': {'readonly': True}, + 'job_type': {'readonly': True}, + 'current_stage': {'readonly': True}, + 'download_progress': {'readonly': True}, + 'install_progress': {'readonly': True}, + 'total_refresh_errors': {'readonly': True}, + 'error_manifest_file': {'readonly': True}, + 'refreshed_entity_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'error': {'key': 'error', 'type': 'JobErrorDetails'}, + 'job_type': {'key': 'properties.jobType', 'type': 'str'}, + 'current_stage': {'key': 'properties.currentStage', 'type': 'str'}, + 'download_progress': {'key': 'properties.downloadProgress', 'type': 'UpdateDownloadProgress'}, + 'install_progress': {'key': 'properties.installProgress', 'type': 'UpdateInstallProgress'}, + 'total_refresh_errors': {'key': 'properties.totalRefreshErrors', 'type': 'int'}, + 'error_manifest_file': {'key': 'properties.errorManifestFile', 'type': 'str'}, + 'refreshed_entity_id': {'key': 'properties.refreshedEntityId', 'type': 'str'}, + 'folder': {'key': 'properties.folder', 'type': 'str'}, + } + + def __init__(self, *, folder: str=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.status = None + self.start_time = None + self.end_time = None + self.percent_complete = None + self.error = None + self.job_type = None + self.current_stage = None + self.download_progress = None + self.install_progress = None + self.total_refresh_errors = None + self.error_manifest_file = None + self.refreshed_entity_id = None + self.folder = folder + + +class JobErrorDetails(Model): + """The job error information containing the list of job errors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_details: The error details. + :vartype error_details: list[~azure.mgmt.databoxedge.models.JobErrorItem] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'error_details': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorItem]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobErrorDetails, self).__init__(**kwargs) + self.error_details = None + self.code = None + self.message = None + + +class JobErrorItem(Model): + """The job error items. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendations: The recommended actions. + :vartype recommendations: list[str] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'recommendations': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobErrorItem, self).__init__(**kwargs) + self.recommendations = None + self.code = None + self.message = None + + +class KubernetesClusterInfo(Model): + """Kubernetes cluster configuration. + + Variables are only 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 etcd_info: Etcd configuration + :vartype etcd_info: ~azure.mgmt.databoxedge.models.EtcdInfo + :ivar nodes: Kubernetes cluster nodes + :vartype nodes: list[~azure.mgmt.databoxedge.models.NodeInfo] + :param version: Required. Kubernetes cluster version + :type version: str + """ + + _validation = { + 'etcd_info': {'readonly': True}, + 'nodes': {'readonly': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'etcd_info': {'key': 'etcdInfo', 'type': 'EtcdInfo'}, + 'nodes': {'key': 'nodes', 'type': '[NodeInfo]'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, version: str, **kwargs) -> None: + super(KubernetesClusterInfo, self).__init__(**kwargs) + self.etcd_info = None + self.nodes = None + self.version = version + + +class KubernetesIPConfiguration(Model): + """Kubernetes node IP configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar port: Port of the Kubernetes node. + :vartype port: str + :param ip_address: IP address of the Kubernetes node. + :type ip_address: str + """ + + _validation = { + 'port': {'readonly': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str=None, **kwargs) -> None: + super(KubernetesIPConfiguration, self).__init__(**kwargs) + self.port = None + self.ip_address = ip_address + + +class KubernetesRole(Role): + """Kubernetes role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the Kubernetes role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar provisioning_state: State of Kubernetes deployment. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.KubernetesState + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param kubernetes_cluster_info: Required. Kubernetes cluster configuration + :type kubernetes_cluster_info: + ~azure.mgmt.databoxedge.models.KubernetesClusterInfo + :param kubernetes_role_resources: Required. Kubernetes role resources + :type kubernetes_role_resources: + ~azure.mgmt.databoxedge.models.KubernetesRoleResources + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'kubernetes_cluster_info': {'required': True}, + 'kubernetes_role_resources': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'kubernetes_cluster_info': {'key': 'properties.kubernetesClusterInfo', 'type': 'KubernetesClusterInfo'}, + 'kubernetes_role_resources': {'key': 'properties.kubernetesRoleResources', 'type': 'KubernetesRoleResources'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, host_platform, kubernetes_cluster_info, kubernetes_role_resources, role_status, system_data=None, **kwargs) -> None: + super(KubernetesRole, self).__init__(system_data=system_data, **kwargs) + self.host_platform = host_platform + self.provisioning_state = None + self.host_platform_type = None + self.kubernetes_cluster_info = kubernetes_cluster_info + self.kubernetes_role_resources = kubernetes_role_resources + self.role_status = role_status + self.kind = 'Kubernetes' + + +class KubernetesRoleCompute(Model): + """Kubernetes role compute 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 vm_profile: Required. VM profile + :type vm_profile: str + :ivar memory_in_bytes: Memory in bytes + :vartype memory_in_bytes: long + :ivar processor_count: Processor count + :vartype processor_count: int + """ + + _validation = { + 'vm_profile': {'required': True}, + 'memory_in_bytes': {'readonly': True}, + 'processor_count': {'readonly': True}, + } + + _attribute_map = { + 'vm_profile': {'key': 'vmProfile', 'type': 'str'}, + 'memory_in_bytes': {'key': 'memoryInBytes', 'type': 'long'}, + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + } + + def __init__(self, *, vm_profile: str, **kwargs) -> None: + super(KubernetesRoleCompute, self).__init__(**kwargs) + self.vm_profile = vm_profile + self.memory_in_bytes = None + self.processor_count = None + + +class KubernetesRoleNetwork(Model): + """Kubernetes role network resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar cni_config: Cni configuration + :vartype cni_config: ~azure.mgmt.databoxedge.models.CniConfig + :ivar load_balancer_config: Load balancer configuration + :vartype load_balancer_config: + ~azure.mgmt.databoxedge.models.LoadBalancerConfig + """ + + _validation = { + 'cni_config': {'readonly': True}, + 'load_balancer_config': {'readonly': True}, + } + + _attribute_map = { + 'cni_config': {'key': 'cniConfig', 'type': 'CniConfig'}, + 'load_balancer_config': {'key': 'loadBalancerConfig', 'type': 'LoadBalancerConfig'}, + } + + def __init__(self, **kwargs) -> None: + super(KubernetesRoleNetwork, self).__init__(**kwargs) + self.cni_config = None + self.load_balancer_config = None + + +class KubernetesRoleResources(Model): + """Kubernetes role resources. + + Variables are only 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 storage: Kubernetes role storage resource + :type storage: ~azure.mgmt.databoxedge.models.KubernetesRoleStorage + :param compute: Required. Kubernetes role compute resource + :type compute: ~azure.mgmt.databoxedge.models.KubernetesRoleCompute + :ivar network: Kubernetes role network resource + :vartype network: ~azure.mgmt.databoxedge.models.KubernetesRoleNetwork + """ + + _validation = { + 'compute': {'required': True}, + 'network': {'readonly': True}, + } + + _attribute_map = { + 'storage': {'key': 'storage', 'type': 'KubernetesRoleStorage'}, + 'compute': {'key': 'compute', 'type': 'KubernetesRoleCompute'}, + 'network': {'key': 'network', 'type': 'KubernetesRoleNetwork'}, + } + + def __init__(self, *, compute, storage=None, **kwargs) -> None: + super(KubernetesRoleResources, self).__init__(**kwargs) + self.storage = storage + self.compute = compute + self.network = None + + +class KubernetesRoleStorage(Model): + """Kubernetes role storage resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar storage_classes: Kubernetes storage class info. + :vartype storage_classes: + list[~azure.mgmt.databoxedge.models.KubernetesRoleStorageClassInfo] + :param endpoints: Mount points of shares in role(s). + :type endpoints: list[~azure.mgmt.databoxedge.models.MountPointMap] + """ + + _validation = { + 'storage_classes': {'readonly': True}, + } + + _attribute_map = { + 'storage_classes': {'key': 'storageClasses', 'type': '[KubernetesRoleStorageClassInfo]'}, + 'endpoints': {'key': 'endpoints', 'type': '[MountPointMap]'}, + } + + def __init__(self, *, endpoints=None, **kwargs) -> None: + super(KubernetesRoleStorage, self).__init__(**kwargs) + self.storage_classes = None + self.endpoints = endpoints + + +class KubernetesRoleStorageClassInfo(Model): + """Kubernetes storage class info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Storage class name. + :vartype name: str + :ivar type: Storage class type. + :vartype type: str + :ivar posix_compliant: If provisioned storage is posix compliant. Possible + values include: 'Invalid', 'Enabled', 'Disabled' + :vartype posix_compliant: str or + ~azure.mgmt.databoxedge.models.PosixComplianceStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'posix_compliant': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'posix_compliant': {'key': 'posixCompliant', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KubernetesRoleStorageClassInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.posix_compliant = None + + +class LoadBalancerConfig(Model): + """Load balancer configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Load balancer type + :vartype type: str + :ivar version: Load balancer version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LoadBalancerConfig, self).__init__(**kwargs) + self.type = None + self.version = None + + +class MECRole(Role): + """MEC role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param connection_string: Activation key of the MEC. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'AsymmetricEncryptedSecret'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, role_status, system_data=None, connection_string=None, **kwargs) -> None: + super(MECRole, self).__init__(system_data=system_data, **kwargs) + self.connection_string = connection_string + self.role_status = role_status + self.kind = 'MEC' + + +class MetricConfiguration(Model): + """Metric configuration. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The Resource ID on which the metrics should + be pushed. + :type resource_id: str + :param mdm_account: The MDM account to which the counters should be + pushed. + :type mdm_account: str + :param metric_name_space: The MDM namespace to which the counters should + be pushed. This is required if MDMAccount is specified + :type metric_name_space: str + :param counter_sets: Required. Host name for the IoT hub associated to the + device. + :type counter_sets: list[~azure.mgmt.databoxedge.models.MetricCounterSet] + """ + + _validation = { + 'resource_id': {'required': True}, + 'counter_sets': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'mdm_account': {'key': 'mdmAccount', 'type': 'str'}, + 'metric_name_space': {'key': 'metricNameSpace', 'type': 'str'}, + 'counter_sets': {'key': 'counterSets', 'type': '[MetricCounterSet]'}, + } + + def __init__(self, *, resource_id: str, counter_sets, mdm_account: str=None, metric_name_space: str=None, **kwargs) -> None: + super(MetricConfiguration, self).__init__(**kwargs) + self.resource_id = resource_id + self.mdm_account = mdm_account + self.metric_name_space = metric_name_space + self.counter_sets = counter_sets + + +class MetricCounter(Model): + """The metric counter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The counter name. + :type name: str + :param instance: The instance from which counter should be collected. + :type instance: str + :param dimension_filter: The dimension filter. + :type dimension_filter: + list[~azure.mgmt.databoxedge.models.MetricDimension] + :param additional_dimensions: The additional dimensions to be added to + metric. + :type additional_dimensions: + list[~azure.mgmt.databoxedge.models.MetricDimension] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'str'}, + 'dimension_filter': {'key': 'dimensionFilter', 'type': '[MetricDimension]'}, + 'additional_dimensions': {'key': 'additionalDimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, *, name: str, instance: str=None, dimension_filter=None, additional_dimensions=None, **kwargs) -> None: + super(MetricCounter, self).__init__(**kwargs) + self.name = name + self.instance = instance + self.dimension_filter = dimension_filter + self.additional_dimensions = additional_dimensions + + +class MetricCounterSet(Model): + """The metric counter set. + + All required parameters must be populated in order to send to Azure. + + :param counters: Required. The counters that should be collected in this + set. + :type counters: list[~azure.mgmt.databoxedge.models.MetricCounter] + """ + + _validation = { + 'counters': {'required': True}, + } + + _attribute_map = { + 'counters': {'key': 'counters', 'type': '[MetricCounter]'}, + } + + def __init__(self, *, counters, **kwargs) -> None: + super(MetricCounterSet, self).__init__(**kwargs) + self.counters = counters + + +class MetricDimension(Model): + """The metric dimension. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. The dimension type. + :type source_type: str + :param source_name: Required. The dimension value. + :type source_name: str + """ + + _validation = { + 'source_type': {'required': True}, + 'source_name': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'source_name': {'key': 'sourceName', 'type': 'str'}, + } + + def __init__(self, *, source_type: str, source_name: str, **kwargs) -> None: + super(MetricDimension, self).__init__(**kwargs) + self.source_type = source_type + self.source_name = source_name + + +class MetricDimensionV1(Model): + """Metric Dimension v1. + + :param name: Name of the metrics dimension. + :type name: str + :param display_name: Display name of the metrics dimension. + :type display_name: str + :param to_be_exported_for_shoebox: To be exported to shoe box. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + super(MetricDimensionV1, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class MetricSpecificationV1(Model): + """Metric specification version 1. + + :param name: Name of the metric. + :type name: str + :param display_name: Display name of the metric. + :type display_name: str + :param display_description: Description of the metric to be displayed. + :type display_description: str + :param unit: Metric units. Possible values include: 'NotSpecified', + 'Percent', 'Count', 'Seconds', 'Milliseconds', 'Bytes', 'BytesPerSecond', + 'CountPerSecond' + :type unit: str or ~azure.mgmt.databoxedge.models.MetricUnit + :param aggregation_type: Metric aggregation type. Possible values include: + 'NotSpecified', 'None', 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + :type aggregation_type: str or + ~azure.mgmt.databoxedge.models.MetricAggregationType + :param dimensions: Metric dimensions, other than default dimension which + is resource. + :type dimensions: list[~azure.mgmt.databoxedge.models.MetricDimensionV1] + :param fill_gap_with_zero: Set true to fill the gaps with zero. + :type fill_gap_with_zero: bool + :param category: Metric category. Possible values include: 'Capacity', + 'Transaction' + :type category: str or ~azure.mgmt.databoxedge.models.MetricCategory + :param resource_id_dimension_name_override: Resource name override. + :type resource_id_dimension_name_override: str + :param supported_time_grain_types: Support granularity of metrics. + :type supported_time_grain_types: list[str or + ~azure.mgmt.databoxedge.models.TimeGrain] + :param supported_aggregation_types: Support metric aggregation type. + :type supported_aggregation_types: list[str or + ~azure.mgmt.databoxedge.models.MetricAggregationType] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimensionV1]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit=None, aggregation_type=None, dimensions=None, fill_gap_with_zero: bool=None, category=None, resource_id_dimension_name_override: str=None, supported_time_grain_types=None, supported_aggregation_types=None, **kwargs) -> None: + super(MetricSpecificationV1, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.dimensions = dimensions + self.fill_gap_with_zero = fill_gap_with_zero + self.category = category + self.resource_id_dimension_name_override = resource_id_dimension_name_override + self.supported_time_grain_types = supported_time_grain_types + self.supported_aggregation_types = supported_aggregation_types + + +class MonitoringMetricConfiguration(ARMBaseModel): + """The metric setting details for the role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param metric_configurations: Required. The metrics configuration details + :type metric_configurations: + list[~azure.mgmt.databoxedge.models.MetricConfiguration] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metric_configurations': {'key': 'properties.metricConfigurations', 'type': '[MetricConfiguration]'}, + } + + def __init__(self, *, metric_configurations, **kwargs) -> None: + super(MonitoringMetricConfiguration, self).__init__(**kwargs) + self.metric_configurations = metric_configurations + + +class MountPointMap(Model): + """The share mount point. + + Variables are only 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 share_id: Required. ID of the share mounted to the role VM. + :type share_id: str + :ivar role_id: ID of the role to which share is mounted. + :vartype role_id: str + :ivar mount_point: Mount point for the share. + :vartype mount_point: str + :ivar mount_type: Mounting type. Possible values include: 'Volume', + 'HostPath' + :vartype mount_type: str or ~azure.mgmt.databoxedge.models.MountType + :ivar role_type: Role type. Possible values include: 'IOT', 'ASA', + 'Functions', 'Cognitive', 'MEC', 'CloudEdgeManagement', 'Kubernetes' + :vartype role_type: str or ~azure.mgmt.databoxedge.models.RoleTypes + """ + + _validation = { + 'share_id': {'required': True}, + 'role_id': {'readonly': True}, + 'mount_point': {'readonly': True}, + 'mount_type': {'readonly': True}, + 'role_type': {'readonly': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'role_id': {'key': 'roleId', 'type': 'str'}, + 'mount_point': {'key': 'mountPoint', 'type': 'str'}, + 'mount_type': {'key': 'mountType', 'type': 'str'}, + 'role_type': {'key': 'roleType', 'type': 'str'}, + } + + def __init__(self, *, share_id: str, **kwargs) -> None: + super(MountPointMap, self).__init__(**kwargs) + self.share_id = share_id + self.role_id = None + self.mount_point = None + self.mount_type = None + self.role_type = None + + +class NetworkAdapter(Model): + """Represents the networkAdapter on a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar adapter_id: Instance ID of network adapter. + :vartype adapter_id: str + :ivar adapter_position: Hardware position of network adapter. + :vartype adapter_position: + ~azure.mgmt.databoxedge.models.NetworkAdapterPosition + :ivar index: Logical index of the adapter. + :vartype index: int + :ivar node_id: Node ID of the network adapter. + :vartype node_id: str + :ivar network_adapter_name: Network adapter name. + :vartype network_adapter_name: str + :ivar label: Hardware label for the adapter. + :vartype label: str + :ivar mac_address: MAC address. + :vartype mac_address: str + :ivar link_speed: Link speed. + :vartype link_speed: long + :ivar status: Value indicating whether this adapter is valid. Possible + values include: 'Inactive', 'Active' + :vartype status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterStatus + :param rdma_status: Value indicating whether this adapter is RDMA capable. + Possible values include: 'Incapable', 'Capable' + :type rdma_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterRDMAStatus + :param dhcp_status: Value indicating whether this adapter has DHCP + enabled. Possible values include: 'Disabled', 'Enabled' + :type dhcp_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterDHCPStatus + :ivar ipv4_configuration: The IPv4 configuration of the network adapter. + :vartype ipv4_configuration: ~azure.mgmt.databoxedge.models.Ipv4Config + :ivar ipv6_configuration: The IPv6 configuration of the network adapter. + :vartype ipv6_configuration: ~azure.mgmt.databoxedge.models.Ipv6Config + :ivar ipv6_link_local_address: The IPv6 local address. + :vartype ipv6_link_local_address: str + :ivar dns_servers: The list of DNS Servers of the device. + :vartype dns_servers: list[str] + """ + + _validation = { + 'adapter_id': {'readonly': True}, + 'adapter_position': {'readonly': True}, + 'index': {'readonly': True}, + 'node_id': {'readonly': True}, + 'network_adapter_name': {'readonly': True}, + 'label': {'readonly': True}, + 'mac_address': {'readonly': True}, + 'link_speed': {'readonly': True}, + 'status': {'readonly': True}, + 'ipv4_configuration': {'readonly': True}, + 'ipv6_configuration': {'readonly': True}, + 'ipv6_link_local_address': {'readonly': True}, + 'dns_servers': {'readonly': True}, + } + + _attribute_map = { + 'adapter_id': {'key': 'adapterId', 'type': 'str'}, + 'adapter_position': {'key': 'adapterPosition', 'type': 'NetworkAdapterPosition'}, + 'index': {'key': 'index', 'type': 'int'}, + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'network_adapter_name': {'key': 'networkAdapterName', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + 'link_speed': {'key': 'linkSpeed', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'rdma_status': {'key': 'rdmaStatus', 'type': 'str'}, + 'dhcp_status': {'key': 'dhcpStatus', 'type': 'str'}, + 'ipv4_configuration': {'key': 'ipv4Configuration', 'type': 'Ipv4Config'}, + 'ipv6_configuration': {'key': 'ipv6Configuration', 'type': 'Ipv6Config'}, + 'ipv6_link_local_address': {'key': 'ipv6LinkLocalAddress', 'type': 'str'}, + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, *, rdma_status=None, dhcp_status=None, **kwargs) -> None: + super(NetworkAdapter, self).__init__(**kwargs) + self.adapter_id = None + self.adapter_position = None + self.index = None + self.node_id = None + self.network_adapter_name = None + self.label = None + self.mac_address = None + self.link_speed = None + self.status = None + self.rdma_status = rdma_status + self.dhcp_status = dhcp_status + self.ipv4_configuration = None + self.ipv6_configuration = None + self.ipv6_link_local_address = None + self.dns_servers = None + + +class NetworkAdapterPosition(Model): + """The network adapter position. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar network_group: The network group. Possible values include: 'None', + 'NonRDMA', 'RDMA' + :vartype network_group: str or ~azure.mgmt.databoxedge.models.NetworkGroup + :ivar port: The port. + :vartype port: int + """ + + _validation = { + 'network_group': {'readonly': True}, + 'port': {'readonly': True}, + } + + _attribute_map = { + 'network_group': {'key': 'networkGroup', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(NetworkAdapterPosition, self).__init__(**kwargs) + self.network_group = None + self.port = None + + +class NetworkSettings(ARMBaseModel): + """The network settings of a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar network_adapters: The network adapter list on the device. + :vartype network_adapters: + list[~azure.mgmt.databoxedge.models.NetworkAdapter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'network_adapters': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'network_adapters': {'key': 'properties.networkAdapters', 'type': '[NetworkAdapter]'}, + } + + def __init__(self, **kwargs) -> None: + super(NetworkSettings, self).__init__(**kwargs) + self.network_adapters = None + + +class Node(ARMBaseModel): + """Represents a single node in a Data box Edge/Gateway device + Gateway devices, standalone Edge devices and a single node cluster Edge + device will all have 1 node + Multi-node Edge devices will have more than 1 nodes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar node_status: The current status of the individual node. Possible + values include: 'Unknown', 'Up', 'Down', 'Rebooting', 'ShuttingDown' + :vartype node_status: str or ~azure.mgmt.databoxedge.models.NodeStatus + :ivar node_chassis_serial_number: Serial number of the Chassis + :vartype node_chassis_serial_number: str + :ivar node_serial_number: Serial number of the individual node + :vartype node_serial_number: str + :ivar node_display_name: Display Name of the individual node + :vartype node_display_name: str + :ivar node_friendly_software_version: Friendly software version name that + is currently installed on the node + :vartype node_friendly_software_version: str + :ivar node_hcs_version: HCS version that is currently installed on the + node + :vartype node_hcs_version: str + :ivar node_instance_id: Guid instance id of the node + :vartype node_instance_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'node_status': {'readonly': True}, + 'node_chassis_serial_number': {'readonly': True}, + 'node_serial_number': {'readonly': True}, + 'node_display_name': {'readonly': True}, + 'node_friendly_software_version': {'readonly': True}, + 'node_hcs_version': {'readonly': True}, + 'node_instance_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'node_status': {'key': 'properties.nodeStatus', 'type': 'str'}, + 'node_chassis_serial_number': {'key': 'properties.nodeChassisSerialNumber', 'type': 'str'}, + 'node_serial_number': {'key': 'properties.nodeSerialNumber', 'type': 'str'}, + 'node_display_name': {'key': 'properties.nodeDisplayName', 'type': 'str'}, + 'node_friendly_software_version': {'key': 'properties.nodeFriendlySoftwareVersion', 'type': 'str'}, + 'node_hcs_version': {'key': 'properties.nodeHcsVersion', 'type': 'str'}, + 'node_instance_id': {'key': 'properties.nodeInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Node, self).__init__(**kwargs) + self.node_status = None + self.node_chassis_serial_number = None + self.node_serial_number = None + self.node_display_name = None + self.node_friendly_software_version = None + self.node_hcs_version = None + self.node_instance_id = None + + +class NodeInfo(Model): + """Kubernetes node info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Node name. + :vartype name: str + :ivar type: Node type - Master/Worker. Possible values include: 'Invalid', + 'Master', 'Worker' + :vartype type: str or ~azure.mgmt.databoxedge.models.KubernetesNodeType + :param ip_configuration: IP Configuration of the Kubernetes node. + :type ip_configuration: + list[~azure.mgmt.databoxedge.models.KubernetesIPConfiguration] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_configuration': {'key': 'ipConfiguration', 'type': '[KubernetesIPConfiguration]'}, + } + + def __init__(self, *, ip_configuration=None, **kwargs) -> None: + super(NodeInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.ip_configuration = ip_configuration + + +class Operation(Model): + """Operations. + + :param name: Name of the operation. + :type name: str + :param is_data_action: Is data action. + :type is_data_action: bool + :param display: Properties displayed for the operation. + :type display: ~azure.mgmt.databoxedge.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param service_specification: Service specification. + :type service_specification: + ~azure.mgmt.databoxedge.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, name: str=None, is_data_action: bool=None, display=None, origin: str=None, service_specification=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.is_data_action = is_data_action + self.display = display + self.origin = origin + self.service_specification = service_specification + + +class OperationDisplay(Model): + """Operation display properties. + + :param provider: Provider name. + :type provider: str + :param resource: The type of resource in which the operation is performed. + :type resource: str + :param operation: Operation to be performed on the resource. + :type operation: str + :param description: Description of the operation to be performed. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Order(ARMBaseModel): + """The order details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param contact_information: Required. The contact details. + :type contact_information: ~azure.mgmt.databoxedge.models.ContactDetails + :param shipping_address: The shipping address. + :type shipping_address: ~azure.mgmt.databoxedge.models.Address + :ivar current_status: Current status of the order. + :vartype current_status: ~azure.mgmt.databoxedge.models.OrderStatus + :ivar order_history: List of status changes in the order. + :vartype order_history: list[~azure.mgmt.databoxedge.models.OrderStatus] + :ivar serial_number: Serial number of the device. + :vartype serial_number: str + :ivar delivery_tracking_info: Tracking information for the package + delivered to the customer whether it has an original or a replacement + device. + :vartype delivery_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :ivar return_tracking_info: Tracking information for the package returned + from the customer whether it has an original or a replacement device. + :vartype return_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :param shipment_type: ShipmentType of the order. Possible values include: + 'NotApplicable', 'ShippedToCustomer', 'SelfPickup' + :type shipment_type: str or ~azure.mgmt.databoxedge.models.ShipmentType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_information': {'required': True}, + 'current_status': {'readonly': True}, + 'order_history': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'delivery_tracking_info': {'readonly': True}, + 'return_tracking_info': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'contact_information': {'key': 'properties.contactInformation', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'Address'}, + 'current_status': {'key': 'properties.currentStatus', 'type': 'OrderStatus'}, + 'order_history': {'key': 'properties.orderHistory', 'type': '[OrderStatus]'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'delivery_tracking_info': {'key': 'properties.deliveryTrackingInfo', 'type': '[TrackingInfo]'}, + 'return_tracking_info': {'key': 'properties.returnTrackingInfo', 'type': '[TrackingInfo]'}, + 'shipment_type': {'key': 'properties.shipmentType', 'type': 'str'}, + } + + def __init__(self, *, contact_information, shipping_address=None, shipment_type=None, **kwargs) -> None: + super(Order, self).__init__(**kwargs) + self.contact_information = contact_information + self.shipping_address = shipping_address + self.current_status = None + self.order_history = None + self.serial_number = None + self.delivery_tracking_info = None + self.return_tracking_info = None + self.shipment_type = shipment_type + + +class OrderStatus(Model): + """Represents a single status change. + + Variables are only 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 status: Required. Status of the order as per the allowed status + types. Possible values include: 'Untracked', 'AwaitingFulfilment', + 'AwaitingPreparation', 'AwaitingShipment', 'Shipped', 'Arriving', + 'Delivered', 'ReplacementRequested', 'LostDevice', 'Declined', + 'ReturnInitiated', 'AwaitingReturnShipment', 'ShippedBack', + 'CollectedAtMicrosoft', 'AwaitingPickup', 'PickupCompleted', + 'AwaitingDrop' + :type status: str or ~azure.mgmt.databoxedge.models.OrderState + :ivar update_date_time: Time of status update. + :vartype update_date_time: datetime + :param comments: Comments related to this status change. + :type comments: str + :ivar tracking_information: Tracking information related to the state in + the ordering flow + :vartype tracking_information: ~azure.mgmt.databoxedge.models.TrackingInfo + :ivar additional_order_details: Dictionary to hold generic information + which is not stored + by the already existing properties + :vartype additional_order_details: dict[str, str] + """ + + _validation = { + 'status': {'required': True}, + 'update_date_time': {'readonly': True}, + 'tracking_information': {'readonly': True}, + 'additional_order_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'update_date_time': {'key': 'updateDateTime', 'type': 'iso-8601'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'tracking_information': {'key': 'trackingInformation', 'type': 'TrackingInfo'}, + 'additional_order_details': {'key': 'additionalOrderDetails', 'type': '{str}'}, + } + + def __init__(self, *, status, comments: str=None, **kwargs) -> None: + super(OrderStatus, self).__init__(**kwargs) + self.status = status + self.update_date_time = None + self.comments = comments + self.tracking_information = None + self.additional_order_details = None + + +class PeriodicTimerEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. Periodic timer details. + :type source_info: ~azure.mgmt.databoxedge.models.PeriodicTimerSourceInfo + :param sink_info: Required. Role Sink information. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'PeriodicTimerSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, *, source_info, sink_info, system_data=None, custom_context_tag: str=None, **kwargs) -> None: + super(PeriodicTimerEventTrigger, self).__init__(system_data=system_data, **kwargs) + self.source_info = source_info + self.sink_info = sink_info + self.custom_context_tag = custom_context_tag + self.kind = 'PeriodicTimerEvent' + + +class PeriodicTimerSourceInfo(Model): + """Periodic timer event source. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. The time of the day that results in a valid + trigger. Schedule is computed with reference to the time specified upto + seconds. If timezone is not specified the time will considered to be in + device timezone. The value will always be returned as UTC time. + :type start_time: datetime + :param schedule: Required. Periodic frequency at which timer event needs + to be raised. Supports daily, hourly, minutes, and seconds. + :type schedule: str + :param topic: Topic where periodic events are published to IoT device. + :type topic: str + """ + + _validation = { + 'start_time': {'required': True}, + 'schedule': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'schedule': {'key': 'schedule', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + } + + def __init__(self, *, start_time, schedule: str, topic: str=None, **kwargs) -> None: + super(PeriodicTimerSourceInfo, self).__init__(**kwargs) + self.start_time = start_time + self.schedule = schedule + self.topic = topic + + +class RefreshDetails(Model): + """Fields for tracking refresh job on the share or container. + + :param in_progress_refresh_job_id: If a refresh job is currently in + progress on this share or container, this field indicates the ARM resource + ID of that job. The field is empty if no job is in progress. + :type in_progress_refresh_job_id: str + :param last_completed_refresh_job_time_in_utc: Indicates the completed + time for the last refresh job on this particular share or container, if + any.This could be a failed job or a successful job. + :type last_completed_refresh_job_time_in_utc: datetime + :param error_manifest_file: Indicates the relative path of the error xml + for the last refresh job on this particular share or container, if any. + This could be a failed job or a successful job. + :type error_manifest_file: str + :param last_job: Indicates the id of the last refresh job on this + particular share or container,if any. This could be a failed job or a + successful job. + :type last_job: str + """ + + _attribute_map = { + 'in_progress_refresh_job_id': {'key': 'inProgressRefreshJobId', 'type': 'str'}, + 'last_completed_refresh_job_time_in_utc': {'key': 'lastCompletedRefreshJobTimeInUTC', 'type': 'iso-8601'}, + 'error_manifest_file': {'key': 'errorManifestFile', 'type': 'str'}, + 'last_job': {'key': 'lastJob', 'type': 'str'}, + } + + def __init__(self, *, in_progress_refresh_job_id: str=None, last_completed_refresh_job_time_in_utc=None, error_manifest_file: str=None, last_job: str=None, **kwargs) -> None: + super(RefreshDetails, self).__init__(**kwargs) + self.in_progress_refresh_job_id = in_progress_refresh_job_id + self.last_completed_refresh_job_time_in_utc = last_completed_refresh_job_time_in_utc + self.error_manifest_file = error_manifest_file + self.last_job = last_job + + +class ResourceIdentity(Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: Identity type. Possible values include: 'None', + 'SystemAssigned', 'UserAssigned' + :type type: str or ~azure.mgmt.databoxedge.models.MsiIdentityType + :ivar principal_id: Service Principal Id backing the Msi + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = None + self.tenant_id = None + + +class ResourceMoveDetails(Model): + """Fields for tracking resource move. + + :param operation_in_progress: Denotes whether move operation is in + progress. Possible values include: 'None', 'ResourceMoveInProgress', + 'ResourceMoveFailed' + :type operation_in_progress: str or + ~azure.mgmt.databoxedge.models.ResourceMoveStatus + :param operation_in_progress_lock_timeout_in_utc: Denotes the timeout of + the operation to finish + :type operation_in_progress_lock_timeout_in_utc: datetime + """ + + _attribute_map = { + 'operation_in_progress': {'key': 'operationInProgress', 'type': 'str'}, + 'operation_in_progress_lock_timeout_in_utc': {'key': 'operationInProgressLockTimeoutInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, *, operation_in_progress=None, operation_in_progress_lock_timeout_in_utc=None, **kwargs) -> None: + super(ResourceMoveDetails, self).__init__(**kwargs) + self.operation_in_progress = operation_in_progress + self.operation_in_progress_lock_timeout_in_utc = operation_in_progress_lock_timeout_in_utc + + +class ResourceTypeSku(Model): + """Resource type Sku object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The resource type. + :vartype resource_type: str + :ivar skus: The skus. + :vartype skus: list[~azure.mgmt.databoxedge.models.SkuInformation] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'skus': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[SkuInformation]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceTypeSku, self).__init__(**kwargs) + self.resource_type = None + self.skus = None + + +class RoleSinkInfo(Model): + """Compute role against which events will be raised. + + All required parameters must be populated in order to send to Azure. + + :param role_id: Required. Compute role ID. + :type role_id: str + """ + + _validation = { + 'role_id': {'required': True}, + } + + _attribute_map = { + 'role_id': {'key': 'roleId', 'type': 'str'}, + } + + def __init__(self, *, role_id: str, **kwargs) -> None: + super(RoleSinkInfo, self).__init__(**kwargs) + self.role_id = role_id + + +class Secret(Model): + """Holds device secret either as a KeyVault reference or as an encrypted + value. + + :param encrypted_secret: Encrypted (using device public key) secret value. + :type encrypted_secret: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param key_vault_id: Id of the Key-Vault where secret is stored (ex: + secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). + :type key_vault_id: str + """ + + _attribute_map = { + 'encrypted_secret': {'key': 'encryptedSecret', 'type': 'AsymmetricEncryptedSecret'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, encrypted_secret=None, key_vault_id: str=None, **kwargs) -> None: + super(Secret, self).__init__(**kwargs) + self.encrypted_secret = encrypted_secret + self.key_vault_id = key_vault_id + + +class SecuritySettings(ARMBaseModel): + """The security settings of a device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param device_admin_password: Required. Device administrator password as + an encrypted string (encrypted using RSA PKCS #1) is used to sign into the + local web UI of the device. The Actual password should have at least 8 + characters that are a combination of uppercase, lowercase, numeric, and + special characters. + :type device_admin_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'device_admin_password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_admin_password': {'key': 'properties.deviceAdminPassword', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, *, device_admin_password, **kwargs) -> None: + super(SecuritySettings, self).__init__(**kwargs) + self.device_admin_password = device_admin_password + + +class ServiceSpecification(Model): + """Service specification. + + :param metric_specifications: Metric specification as defined by shoebox. + :type metric_specifications: + list[~azure.mgmt.databoxedge.models.MetricSpecificationV1] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecificationV1]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + + +class Share(ARMBaseModel): + """Represents a share on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Share on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the share. + :type description: str + :param share_status: Required. Current status of the share. Possible + values include: 'Offline', 'Unknown', 'OK', 'Updating', 'NeedsAttention' + :type share_status: str or ~azure.mgmt.databoxedge.models.ShareStatus + :param monitoring_status: Required. Current monitoring status of the + share. Possible values include: 'Enabled', 'Disabled' + :type monitoring_status: str or + ~azure.mgmt.databoxedge.models.MonitoringStatus + :param azure_container_info: Azure container mapping for the share. + :type azure_container_info: + ~azure.mgmt.databoxedge.models.AzureContainerInfo + :param access_protocol: Required. Access protocol to be used by the share. + Possible values include: 'SMB', 'NFS' + :type access_protocol: str or + ~azure.mgmt.databoxedge.models.ShareAccessProtocol + :param user_access_rights: Mapping of users and corresponding access + rights on the share (required for SMB protocol). + :type user_access_rights: + list[~azure.mgmt.databoxedge.models.UserAccessRight] + :param client_access_rights: List of IP addresses and corresponding access + rights on the share(required for NFS protocol). + :type client_access_rights: + list[~azure.mgmt.databoxedge.models.ClientAccessRight] + :param refresh_details: Details of the refresh job on this share. + :type refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar share_mappings: Share mount point to the role. + :vartype share_mappings: + list[~azure.mgmt.databoxedge.models.MountPointMap] + :param data_policy: Data policy of the share. Possible values include: + 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_status': {'required': True}, + 'monitoring_status': {'required': True}, + 'access_protocol': {'required': True}, + 'share_mappings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'share_status': {'key': 'properties.shareStatus', 'type': 'str'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + 'azure_container_info': {'key': 'properties.azureContainerInfo', 'type': 'AzureContainerInfo'}, + 'access_protocol': {'key': 'properties.accessProtocol', 'type': 'str'}, + 'user_access_rights': {'key': 'properties.userAccessRights', 'type': '[UserAccessRight]'}, + 'client_access_rights': {'key': 'properties.clientAccessRights', 'type': '[ClientAccessRight]'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + } + + def __init__(self, *, share_status, monitoring_status, access_protocol, system_data=None, description: str=None, azure_container_info=None, user_access_rights=None, client_access_rights=None, refresh_details=None, data_policy=None, **kwargs) -> None: + super(Share, self).__init__(**kwargs) + self.system_data = system_data + self.description = description + self.share_status = share_status + self.monitoring_status = monitoring_status + self.azure_container_info = azure_container_info + self.access_protocol = access_protocol + self.user_access_rights = user_access_rights + self.client_access_rights = client_access_rights + self.refresh_details = refresh_details + self.share_mappings = None + self.data_policy = data_policy + + +class ShareAccessRight(Model): + """Specifies the mapping between this particular user and the type of access + he has on shares on this device. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. The share ID. + :type share_id: str + :param access_type: Required. Type of access to be allowed on the share + for this user. Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'share_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, *, share_id: str, access_type, **kwargs) -> None: + super(ShareAccessRight, self).__init__(**kwargs) + self.share_id = share_id + self.access_type = access_type + + +class Sku(Model): + """The SKU type. + + :param name: SKU name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC' + :type name: str or ~azure.mgmt.databoxedge.models.SkuName + :param tier: The SKU tier. This is based on the SKU name. Possible values + include: 'Standard' + :type tier: str or ~azure.mgmt.databoxedge.models.SkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name=None, tier=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class SkuCapability(Model): + """The metadata to describe the capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuCapability, self).__init__(**kwargs) + self.name = None + self.value = None + + +class SkuCost(Model): + """The metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The cost quantity. + :vartype quantity: long + :ivar extended_unit: The extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class SkuInformation(Model): + """Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The sku name. + :vartype name: str + :ivar tier: The sku tier. + :vartype tier: str + :ivar kind: The sku kind. + :vartype kind: str + :ivar family: The Sku family. + :vartype family: str + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar locations: The locations where Sku is available. + :vartype locations: list[str] + :ivar location_info: The locations where Sku is available with zones and + sites info + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar required_quota_ids: The required quotaIds for the sku to be + available. + :vartype required_quota_ids: list[str] + :ivar required_features: The required features for the sku to be + available. + :vartype required_features: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'kind': {'readonly': True}, + 'family': {'readonly': True}, + 'costs': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'required_quota_ids': {'readonly': True}, + 'required_features': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'required_quota_ids': {'key': 'requiredQuotaIds', 'type': '[str]'}, + 'required_features': {'key': 'requiredFeatures', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuInformation, self).__init__(**kwargs) + self.name = None + self.tier = None + self.kind = None + self.family = None + self.costs = None + self.locations = None + self.location_info = None + self.required_quota_ids = None + self.required_features = None + + +class SkuInformationList(Model): + """List of SKU Information objects. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of ResourceTypeSku objects + :vartype value: list[~azure.mgmt.databoxedge.models.ResourceTypeSku] + :ivar next_link: Links to the next set of results + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceTypeSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuInformationList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class SkuLocationInfo(Model): + """The location info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: The location. + :vartype location: str + :ivar zones: The zones. + :vartype zones: list[str] + :ivar sites: The sites. + :vartype sites: list[str] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'sites': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'sites': {'key': 'sites', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.sites = None + + +class StorageAccount(ARMBaseModel): + """Represents a Storage Account on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccount object on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the storage Account. + :type description: str + :param storage_account_status: Current status of the storage account. + Possible values include: 'OK', 'Offline', 'Unknown', 'Updating', + 'NeedsAttention' + :type storage_account_status: str or + ~azure.mgmt.databoxedge.models.StorageAccountStatus + :param data_policy: Required. Data policy of the storage Account. Possible + values include: 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + :param storage_account_credential_id: Storage Account Credential Id + :type storage_account_credential_id: str + :ivar blob_endpoint: BlobEndpoint of Storage Account + :vartype blob_endpoint: str + :ivar container_count: The Container Count. Present only for Storage + Accounts with DataPolicy set to Cloud. + :vartype container_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_policy': {'required': True}, + 'blob_endpoint': {'readonly': True}, + 'container_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'storage_account_status': {'key': 'properties.storageAccountStatus', 'type': 'str'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + 'storage_account_credential_id': {'key': 'properties.storageAccountCredentialId', 'type': 'str'}, + 'blob_endpoint': {'key': 'properties.blobEndpoint', 'type': 'str'}, + 'container_count': {'key': 'properties.containerCount', 'type': 'int'}, + } + + def __init__(self, *, data_policy, system_data=None, description: str=None, storage_account_status=None, storage_account_credential_id: str=None, **kwargs) -> None: + super(StorageAccount, self).__init__(**kwargs) + self.system_data = system_data + self.description = description + self.storage_account_status = storage_account_status + self.data_policy = data_policy + self.storage_account_credential_id = storage_account_credential_id + self.blob_endpoint = None + self.container_count = None + + +class StorageAccountCredential(ARMBaseModel): + """The storage account credential. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccountCredential object + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param alias: Required. Alias for the storage account. + :type alias: str + :param user_name: Username for the storage account. + :type user_name: str + :param account_key: Encrypted storage key. + :type account_key: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param connection_string: Connection string for the storage account. Use + this string if username and account key are not specified. + :type connection_string: str + :param ssl_status: Required. Signifies whether SSL needs to be enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type ssl_status: str or ~azure.mgmt.databoxedge.models.SSLStatus + :param blob_domain_name: Blob end point for private clouds. + :type blob_domain_name: str + :param account_type: Required. Type of storage accessed on the storage + account. Possible values include: 'GeneralPurposeStorage', 'BlobStorage' + :type account_type: str or ~azure.mgmt.databoxedge.models.AccountType + :param storage_account_id: Id of the storage account. + :type storage_account_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alias': {'required': True}, + 'ssl_status': {'required': True}, + 'account_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'alias': {'key': 'properties.alias', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'account_key': {'key': 'properties.accountKey', 'type': 'AsymmetricEncryptedSecret'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'ssl_status': {'key': 'properties.sslStatus', 'type': 'str'}, + 'blob_domain_name': {'key': 'properties.blobDomainName', 'type': 'str'}, + 'account_type': {'key': 'properties.accountType', 'type': 'str'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + } + + def __init__(self, *, alias: str, ssl_status, account_type, system_data=None, user_name: str=None, account_key=None, connection_string: str=None, blob_domain_name: str=None, storage_account_id: str=None, **kwargs) -> None: + super(StorageAccountCredential, self).__init__(**kwargs) + self.system_data = system_data + self.alias = alias + self.user_name = user_name + self.account_key = account_key + self.connection_string = connection_string + self.ssl_status = ssl_status + self.blob_domain_name = blob_domain_name + self.account_type = account_type + self.storage_account_id = storage_account_id + + +class SubscriptionRegisteredFeatures(Model): + """SubscriptionRegisteredFeatures. + + :param name: + :type name: str + :param state: + :type state: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, state: str=None, **kwargs) -> None: + super(SubscriptionRegisteredFeatures, self).__init__(**kwargs) + self.name = name + self.state = state + + +class SymmetricKey(Model): + """Symmetric key for authentication. + + :param connection_string: Connection string based on the symmetric key. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, *, connection_string=None, **kwargs) -> None: + super(SymmetricKey, self).__init__(**kwargs) + self.connection_string = connection_string + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.databoxedge.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TrackingInfo(Model): + """Tracking courier information. + + :param serial_number: Serial number of the device being tracked. + :type serial_number: str + :param carrier_name: Name of the carrier used in the delivery. + :type carrier_name: str + :param tracking_id: Tracking ID of the shipment. + :type tracking_id: str + :param tracking_url: Tracking URL of the shipment. + :type tracking_url: str + """ + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + } + + def __init__(self, *, serial_number: str=None, carrier_name: str=None, tracking_id: str=None, tracking_url: str=None, **kwargs) -> None: + super(TrackingInfo, self).__init__(**kwargs) + self.serial_number = serial_number + self.carrier_name = carrier_name + self.tracking_id = tracking_id + self.tracking_url = tracking_url + + +class UpdateDownloadProgress(Model): + """Details about the download progress of update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar download_phase: The download phase. Possible values include: + 'Unknown', 'Initializing', 'Downloading', 'Verifying' + :vartype download_phase: str or + ~azure.mgmt.databoxedge.models.DownloadPhase + :ivar percent_complete: Percentage of completion. + :vartype percent_complete: int + :ivar total_bytes_to_download: Total bytes to download. + :vartype total_bytes_to_download: float + :ivar total_bytes_downloaded: Total bytes downloaded. + :vartype total_bytes_downloaded: float + :ivar number_of_updates_to_download: Number of updates to download. + :vartype number_of_updates_to_download: int + :ivar number_of_updates_downloaded: Number of updates downloaded. + :vartype number_of_updates_downloaded: int + """ + + _validation = { + 'download_phase': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'total_bytes_to_download': {'readonly': True}, + 'total_bytes_downloaded': {'readonly': True}, + 'number_of_updates_to_download': {'readonly': True}, + 'number_of_updates_downloaded': {'readonly': True}, + } + + _attribute_map = { + 'download_phase': {'key': 'downloadPhase', 'type': 'str'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'total_bytes_to_download': {'key': 'totalBytesToDownload', 'type': 'float'}, + 'total_bytes_downloaded': {'key': 'totalBytesDownloaded', 'type': 'float'}, + 'number_of_updates_to_download': {'key': 'numberOfUpdatesToDownload', 'type': 'int'}, + 'number_of_updates_downloaded': {'key': 'numberOfUpdatesDownloaded', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateDownloadProgress, self).__init__(**kwargs) + self.download_phase = None + self.percent_complete = None + self.total_bytes_to_download = None + self.total_bytes_downloaded = None + self.number_of_updates_to_download = None + self.number_of_updates_downloaded = None + + +class UpdateInstallProgress(Model): + """Progress details during installation of updates. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar percent_complete: Percentage completed. + :vartype percent_complete: int + :ivar number_of_updates_to_install: Number of updates to install. + :vartype number_of_updates_to_install: int + :ivar number_of_updates_installed: Number of updates installed. + :vartype number_of_updates_installed: int + """ + + _validation = { + 'percent_complete': {'readonly': True}, + 'number_of_updates_to_install': {'readonly': True}, + 'number_of_updates_installed': {'readonly': True}, + } + + _attribute_map = { + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'number_of_updates_to_install': {'key': 'numberOfUpdatesToInstall', 'type': 'int'}, + 'number_of_updates_installed': {'key': 'numberOfUpdatesInstalled', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateInstallProgress, self).__init__(**kwargs) + self.percent_complete = None + self.number_of_updates_to_install = None + self.number_of_updates_installed = None + + +class UpdateSummary(ARMBaseModel): + """Details about ongoing updates and availability of updates on the device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param device_version_number: The current version of the device in format: + 1.2.17312.13.", + :type device_version_number: str + :param friendly_device_version_name: The current version of the device in + text format. + :type friendly_device_version_name: str + :param device_last_scanned_date_time: The last time when a scan was done + on the device. + :type device_last_scanned_date_time: datetime + :param last_completed_scan_job_date_time: The time when the last scan job + was completed (success/cancelled/failed) on the appliance. + :type last_completed_scan_job_date_time: datetime + :ivar last_completed_download_job_date_time: The time when the last + Download job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_download_job_date_time: datetime + :ivar last_completed_install_job_date_time: The time when the last Install + job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_install_job_date_time: datetime + :ivar total_number_of_updates_available: The number of updates available + for the current device version as per the last device scan. + :vartype total_number_of_updates_available: int + :ivar total_number_of_updates_pending_download: The total number of items + pending download. + :vartype total_number_of_updates_pending_download: int + :ivar total_number_of_updates_pending_install: The total number of items + pending install. + :vartype total_number_of_updates_pending_install: int + :ivar reboot_behavior: Indicates if updates are available and at least one + of the updates needs a reboot. Possible values include: 'NeverReboots', + 'RequiresReboot', 'RequestReboot' + :vartype reboot_behavior: str or + ~azure.mgmt.databoxedge.models.InstallRebootBehavior + :ivar ongoing_update_operation: The current update operation. Possible + values include: 'None', 'Scan', 'Download', 'Install' + :vartype ongoing_update_operation: str or + ~azure.mgmt.databoxedge.models.UpdateOperation + :ivar in_progress_download_job_id: The job ID of the download job in + progress. + :vartype in_progress_download_job_id: str + :ivar in_progress_install_job_id: The job ID of the install job in + progress. + :vartype in_progress_install_job_id: str + :ivar in_progress_download_job_started_date_time: The time when the + currently running download (if any) started. + :vartype in_progress_download_job_started_date_time: datetime + :ivar in_progress_install_job_started_date_time: The time when the + currently running install (if any) started. + :vartype in_progress_install_job_started_date_time: datetime + :ivar update_titles: The list of updates available for install. + :vartype update_titles: list[str] + :ivar total_update_size_in_bytes: The total size of updates available for + download in bytes. + :vartype total_update_size_in_bytes: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_completed_download_job_date_time': {'readonly': True}, + 'last_completed_install_job_date_time': {'readonly': True}, + 'total_number_of_updates_available': {'readonly': True}, + 'total_number_of_updates_pending_download': {'readonly': True}, + 'total_number_of_updates_pending_install': {'readonly': True}, + 'reboot_behavior': {'readonly': True}, + 'ongoing_update_operation': {'readonly': True}, + 'in_progress_download_job_id': {'readonly': True}, + 'in_progress_install_job_id': {'readonly': True}, + 'in_progress_download_job_started_date_time': {'readonly': True}, + 'in_progress_install_job_started_date_time': {'readonly': True}, + 'update_titles': {'readonly': True}, + 'total_update_size_in_bytes': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_version_number': {'key': 'properties.deviceVersionNumber', 'type': 'str'}, + 'friendly_device_version_name': {'key': 'properties.friendlyDeviceVersionName', 'type': 'str'}, + 'device_last_scanned_date_time': {'key': 'properties.deviceLastScannedDateTime', 'type': 'iso-8601'}, + 'last_completed_scan_job_date_time': {'key': 'properties.lastCompletedScanJobDateTime', 'type': 'iso-8601'}, + 'last_completed_download_job_date_time': {'key': 'properties.lastCompletedDownloadJobDateTime', 'type': 'iso-8601'}, + 'last_completed_install_job_date_time': {'key': 'properties.lastCompletedInstallJobDateTime', 'type': 'iso-8601'}, + 'total_number_of_updates_available': {'key': 'properties.totalNumberOfUpdatesAvailable', 'type': 'int'}, + 'total_number_of_updates_pending_download': {'key': 'properties.totalNumberOfUpdatesPendingDownload', 'type': 'int'}, + 'total_number_of_updates_pending_install': {'key': 'properties.totalNumberOfUpdatesPendingInstall', 'type': 'int'}, + 'reboot_behavior': {'key': 'properties.rebootBehavior', 'type': 'str'}, + 'ongoing_update_operation': {'key': 'properties.ongoingUpdateOperation', 'type': 'str'}, + 'in_progress_download_job_id': {'key': 'properties.inProgressDownloadJobId', 'type': 'str'}, + 'in_progress_install_job_id': {'key': 'properties.inProgressInstallJobId', 'type': 'str'}, + 'in_progress_download_job_started_date_time': {'key': 'properties.inProgressDownloadJobStartedDateTime', 'type': 'iso-8601'}, + 'in_progress_install_job_started_date_time': {'key': 'properties.inProgressInstallJobStartedDateTime', 'type': 'iso-8601'}, + 'update_titles': {'key': 'properties.updateTitles', 'type': '[str]'}, + 'total_update_size_in_bytes': {'key': 'properties.totalUpdateSizeInBytes', 'type': 'float'}, + } + + def __init__(self, *, device_version_number: str=None, friendly_device_version_name: str=None, device_last_scanned_date_time=None, last_completed_scan_job_date_time=None, **kwargs) -> None: + super(UpdateSummary, self).__init__(**kwargs) + self.device_version_number = device_version_number + self.friendly_device_version_name = friendly_device_version_name + self.device_last_scanned_date_time = device_last_scanned_date_time + self.last_completed_scan_job_date_time = last_completed_scan_job_date_time + self.last_completed_download_job_date_time = None + self.last_completed_install_job_date_time = None + self.total_number_of_updates_available = None + self.total_number_of_updates_pending_download = None + self.total_number_of_updates_pending_install = None + self.reboot_behavior = None + self.ongoing_update_operation = None + self.in_progress_download_job_id = None + self.in_progress_install_job_id = None + self.in_progress_download_job_started_date_time = None + self.in_progress_install_job_started_date_time = None + self.update_titles = None + self.total_update_size_in_bytes = None + + +class UploadCertificateRequest(Model): + """The upload certificate request. + + All required parameters must be populated in order to send to Azure. + + :param authentication_type: The authentication type. Possible values + include: 'Invalid', 'AzureActiveDirectory' + :type authentication_type: str or + ~azure.mgmt.databoxedge.models.AuthenticationType + :param certificate: Required. The base64 encoded certificate raw data. + :type certificate: str + """ + + _validation = { + 'certificate': {'required': True}, + } + + _attribute_map = { + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'str'}, + 'certificate': {'key': 'properties.certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str, authentication_type=None, **kwargs) -> None: + super(UploadCertificateRequest, self).__init__(**kwargs) + self.authentication_type = authentication_type + self.certificate = certificate + + +class UploadCertificateResponse(Model): + """The upload registration certificate response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param auth_type: Specifies authentication type. Possible values include: + 'Invalid', 'AzureActiveDirectory' + :type auth_type: str or ~azure.mgmt.databoxedge.models.AuthenticationType + :ivar resource_id: The resource ID of the Data Box Edge/Gateway device. + :vartype resource_id: str + :ivar aad_authority: Azure Active Directory tenant authority. + :vartype aad_authority: str + :ivar aad_tenant_id: Azure Active Directory tenant ID. + :vartype aad_tenant_id: str + :ivar service_principal_client_id: Azure Active Directory service + principal client ID. + :vartype service_principal_client_id: str + :ivar service_principal_object_id: Azure Active Directory service + principal object ID. + :vartype service_principal_object_id: str + :ivar azure_management_endpoint_audience: The azure management endpoint + audience. + :vartype azure_management_endpoint_audience: str + :ivar aad_audience: Identifier of the target resource that is the + recipient of the requested token. + :vartype aad_audience: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'aad_authority': {'readonly': True}, + 'aad_tenant_id': {'readonly': True}, + 'service_principal_client_id': {'readonly': True}, + 'service_principal_object_id': {'readonly': True}, + 'azure_management_endpoint_audience': {'readonly': True}, + 'aad_audience': {'readonly': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'aad_authority': {'key': 'aadAuthority', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, + 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + } + + def __init__(self, *, auth_type=None, **kwargs) -> None: + super(UploadCertificateResponse, self).__init__(**kwargs) + self.auth_type = auth_type + self.resource_id = None + self.aad_authority = None + self.aad_tenant_id = None + self.service_principal_client_id = None + self.service_principal_object_id = None + self.azure_management_endpoint_audience = None + self.aad_audience = None + + +class User(ARMBaseModel): + """Represents a user who has access to one or more shares on the Data Box + Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: User in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param encrypted_password: The password details. + :type encrypted_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :ivar share_access_rights: List of shares that the user has rights on. + This field should not be specified during user creation. + :vartype share_access_rights: + list[~azure.mgmt.databoxedge.models.ShareAccessRight] + :param user_type: Required. Type of the user. Possible values include: + 'Share', 'LocalManagement', 'ARM' + :type user_type: str or ~azure.mgmt.databoxedge.models.UserType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_access_rights': {'readonly': True}, + 'user_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'encrypted_password': {'key': 'properties.encryptedPassword', 'type': 'AsymmetricEncryptedSecret'}, + 'share_access_rights': {'key': 'properties.shareAccessRights', 'type': '[ShareAccessRight]'}, + 'user_type': {'key': 'properties.userType', 'type': 'str'}, + } + + def __init__(self, *, user_type, system_data=None, encrypted_password=None, **kwargs) -> None: + super(User, self).__init__(**kwargs) + self.system_data = system_data + self.encrypted_password = encrypted_password + self.share_access_rights = None + self.user_type = user_type + + +class UserAccessRight(Model): + """The mapping between a particular user and the access type on the SMB share. + + All required parameters must be populated in order to send to Azure. + + :param user_id: Required. User ID (already existing in the device). + :type user_id: str + :param access_type: Required. Type of access to be allowed for the user. + Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'user_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, *, user_id: str, access_type, **kwargs) -> None: + super(UserAccessRight, self).__init__(**kwargs) + self.user_id = user_id + self.access_type = access_type diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_paged_models.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_paged_models.py new file mode 100644 index 000000000000..644a4942ff0e --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/models/_paged_models.py @@ -0,0 +1,222 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class DataBoxEdgeSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`DataBoxEdgeSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataBoxEdgeSku]'} + } + + def __init__(self, *args, **kwargs): + + super(DataBoxEdgeSkuPaged, self).__init__(*args, **kwargs) +class DataBoxEdgeDevicePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataBoxEdgeDevice ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataBoxEdgeDevice]'} + } + + def __init__(self, *args, **kwargs): + + super(DataBoxEdgeDevicePaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class BandwidthSchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`BandwidthSchedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BandwidthSchedule]'} + } + + def __init__(self, *args, **kwargs): + + super(BandwidthSchedulePaged, self).__init__(*args, **kwargs) +class NodePaged(Paged): + """ + A paging container for iterating over a list of :class:`Node ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Node]'} + } + + def __init__(self, *args, **kwargs): + + super(NodePaged, self).__init__(*args, **kwargs) +class OrderPaged(Paged): + """ + A paging container for iterating over a list of :class:`Order ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Order]'} + } + + def __init__(self, *args, **kwargs): + + super(OrderPaged, self).__init__(*args, **kwargs) +class RolePaged(Paged): + """ + A paging container for iterating over a list of :class:`Role ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Role]'} + } + + def __init__(self, *args, **kwargs): + + super(RolePaged, self).__init__(*args, **kwargs) +class AddonPaged(Paged): + """ + A paging container for iterating over a list of :class:`Addon ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Addon]'} + } + + def __init__(self, *args, **kwargs): + + super(AddonPaged, self).__init__(*args, **kwargs) +class MonitoringMetricConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`MonitoringMetricConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MonitoringMetricConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(MonitoringMetricConfigurationPaged, self).__init__(*args, **kwargs) +class SharePaged(Paged): + """ + A paging container for iterating over a list of :class:`Share ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Share]'} + } + + def __init__(self, *args, **kwargs): + + super(SharePaged, self).__init__(*args, **kwargs) +class StorageAccountCredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`StorageAccountCredential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StorageAccountCredential]'} + } + + def __init__(self, *args, **kwargs): + + super(StorageAccountCredentialPaged, self).__init__(*args, **kwargs) +class StorageAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`StorageAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StorageAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(StorageAccountPaged, self).__init__(*args, **kwargs) +class ContainerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Container ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Container]'} + } + + def __init__(self, *args, **kwargs): + + super(ContainerPaged, self).__init__(*args, **kwargs) +class TriggerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Trigger ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Trigger]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggerPaged, self).__init__(*args, **kwargs) +class UserPaged(Paged): + """ + A paging container for iterating over a list of :class:`User ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[User]'} + } + + def __init__(self, *args, **kwargs): + + super(UserPaged, self).__init__(*args, **kwargs) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/__init__.py new file mode 100644 index 000000000000..fad9a2d17114 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/__init__.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 ._operations import Operations +from ._available_skus_operations import AvailableSkusOperations +from ._devices_operations import DevicesOperations +from ._alerts_operations import AlertsOperations +from ._bandwidth_schedules_operations import BandwidthSchedulesOperations +from ._jobs_operations import JobsOperations +from ._nodes_operations import NodesOperations +from ._operations_status_operations import OperationsStatusOperations +from ._orders_operations import OrdersOperations +from ._roles_operations import RolesOperations +from ._addons_operations import AddonsOperations +from ._monitoring_config_operations import MonitoringConfigOperations +from ._shares_operations import SharesOperations +from ._storage_account_credentials_operations import StorageAccountCredentialsOperations +from ._storage_accounts_operations import StorageAccountsOperations +from ._containers_operations import ContainersOperations +from ._triggers_operations import TriggersOperations +from ._users_operations import UsersOperations + +__all__ = [ + 'Operations', + 'AvailableSkusOperations', + 'DevicesOperations', + 'AlertsOperations', + 'BandwidthSchedulesOperations', + 'JobsOperations', + 'NodesOperations', + 'OperationsStatusOperations', + 'OrdersOperations', + 'RolesOperations', + 'AddonsOperations', + 'MonitoringConfigOperations', + 'SharesOperations', + 'StorageAccountCredentialsOperations', + 'StorageAccountsOperations', + 'ContainersOperations', + 'TriggersOperations', + 'UsersOperations', +] diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_addons_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_addons_operations.py new file mode 100644 index 000000000000..e22f71786672 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_addons_operations.py @@ -0,0 +1,379 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +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 AddonsOperations(object): + """AddonsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_role( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the addons configured in the role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Addon + :rtype: + ~azure.mgmt.databoxedge.models.AddonPaged[~azure.mgmt.databoxedge.models.Addon] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_role.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AddonPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_role.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons'} + + def get( + self, device_name, role_name, addon_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific addon by name. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param addon_name: The addon name. + :type addon_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Addon or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Addon or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + 'addonName': self._serialize.url("addon_name", addon_name, 'str'), + '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') + + # 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('Addon', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}'} + + + def _create_or_update_initial( + self, device_name, role_name, addon_name, addon, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + 'addonName': self._serialize.url("addon_name", addon_name, 'str'), + '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') + + # 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(addon, 'Addon') + + # 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('Addon', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, role_name, addon_name, addon, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a addon. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param addon_name: The addon name. + :type addon_name: str + :param addon: The addon properties. + :type addon: ~azure.mgmt.databoxedge.models.Addon + :param resource_group_name: The resource group name. + :type resource_group_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 Addon or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Addon] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Addon]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + addon=addon, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Addon', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}'} + + + def _delete_initial( + self, device_name, role_name, addon_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + 'addonName': self._serialize.url("addon_name", addon_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, role_name, addon_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the addon on the device. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param addon_name: The addon name. + :type addon_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_alerts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_alerts_operations.py new file mode 100644 index 000000000000..630bdc6175f6 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_alerts_operations.py @@ -0,0 +1,176 @@ +# 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 AlertsOperations(object): + """AlertsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the alerts for a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Alert + :rtype: + ~azure.mgmt.databoxedge.models.AlertPaged[~azure.mgmt.databoxedge.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets an alert by name. + + :param device_name: The device name. + :type device_name: str + :param name: The alert name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Alert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Alert or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Alert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_available_skus_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_available_skus_operations.py new file mode 100644 index 000000000000..442a81bda821 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_available_skus_operations.py @@ -0,0 +1,106 @@ +# 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 AvailableSkusOperations(object): + """AvailableSkusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all the available Skus and information related to them. + + :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 DataBoxEdgeSku + :rtype: + ~azure.mgmt.databoxedge.models.DataBoxEdgeSkuPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataBoxEdgeSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/availableSkus'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_bandwidth_schedules_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_bandwidth_schedules_operations.py new file mode 100644 index 000000000000..a2ad3185a29b --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_bandwidth_schedules_operations.py @@ -0,0 +1,367 @@ +# 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 BandwidthSchedulesOperations(object): + """BandwidthSchedulesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 BandwidthSchedule + :rtype: + ~azure.mgmt.databoxedge.models.BandwidthSchedulePaged[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BandwidthSchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified bandwidth schedule. + + :param device_name: The device name. + :type device_name: str + :param name: The bandwidth schedule name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: BandwidthSchedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.BandwidthSchedule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('BandwidthSchedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} + + + def _create_or_update_initial( + self, device_name, name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(parameters, 'BandwidthSchedule') + + # 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('BandwidthSchedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, parameters, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. + :type device_name: str + :param name: The bandwidth schedule name which needs to be + added/updated. + :type name: str + :param parameters: The bandwidth schedule to be added or updated. + :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule + :param resource_group_name: The resource group name. + :type resource_group_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 BandwidthSchedule or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.BandwidthSchedule]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + parameters=parameters, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BandwidthSchedule', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified bandwidth schedule. + + :param device_name: The device name. + :type device_name: str + :param name: The bandwidth schedule name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_containers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_containers_operations.py new file mode 100644 index 000000000000..ce56aee8b634 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_containers_operations.py @@ -0,0 +1,467 @@ +# 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 ContainersOperations(object): + """ContainersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_storage_account( + self, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the containers of a storage Account in a Data Box Edge/Data + Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The storage Account name. + :type storage_account_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Container + :rtype: + ~azure.mgmt.databoxedge.models.ContainerPaged[~azure.mgmt.databoxedge.models.Container] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_storage_account.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContainerPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_storage_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers'} + + def get( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a container by name. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container Name + :type container_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Container or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Container or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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('Container', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}'} + + + def _create_or_update_initial( + self, device_name, storage_account_name, container_name, container, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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(container, 'Container') + + # 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('Container', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, storage_account_name, container_name, container, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new container or updates an existing container on the device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container name. + :type container_name: str + :param container: The container properties. + :type container: ~azure.mgmt.databoxedge.models.Container + :param resource_group_name: The resource group name. + :type resource_group_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 Container or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Container] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Container]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + container=container, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Container', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}'} + + + def _delete_initial( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the container on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container name. + :type container_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}'} + + + def _refresh_initial( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.refresh.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def refresh( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Refreshes the container metadata with the data from the cloud. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container name. + :type container_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._refresh_initial( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_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) + refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}/refresh'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_devices_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_devices_operations.py new file mode 100644 index 000000000000..2c1f5fb6c998 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_devices_operations.py @@ -0,0 +1,1211 @@ +# 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 DevicesOperations(object): + """DevicesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_subscription( + self, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets all the Data Box Edge/Data Box Gateway devices in a subscription. + + :param expand: Specify $expand=details to populate additional fields + related to the resource or Specify $skipToken= to populate the + next page in the list. + :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: An iterator like instance of DataBoxEdgeDevice + :rtype: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.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 expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataBoxEdgeDevicePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices'} + + def list_by_resource_group( + self, resource_group_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets all the Data Box Edge/Data Box Gateway devices in a resource + group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param expand: Specify $expand=details to populate additional fields + related to the resource or Specify $skipToken= to populate the + next page in the list. + :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: An iterator like instance of DataBoxEdgeDevice + :rtype: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataBoxEdgeDevicePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices'} + + def get( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDevice or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('DataBoxEdgeDevice', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + + def _create_or_update_initial( + self, device_name, data_box_edge_device, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(data_box_edge_device, 'DataBoxEdgeDevice') + + # 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]: + 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('DataBoxEdgeDevice', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, data_box_edge_device, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. + :type device_name: str + :param data_box_edge_device: The resource object. + :type data_box_edge_device: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :param resource_group_name: The resource group name. + :type resource_group_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 DataBoxEdgeDevice or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + data_box_edge_device=data_box_edge_device, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('DataBoxEdgeDevice', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + + def _delete_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + def update( + self, device_name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. + :type device_name: str + :param parameters: The resource parameters. + :type parameters: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDevice or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(parameters, 'DataBoxEdgeDevicePatch') + + # 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]: + 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('DataBoxEdgeDevice', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + + def _download_updates_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.download_updates.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def download_updates( + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Downloads the updates on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._download_updates_initial( + device_name=device_name, + resource_group_name=resource_group_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) + download_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates'} + + def generate_certificate( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Generates certificate for activation key. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: GenerateCertResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.GenerateCertResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generate_certificate.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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 + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GenerateCertResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generate_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/generateCertificate'} + + def get_extended_information( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets additional information for the specified Azure Stack Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDeviceExtendedInfo or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_extended_information.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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 + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataBoxEdgeDeviceExtendedInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_extended_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation'} + + + def _install_updates_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_updates.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def install_updates( + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Installs the updates on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._install_updates_initial( + device_name=device_name, + resource_group_name=resource_group_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) + install_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates'} + + def get_network_settings( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the network settings of the specified Data Box Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: NetworkSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.NetworkSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_network_settings.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('NetworkSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default'} + + + def _scan_for_updates_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.scan_for_updates.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def scan_for_updates( + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Scans for updates on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._scan_for_updates_initial( + device_name=device_name, + resource_group_name=resource_group_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) + scan_for_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates'} + + + def _create_or_update_security_settings_initial( + self, device_name, security_settings, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_security_settings.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(security_settings, 'SecuritySettings') + + # 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 [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 create_or_update_security_settings( + self, device_name, security_settings, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates the security settings on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param security_settings: The security settings. + :type security_settings: + ~azure.mgmt.databoxedge.models.SecuritySettings + :param resource_group_name: The resource group name. + :type resource_group_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._create_or_update_security_settings_initial( + device_name=device_name, + security_settings=security_settings, + resource_group_name=resource_group_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) + create_or_update_security_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update'} + + def update_extended_information( + self, device_name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets additional information for the specified Data Box Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param parameters: The patch object. + :type parameters: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDeviceExtendedInfo or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_extended_information.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(parameters, 'DataBoxEdgeDeviceExtendedInfoPatch') + + # 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('DataBoxEdgeDeviceExtendedInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_extended_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateExtendedInformation'} + + def get_update_summary( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets information about the availability of updates based on the last + scan of the device. It also gets information about any ongoing download + or install jobs on the device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: UpdateSummary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.UpdateSummary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_update_summary.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('UpdateSummary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_update_summary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default'} + + def upload_certificate( + self, device_name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Uploads registration certificate for the device. + + :param device_name: The device name. + :type device_name: str + :param parameters: The upload certificate request. + :type parameters: + ~azure.mgmt.databoxedge.models.UploadCertificateRequest + :param resource_group_name: The resource group name. + :type resource_group_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: UploadCertificateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.upload_certificate.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(parameters, 'UploadCertificateRequest') + + # 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('UploadCertificateResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + upload_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_jobs_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_jobs_operations.py new file mode 100644 index 000000000000..d93a6b16b2cc --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_jobs_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobsOperations(object): + """JobsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the details of a specified job on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param name: The job name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_monitoring_config_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_monitoring_config_operations.py new file mode 100644 index 000000000000..43e3b1094b43 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_monitoring_config_operations.py @@ -0,0 +1,372 @@ +# 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 MonitoringConfigOperations(object): + """MonitoringConfigOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists metric configurations in a role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 MonitoringMetricConfiguration + :rtype: + ~azure.mgmt.databoxedge.models.MonitoringMetricConfigurationPaged[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MonitoringMetricConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig'} + + def get( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a metric configuration of a role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: MonitoringMetricConfiguration or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + # 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('MonitoringMetricConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default'} + + + def _create_or_update_initial( + self, device_name, role_name, monitoring_metric_configuration, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + # 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(monitoring_metric_configuration, 'MonitoringMetricConfiguration') + + # 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('MonitoringMetricConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, role_name, monitoring_metric_configuration, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new metric configuration or updates an existing one for a + role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param monitoring_metric_configuration: The metric configuration. + :type monitoring_metric_configuration: + ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration + :param resource_group_name: The resource group name. + :type resource_group_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 + MonitoringMetricConfiguration or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + role_name=role_name, + monitoring_metric_configuration=monitoring_metric_configuration, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MonitoringMetricConfiguration', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default'} + + + def _delete_initial( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, role_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """deletes a new metric configuration for a role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_nodes_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_nodes_operations.py new file mode 100644 index 000000000000..19df8ba51afa --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_nodes_operations.py @@ -0,0 +1,113 @@ +# 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 NodesOperations(object): + """NodesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the nodes currently configured under this Data Box Edge + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Node + :rtype: + ~azure.mgmt.databoxedge.models.NodePaged[~azure.mgmt.databoxedge.models.Node] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NodePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/nodes'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_operations.py new file mode 100644 index 000000000000..f8550ad6bb8b --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all the supported 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.databoxedge.models.OperationPaged[~azure.mgmt.databoxedge.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DataBoxEdge/operations'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_operations_status_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_operations_status_operations.py new file mode 100644 index 000000000000..0439f31fd5fa --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_operations_status_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class OperationsStatusOperations(object): + """OperationsStatusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the details of a specified job on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param name: The job name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_orders_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_orders_operations.py new file mode 100644 index 000000000000..84a964ea99cc --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_orders_operations.py @@ -0,0 +1,416 @@ +# 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 OrdersOperations(object): + """OrdersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the orders related to a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Order + :rtype: + ~azure.mgmt.databoxedge.models.OrderPaged[~azure.mgmt.databoxedge.models.Order] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders'} + + def get( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific order by name. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Order or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Order or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('Order', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + + + def _create_or_update_initial( + self, device_name, order, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(order, 'Order') + + # 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('Order', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, order, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an order. + + :param device_name: The order details of a device. + :type device_name: str + :param order: The order to be created or updated. + :type order: ~azure.mgmt.databoxedge.models.Order + :param resource_group_name: The resource group name. + :type resource_group_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 Order or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Order] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Order]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + order=order, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Order', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + + + def _delete_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the order related to the device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + + def list_dc_access_code( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the DCAccess Code. + + :param device_name: The device name + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: DCAccessCode or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.DCAccessCode or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_dc_access_code.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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 + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DCAccessCode', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_dc_access_code.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default/listDCAccessCode'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_roles_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_roles_operations.py new file mode 100644 index 000000000000..9a2fb8c90885 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_roles_operations.py @@ -0,0 +1,366 @@ +# 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 RolesOperations(object): + """RolesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the roles configured in a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Role + :rtype: + ~azure.mgmt.databoxedge.models.RolePaged[~azure.mgmt.databoxedge.models.Role] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RolePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific role by name. + + :param device_name: The device name. + :type device_name: str + :param name: The role name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Role or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Role or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Role', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} + + + def _create_or_update_initial( + self, device_name, name, role, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(role, 'Role') + + # 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('Role', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, role, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a role. + + :param device_name: The device name. + :type device_name: str + :param name: The role name. + :type name: str + :param role: The role properties. + :type role: ~azure.mgmt.databoxedge.models.Role + :param resource_group_name: The resource group name. + :type resource_group_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 Role or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Role] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Role]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + role=role, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Role', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the role on the device. + + :param device_name: The device name. + :type device_name: str + :param name: The role name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_shares_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_shares_operations.py new file mode 100644 index 000000000000..c16617abfe1d --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_shares_operations.py @@ -0,0 +1,448 @@ +# 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 SharesOperations(object): + """SharesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the shares in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Share + :rtype: + ~azure.mgmt.databoxedge.models.SharePaged[~azure.mgmt.databoxedge.models.Share] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SharePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a share by name. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Share or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Share or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Share', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + + + def _create_or_update_initial( + self, device_name, name, share, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(share, 'Share') + + # 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('Share', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, share, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new share or updates an existing share on the device. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param share: The share properties. + :type share: ~azure.mgmt.databoxedge.models.Share + :param resource_group_name: The resource group name. + :type resource_group_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 Share or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Share] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Share]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + share=share, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Share', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the share on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + + + def _refresh_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.refresh.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def refresh( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Refreshes the share metadata with the data from the cloud. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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._refresh_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_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) + refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_storage_account_credentials_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_storage_account_credentials_operations.py new file mode 100644 index 000000000000..f8d599b96d31 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_storage_account_credentials_operations.py @@ -0,0 +1,368 @@ +# 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 StorageAccountCredentialsOperations(object): + """StorageAccountCredentialsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the storage account credentials in a Data Box Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 StorageAccountCredential + :rtype: + ~azure.mgmt.databoxedge.models.StorageAccountCredentialPaged[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StorageAccountCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified storage account credential. + + :param device_name: The device name. + :type device_name: str + :param name: The storage account credential name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: StorageAccountCredential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.StorageAccountCredential or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('StorageAccountCredential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} + + + def _create_or_update_initial( + self, device_name, name, storage_account_credential, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(storage_account_credential, 'StorageAccountCredential') + + # 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('StorageAccountCredential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, storage_account_credential, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates the storage account credential. + + :param device_name: The device name. + :type device_name: str + :param name: The storage account credential name. + :type name: str + :param storage_account_credential: The storage account credential. + :type storage_account_credential: + ~azure.mgmt.databoxedge.models.StorageAccountCredential + :param resource_group_name: The resource group name. + :type resource_group_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 + StorageAccountCredential or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.StorageAccountCredential]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + storage_account_credential=storage_account_credential, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageAccountCredential', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the storage account credential. + + :param device_name: The device name. + :type device_name: str + :param name: The storage account credential name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_storage_accounts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_storage_accounts_operations.py new file mode 100644 index 000000000000..c02c7be5f2ff --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_storage_accounts_operations.py @@ -0,0 +1,368 @@ +# 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 StorageAccountsOperations(object): + """StorageAccountsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 StorageAccount + :rtype: + ~azure.mgmt.databoxedge.models.StorageAccountPaged[~azure.mgmt.databoxedge.models.StorageAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts'} + + def get( + self, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a StorageAccount by name. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The storage account name. + :type storage_account_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: StorageAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.StorageAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + # 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('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'} + + + def _create_or_update_initial( + self, device_name, storage_account_name, storage_account, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + # 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(storage_account, 'StorageAccount') + + # 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('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, storage_account_name, storage_account, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new StorageAccount or updates an existing StorageAccount on + the device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The StorageAccount name. + :type storage_account_name: str + :param storage_account: The StorageAccount properties. + :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount + :param resource_group_name: The resource group name. + :type resource_group_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 StorageAccount or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.StorageAccount] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.StorageAccount]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + storage_account_name=storage_account_name, + storage_account=storage_account, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageAccount', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'} + + + def _delete_initial( + self, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + # 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, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the StorageAccount on the Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The StorageAccount name. + :type storage_account_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_triggers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_triggers_operations.py new file mode 100644 index 000000000000..a72ac1dad75d --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_triggers_operations.py @@ -0,0 +1,370 @@ +# 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 TriggersOperations(object): + """TriggersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists all the triggers configured in the device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param filter: Specify $filter='CustomContextTag eq ' to filter + on custom context tag property + :type filter: 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 Trigger + :rtype: + ~azure.mgmt.databoxedge.models.TriggerPaged[~azure.mgmt.databoxedge.models.Trigger] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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 filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggerPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get a specific trigger by name. + + :param device_name: The device name. + :type device_name: str + :param name: The trigger name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Trigger or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Trigger or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Trigger', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} + + + def _create_or_update_initial( + self, device_name, name, trigger, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(trigger, 'Trigger') + + # 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('Trigger', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, trigger, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a trigger. + + :param device_name: Creates or updates a trigger + :type device_name: str + :param name: The trigger name. + :type name: str + :param trigger: The trigger. + :type trigger: ~azure.mgmt.databoxedge.models.Trigger + :param resource_group_name: The resource group name. + :type resource_group_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 Trigger or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Trigger] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Trigger]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + trigger=trigger, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Trigger', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the trigger on the gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The trigger name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_users_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_users_operations.py new file mode 100644 index 000000000000..9f64a01160e4 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/operations/_users_operations.py @@ -0,0 +1,372 @@ +# 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 UsersOperations(object): + """UsersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets all the users registered on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param filter: Specify $filter='Type eq ' to filter on user type + property. + :type filter: 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 User + :rtype: + ~azure.mgmt.databoxedge.models.UserPaged[~azure.mgmt.databoxedge.models.User] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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 filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified user. + + :param device_name: The device name. + :type device_name: str + :param name: The user name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} + + + def _create_or_update_initial( + self, device_name, name, user, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(user, 'User') + + # 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('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, user, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new user or updates an existing user's information on a Data + Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The user name. + :type name: str + :param user: The user details. + :type user: ~azure.mgmt.databoxedge.models.User + :param resource_group_name: The resource group name. + :type resource_group_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 User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.User]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + user=user, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the user on a databox edge/gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The user name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/version.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/version.py new file mode 100644 index 000000000000..22afdcf8c3bb --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_12_01/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2020-12-01" + diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/__init__.py new file mode 100644 index 000000000000..5e369aac5f6e --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._configuration import DataBoxEdgeManagementClientConfiguration +from ._data_box_edge_management_client import DataBoxEdgeManagementClient +__all__ = ['DataBoxEdgeManagementClient', 'DataBoxEdgeManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/_configuration.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/_configuration.py new file mode 100644 index 000000000000..c234603c9bea --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class DataBoxEdgeManagementClientConfiguration(AzureConfiguration): + """Configuration for DataBoxEdgeManagementClient + 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(DataBoxEdgeManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-databoxedge/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/_data_box_edge_management_client.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/_data_box_edge_management_client.py new file mode 100644 index 000000000000..c4a717c69af7 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/_data_box_edge_management_client.py @@ -0,0 +1,134 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import DataBoxEdgeManagementClientConfiguration +from .operations import Operations +from .operations import AvailableSkusOperations +from .operations import DevicesOperations +from .operations import AlertsOperations +from .operations import BandwidthSchedulesOperations +from .operations import JobsOperations +from .operations import NodesOperations +from .operations import OperationsStatusOperations +from .operations import OrdersOperations +from .operations import RolesOperations +from .operations import AddonsOperations +from .operations import MonitoringConfigOperations +from .operations import SharesOperations +from .operations import StorageAccountCredentialsOperations +from .operations import StorageAccountsOperations +from .operations import ContainersOperations +from .operations import TriggersOperations +from .operations import UsersOperations +from . import models + + +class DataBoxEdgeManagementClient(SDKClient): + """DataBoxEdgeManagementClient + + :ivar config: Configuration for client. + :vartype config: DataBoxEdgeManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databoxedge.operations.Operations + :ivar available_skus: AvailableSkus operations + :vartype available_skus: azure.mgmt.databoxedge.operations.AvailableSkusOperations + :ivar devices: Devices operations + :vartype devices: azure.mgmt.databoxedge.operations.DevicesOperations + :ivar alerts: Alerts operations + :vartype alerts: azure.mgmt.databoxedge.operations.AlertsOperations + :ivar bandwidth_schedules: BandwidthSchedules operations + :vartype bandwidth_schedules: azure.mgmt.databoxedge.operations.BandwidthSchedulesOperations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.databoxedge.operations.JobsOperations + :ivar nodes: Nodes operations + :vartype nodes: azure.mgmt.databoxedge.operations.NodesOperations + :ivar operations_status: OperationsStatus operations + :vartype operations_status: azure.mgmt.databoxedge.operations.OperationsStatusOperations + :ivar orders: Orders operations + :vartype orders: azure.mgmt.databoxedge.operations.OrdersOperations + :ivar roles: Roles operations + :vartype roles: azure.mgmt.databoxedge.operations.RolesOperations + :ivar addons: Addons operations + :vartype addons: azure.mgmt.databoxedge.operations.AddonsOperations + :ivar monitoring_config: MonitoringConfig operations + :vartype monitoring_config: azure.mgmt.databoxedge.operations.MonitoringConfigOperations + :ivar shares: Shares operations + :vartype shares: azure.mgmt.databoxedge.operations.SharesOperations + :ivar storage_account_credentials: StorageAccountCredentials operations + :vartype storage_account_credentials: azure.mgmt.databoxedge.operations.StorageAccountCredentialsOperations + :ivar storage_accounts: StorageAccounts operations + :vartype storage_accounts: azure.mgmt.databoxedge.operations.StorageAccountsOperations + :ivar containers: Containers operations + :vartype containers: azure.mgmt.databoxedge.operations.ContainersOperations + :ivar triggers: Triggers operations + :vartype triggers: azure.mgmt.databoxedge.operations.TriggersOperations + :ivar users: Users operations + :vartype users: azure.mgmt.databoxedge.operations.UsersOperations + + :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 = DataBoxEdgeManagementClientConfiguration(credentials, subscription_id, base_url) + super(DataBoxEdgeManagementClient, 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 = '2021-02-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.available_skus = AvailableSkusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.devices = DevicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.alerts = AlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.bandwidth_schedules = BandwidthSchedulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.nodes = NodesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations_status = OperationsStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.orders = OrdersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.roles = RolesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.addons = AddonsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.monitoring_config = MonitoringConfigOperations( + self._client, self.config, self._serialize, self._deserialize) + self.shares = SharesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.storage_account_credentials = StorageAccountCredentialsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.storage_accounts = StorageAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.containers = ContainersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.triggers = TriggersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.users = UsersOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/__init__.py new file mode 100644 index 000000000000..ac940d2950bb --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/__init__.py @@ -0,0 +1,470 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Addon + from ._models_py3 import Address + from ._models_py3 import Alert + from ._models_py3 import AlertErrorDetails + from ._models_py3 import ArcAddon + from ._models_py3 import ARMBaseModel + from ._models_py3 import AsymmetricEncryptedSecret + from ._models_py3 import Authentication + from ._models_py3 import AzureContainerInfo + from ._models_py3 import BandwidthSchedule + from ._models_py3 import ClientAccessRight + from ._models_py3 import CloudEdgeManagementRole + from ._models_py3 import CniConfig + from ._models_py3 import ComputeResource + from ._models_py3 import ContactDetails + from ._models_py3 import Container + from ._models_py3 import DataBoxEdgeDevice + from ._models_py3 import DataBoxEdgeDeviceExtendedInfo + from ._models_py3 import DataBoxEdgeDeviceExtendedInfoPatch + from ._models_py3 import DataBoxEdgeDevicePatch + from ._models_py3 import DataBoxEdgeMoveRequest + from ._models_py3 import DataBoxEdgeSku + from ._models_py3 import DCAccessCode + from ._models_py3 import EdgeProfile + from ._models_py3 import EdgeProfilePatch + from ._models_py3 import EdgeProfileSubscription + from ._models_py3 import EdgeProfileSubscriptionPatch + from ._models_py3 import EtcdInfo + from ._models_py3 import FileEventTrigger + from ._models_py3 import FileSourceInfo + from ._models_py3 import GenerateCertResponse + from ._models_py3 import ImageRepositoryCredential + from ._models_py3 import IoTAddon + from ._models_py3 import IoTDeviceInfo + from ._models_py3 import IoTEdgeAgentInfo + from ._models_py3 import IoTRole + from ._models_py3 import Ipv4Config + from ._models_py3 import Ipv6Config + from ._models_py3 import Job + from ._models_py3 import JobErrorDetails + from ._models_py3 import JobErrorItem + from ._models_py3 import KubernetesClusterInfo + from ._models_py3 import KubernetesIPConfiguration + from ._models_py3 import KubernetesRole + from ._models_py3 import KubernetesRoleCompute + from ._models_py3 import KubernetesRoleNetwork + from ._models_py3 import KubernetesRoleResources + from ._models_py3 import KubernetesRoleStorage + from ._models_py3 import KubernetesRoleStorageClassInfo + from ._models_py3 import LoadBalancerConfig + from ._models_py3 import MECRole + from ._models_py3 import MetricConfiguration + from ._models_py3 import MetricCounter + from ._models_py3 import MetricCounterSet + from ._models_py3 import MetricDimension + from ._models_py3 import MetricDimensionV1 + from ._models_py3 import MetricSpecificationV1 + from ._models_py3 import MonitoringMetricConfiguration + from ._models_py3 import MountPointMap + from ._models_py3 import NetworkAdapter + from ._models_py3 import NetworkAdapterPosition + from ._models_py3 import NetworkSettings + from ._models_py3 import Node + from ._models_py3 import NodeInfo + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import Order + from ._models_py3 import OrderStatus + from ._models_py3 import PeriodicTimerEventTrigger + from ._models_py3 import PeriodicTimerSourceInfo + from ._models_py3 import RefreshDetails + from ._models_py3 import ResourceIdentity + from ._models_py3 import ResourceMoveDetails + from ._models_py3 import ResourceTypeSku + from ._models_py3 import Role + from ._models_py3 import RoleSinkInfo + from ._models_py3 import Secret + from ._models_py3 import SecuritySettings + from ._models_py3 import ServiceSpecification + from ._models_py3 import Share + from ._models_py3 import ShareAccessRight + from ._models_py3 import Sku + from ._models_py3 import SkuCapability + from ._models_py3 import SkuCost + from ._models_py3 import SkuInformation + from ._models_py3 import SkuInformationList + from ._models_py3 import SkuLocationInfo + from ._models_py3 import StorageAccount + from ._models_py3 import StorageAccountCredential + from ._models_py3 import SubscriptionRegisteredFeatures + from ._models_py3 import SymmetricKey + from ._models_py3 import SystemData + from ._models_py3 import TrackingInfo + from ._models_py3 import Trigger + from ._models_py3 import UpdateDetails + from ._models_py3 import UpdateDownloadProgress + from ._models_py3 import UpdateInstallProgress + from ._models_py3 import UpdateSummary + from ._models_py3 import UploadCertificateRequest + from ._models_py3 import UploadCertificateResponse + from ._models_py3 import User + from ._models_py3 import UserAccessRight +except (SyntaxError, ImportError): + from ._models import Addon + from ._models import Address + from ._models import Alert + from ._models import AlertErrorDetails + from ._models import ArcAddon + from ._models import ARMBaseModel + from ._models import AsymmetricEncryptedSecret + from ._models import Authentication + from ._models import AzureContainerInfo + from ._models import BandwidthSchedule + from ._models import ClientAccessRight + from ._models import CloudEdgeManagementRole + from ._models import CniConfig + from ._models import ComputeResource + from ._models import ContactDetails + from ._models import Container + from ._models import DataBoxEdgeDevice + from ._models import DataBoxEdgeDeviceExtendedInfo + from ._models import DataBoxEdgeDeviceExtendedInfoPatch + from ._models import DataBoxEdgeDevicePatch + from ._models import DataBoxEdgeMoveRequest + from ._models import DataBoxEdgeSku + from ._models import DCAccessCode + from ._models import EdgeProfile + from ._models import EdgeProfilePatch + from ._models import EdgeProfileSubscription + from ._models import EdgeProfileSubscriptionPatch + from ._models import EtcdInfo + from ._models import FileEventTrigger + from ._models import FileSourceInfo + from ._models import GenerateCertResponse + from ._models import ImageRepositoryCredential + from ._models import IoTAddon + from ._models import IoTDeviceInfo + from ._models import IoTEdgeAgentInfo + from ._models import IoTRole + from ._models import Ipv4Config + from ._models import Ipv6Config + from ._models import Job + from ._models import JobErrorDetails + from ._models import JobErrorItem + from ._models import KubernetesClusterInfo + from ._models import KubernetesIPConfiguration + from ._models import KubernetesRole + from ._models import KubernetesRoleCompute + from ._models import KubernetesRoleNetwork + from ._models import KubernetesRoleResources + from ._models import KubernetesRoleStorage + from ._models import KubernetesRoleStorageClassInfo + from ._models import LoadBalancerConfig + from ._models import MECRole + from ._models import MetricConfiguration + from ._models import MetricCounter + from ._models import MetricCounterSet + from ._models import MetricDimension + from ._models import MetricDimensionV1 + from ._models import MetricSpecificationV1 + from ._models import MonitoringMetricConfiguration + from ._models import MountPointMap + from ._models import NetworkAdapter + from ._models import NetworkAdapterPosition + from ._models import NetworkSettings + from ._models import Node + from ._models import NodeInfo + from ._models import Operation + from ._models import OperationDisplay + from ._models import Order + from ._models import OrderStatus + from ._models import PeriodicTimerEventTrigger + from ._models import PeriodicTimerSourceInfo + from ._models import RefreshDetails + from ._models import ResourceIdentity + from ._models import ResourceMoveDetails + from ._models import ResourceTypeSku + from ._models import Role + from ._models import RoleSinkInfo + from ._models import Secret + from ._models import SecuritySettings + from ._models import ServiceSpecification + from ._models import Share + from ._models import ShareAccessRight + from ._models import Sku + from ._models import SkuCapability + from ._models import SkuCost + from ._models import SkuInformation + from ._models import SkuInformationList + from ._models import SkuLocationInfo + from ._models import StorageAccount + from ._models import StorageAccountCredential + from ._models import SubscriptionRegisteredFeatures + from ._models import SymmetricKey + from ._models import SystemData + from ._models import TrackingInfo + from ._models import Trigger + from ._models import UpdateDetails + from ._models import UpdateDownloadProgress + from ._models import UpdateInstallProgress + from ._models import UpdateSummary + from ._models import UploadCertificateRequest + from ._models import UploadCertificateResponse + from ._models import User + from ._models import UserAccessRight +from ._paged_models import AddonPaged +from ._paged_models import AlertPaged +from ._paged_models import BandwidthSchedulePaged +from ._paged_models import ContainerPaged +from ._paged_models import DataBoxEdgeDevicePaged +from ._paged_models import DataBoxEdgeSkuPaged +from ._paged_models import MonitoringMetricConfigurationPaged +from ._paged_models import NodePaged +from ._paged_models import OperationPaged +from ._paged_models import OrderPaged +from ._paged_models import RolePaged +from ._paged_models import SharePaged +from ._paged_models import StorageAccountCredentialPaged +from ._paged_models import StorageAccountPaged +from ._paged_models import TriggerPaged +from ._paged_models import UserPaged +from ._data_box_edge_management_client_enums import ( + CreatedByType, + AlertSeverity, + PlatformType, + HostPlatformType, + AddonState, + EncryptionAlgorithm, + AzureContainerDataFormat, + DayOfWeek, + ClientPermissionType, + RoleStatus, + SubscriptionState, + ContainerStatus, + SkuName, + SkuTier, + MsiIdentityType, + DataBoxEdgeDeviceKind, + DataBoxEdgeDeviceStatus, + DeviceType, + RoleTypes, + ResourceMoveStatus, + KeyVaultSyncStatus, + SkuSignupOption, + SkuVersion, + SkuAvailability, + ShipmentType, + MountType, + JobStatus, + JobType, + UpdateOperationStage, + DownloadPhase, + KubernetesNodeType, + KubernetesState, + PosixComplianceStatus, + MetricUnit, + MetricAggregationType, + MetricCategory, + TimeGrain, + NetworkGroup, + NetworkAdapterStatus, + NetworkAdapterRDMAStatus, + NetworkAdapterDHCPStatus, + NodeStatus, + OrderState, + AuthenticationType, + ShareStatus, + MonitoringStatus, + ShareAccessProtocol, + ShareAccessType, + DataPolicy, + StorageAccountStatus, + SSLStatus, + AccountType, + UpdateType, + InstallRebootBehavior, + UpdateStatus, + UpdateOperation, + UserType, +) + +__all__ = [ + 'Addon', + 'Address', + 'Alert', + 'AlertErrorDetails', + 'ArcAddon', + 'ARMBaseModel', + 'AsymmetricEncryptedSecret', + 'Authentication', + 'AzureContainerInfo', + 'BandwidthSchedule', + 'ClientAccessRight', + 'CloudEdgeManagementRole', + 'CniConfig', + 'ComputeResource', + 'ContactDetails', + 'Container', + 'DataBoxEdgeDevice', + 'DataBoxEdgeDeviceExtendedInfo', + 'DataBoxEdgeDeviceExtendedInfoPatch', + 'DataBoxEdgeDevicePatch', + 'DataBoxEdgeMoveRequest', + 'DataBoxEdgeSku', + 'DCAccessCode', + 'EdgeProfile', + 'EdgeProfilePatch', + 'EdgeProfileSubscription', + 'EdgeProfileSubscriptionPatch', + 'EtcdInfo', + 'FileEventTrigger', + 'FileSourceInfo', + 'GenerateCertResponse', + 'ImageRepositoryCredential', + 'IoTAddon', + 'IoTDeviceInfo', + 'IoTEdgeAgentInfo', + 'IoTRole', + 'Ipv4Config', + 'Ipv6Config', + 'Job', + 'JobErrorDetails', + 'JobErrorItem', + 'KubernetesClusterInfo', + 'KubernetesIPConfiguration', + 'KubernetesRole', + 'KubernetesRoleCompute', + 'KubernetesRoleNetwork', + 'KubernetesRoleResources', + 'KubernetesRoleStorage', + 'KubernetesRoleStorageClassInfo', + 'LoadBalancerConfig', + 'MECRole', + 'MetricConfiguration', + 'MetricCounter', + 'MetricCounterSet', + 'MetricDimension', + 'MetricDimensionV1', + 'MetricSpecificationV1', + 'MonitoringMetricConfiguration', + 'MountPointMap', + 'NetworkAdapter', + 'NetworkAdapterPosition', + 'NetworkSettings', + 'Node', + 'NodeInfo', + 'Operation', + 'OperationDisplay', + 'Order', + 'OrderStatus', + 'PeriodicTimerEventTrigger', + 'PeriodicTimerSourceInfo', + 'RefreshDetails', + 'ResourceIdentity', + 'ResourceMoveDetails', + 'ResourceTypeSku', + 'Role', + 'RoleSinkInfo', + 'Secret', + 'SecuritySettings', + 'ServiceSpecification', + 'Share', + 'ShareAccessRight', + 'Sku', + 'SkuCapability', + 'SkuCost', + 'SkuInformation', + 'SkuInformationList', + 'SkuLocationInfo', + 'StorageAccount', + 'StorageAccountCredential', + 'SubscriptionRegisteredFeatures', + 'SymmetricKey', + 'SystemData', + 'TrackingInfo', + 'Trigger', + 'UpdateDetails', + 'UpdateDownloadProgress', + 'UpdateInstallProgress', + 'UpdateSummary', + 'UploadCertificateRequest', + 'UploadCertificateResponse', + 'User', + 'UserAccessRight', + 'OperationPaged', + 'DataBoxEdgeSkuPaged', + 'DataBoxEdgeDevicePaged', + 'AlertPaged', + 'BandwidthSchedulePaged', + 'NodePaged', + 'OrderPaged', + 'RolePaged', + 'AddonPaged', + 'MonitoringMetricConfigurationPaged', + 'SharePaged', + 'StorageAccountCredentialPaged', + 'StorageAccountPaged', + 'ContainerPaged', + 'TriggerPaged', + 'UserPaged', + 'CreatedByType', + 'AlertSeverity', + 'PlatformType', + 'HostPlatformType', + 'AddonState', + 'EncryptionAlgorithm', + 'AzureContainerDataFormat', + 'DayOfWeek', + 'ClientPermissionType', + 'RoleStatus', + 'SubscriptionState', + 'ContainerStatus', + 'SkuName', + 'SkuTier', + 'MsiIdentityType', + 'DataBoxEdgeDeviceKind', + 'DataBoxEdgeDeviceStatus', + 'DeviceType', + 'RoleTypes', + 'ResourceMoveStatus', + 'KeyVaultSyncStatus', + 'SkuSignupOption', + 'SkuVersion', + 'SkuAvailability', + 'ShipmentType', + 'MountType', + 'JobStatus', + 'JobType', + 'UpdateOperationStage', + 'DownloadPhase', + 'KubernetesNodeType', + 'KubernetesState', + 'PosixComplianceStatus', + 'MetricUnit', + 'MetricAggregationType', + 'MetricCategory', + 'TimeGrain', + 'NetworkGroup', + 'NetworkAdapterStatus', + 'NetworkAdapterRDMAStatus', + 'NetworkAdapterDHCPStatus', + 'NodeStatus', + 'OrderState', + 'AuthenticationType', + 'ShareStatus', + 'MonitoringStatus', + 'ShareAccessProtocol', + 'ShareAccessType', + 'DataPolicy', + 'StorageAccountStatus', + 'SSLStatus', + 'AccountType', + 'UpdateType', + 'InstallRebootBehavior', + 'UpdateStatus', + 'UpdateOperation', + 'UserType', +] diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_data_box_edge_management_client_enums.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_data_box_edge_management_client_enums.py new file mode 100644 index 000000000000..f6ef43a65f82 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_data_box_edge_management_client_enums.py @@ -0,0 +1,503 @@ +# 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 CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + +class AlertSeverity(str, Enum): + + informational = "Informational" + warning = "Warning" + critical = "Critical" + + +class PlatformType(str, Enum): + + windows = "Windows" + linux = "Linux" + + +class HostPlatformType(str, Enum): + + kubernetes_cluster = "KubernetesCluster" + linux_vm = "LinuxVM" + + +class AddonState(str, Enum): + + invalid = "Invalid" + creating = "Creating" + created = "Created" + updating = "Updating" + reconfiguring = "Reconfiguring" + failed = "Failed" + deleting = "Deleting" + + +class EncryptionAlgorithm(str, Enum): + + none = "None" + aes256 = "AES256" + rsaes_pkcs1_v_1_5 = "RSAES_PKCS1_v_1_5" + + +class AzureContainerDataFormat(str, Enum): + + block_blob = "BlockBlob" + page_blob = "PageBlob" + azure_file = "AzureFile" + + +class DayOfWeek(str, Enum): + + sunday = "Sunday" + monday = "Monday" + tuesday = "Tuesday" + wednesday = "Wednesday" + thursday = "Thursday" + friday = "Friday" + saturday = "Saturday" + + +class ClientPermissionType(str, Enum): + + no_access = "NoAccess" + read_only = "ReadOnly" + read_write = "ReadWrite" + + +class RoleStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class SubscriptionState(str, Enum): + + registered = "Registered" + warned = "Warned" + suspended = "Suspended" + deleted = "Deleted" + unregistered = "Unregistered" + + +class ContainerStatus(str, Enum): + + ok = "OK" + offline = "Offline" + unknown = "Unknown" + updating = "Updating" + needs_attention = "NeedsAttention" + + +class SkuName(str, Enum): + + gateway = "Gateway" + edge = "Edge" + tea_1_node = "TEA_1Node" + tea_1_node_ups = "TEA_1Node_UPS" + tea_1_node_heater = "TEA_1Node_Heater" + tea_1_node_ups_heater = "TEA_1Node_UPS_Heater" + tea_4_node_heater = "TEA_4Node_Heater" + tea_4_node_ups_heater = "TEA_4Node_UPS_Heater" + tma = "TMA" + tdc = "TDC" + tca_small = "TCA_Small" + gpu = "GPU" + tca_large = "TCA_Large" + edge_p_base = "EdgeP_Base" + edge_p_high = "EdgeP_High" + edge_pr_base = "EdgePR_Base" + edge_pr_base_ups = "EdgePR_Base_UPS" + ep2_64_1_vpu_w = "EP2_64_1VPU_W" + ep2_128_1_t4_mx1_w = "EP2_128_1T4_Mx1_W" + ep2_256_2_t4_w = "EP2_256_2T4_W" + edge_mr_mini = "EdgeMR_Mini" + rca_small = "RCA_Small" + rca_large = "RCA_Large" + rdc = "RDC" + management = "Management" + + +class SkuTier(str, Enum): + + standard = "Standard" + + +class MsiIdentityType(str, Enum): + + none = "None" + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + + +class DataBoxEdgeDeviceKind(str, Enum): + + azure_data_box_gateway = "AzureDataBoxGateway" + azure_stack_edge = "AzureStackEdge" + azure_stack_hub = "AzureStackHub" + azure_modular_data_centre = "AzureModularDataCentre" + + +class DataBoxEdgeDeviceStatus(str, Enum): + + ready_to_setup = "ReadyToSetup" + online = "Online" + offline = "Offline" + needs_attention = "NeedsAttention" + disconnected = "Disconnected" + partially_disconnected = "PartiallyDisconnected" + maintenance = "Maintenance" + + +class DeviceType(str, Enum): + + data_box_edge_device = "DataBoxEdgeDevice" + + +class RoleTypes(str, Enum): + + iot = "IOT" + asa = "ASA" + functions = "Functions" + cognitive = "Cognitive" + mec = "MEC" + cloud_edge_management = "CloudEdgeManagement" + kubernetes = "Kubernetes" + + +class ResourceMoveStatus(str, Enum): + + none = "None" + resource_move_in_progress = "ResourceMoveInProgress" + resource_move_failed = "ResourceMoveFailed" + + +class KeyVaultSyncStatus(str, Enum): + + key_vault_synced = "KeyVaultSynced" + key_vault_sync_failed = "KeyVaultSyncFailed" + key_vault_not_configured = "KeyVaultNotConfigured" + key_vault_sync_pending = "KeyVaultSyncPending" + key_vault_syncing = "KeyVaultSyncing" + key_vault_not_synced = "KeyVaultNotSynced" + + +class SkuSignupOption(str, Enum): + + none = "None" + available = "Available" + + +class SkuVersion(str, Enum): + + stable = "Stable" + preview = "Preview" + + +class SkuAvailability(str, Enum): + + available = "Available" + unavailable = "Unavailable" + + +class ShipmentType(str, Enum): + + not_applicable = "NotApplicable" + shipped_to_customer = "ShippedToCustomer" + self_pickup = "SelfPickup" + + +class MountType(str, Enum): + + volume = "Volume" + host_path = "HostPath" + + +class JobStatus(str, Enum): + + invalid = "Invalid" + running = "Running" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + paused = "Paused" + scheduled = "Scheduled" + + +class JobType(str, Enum): + + invalid = "Invalid" + scan_for_updates = "ScanForUpdates" + download_updates = "DownloadUpdates" + install_updates = "InstallUpdates" + refresh_share = "RefreshShare" + refresh_container = "RefreshContainer" + backup = "Backup" + restore = "Restore" + trigger_support_package = "TriggerSupportPackage" + + +class UpdateOperationStage(str, Enum): + + unknown = "Unknown" + initial = "Initial" + scan_started = "ScanStarted" + scan_complete = "ScanComplete" + scan_failed = "ScanFailed" + download_started = "DownloadStarted" + download_complete = "DownloadComplete" + download_failed = "DownloadFailed" + install_started = "InstallStarted" + install_complete = "InstallComplete" + install_failed = "InstallFailed" + reboot_initiated = "RebootInitiated" + success = "Success" + failure = "Failure" + rescan_started = "RescanStarted" + rescan_complete = "RescanComplete" + rescan_failed = "RescanFailed" + + +class DownloadPhase(str, Enum): + + unknown = "Unknown" + initializing = "Initializing" + downloading = "Downloading" + verifying = "Verifying" + + +class KubernetesNodeType(str, Enum): + + invalid = "Invalid" + master = "Master" + worker = "Worker" + + +class KubernetesState(str, Enum): + + invalid = "Invalid" + creating = "Creating" + created = "Created" + updating = "Updating" + reconfiguring = "Reconfiguring" + failed = "Failed" + deleting = "Deleting" + + +class PosixComplianceStatus(str, Enum): + + invalid = "Invalid" + enabled = "Enabled" + disabled = "Disabled" + + +class MetricUnit(str, Enum): + + not_specified = "NotSpecified" + percent = "Percent" + count = "Count" + seconds = "Seconds" + milliseconds = "Milliseconds" + bytes = "Bytes" + bytes_per_second = "BytesPerSecond" + count_per_second = "CountPerSecond" + + +class MetricAggregationType(str, Enum): + + not_specified = "NotSpecified" + none = "None" + average = "Average" + minimum = "Minimum" + maximum = "Maximum" + total = "Total" + count = "Count" + + +class MetricCategory(str, Enum): + + capacity = "Capacity" + transaction = "Transaction" + + +class TimeGrain(str, Enum): + + pt1_m = "PT1M" + pt5_m = "PT5M" + pt15_m = "PT15M" + pt30_m = "PT30M" + pt1_h = "PT1H" + pt6_h = "PT6H" + pt12_h = "PT12H" + pt1_d = "PT1D" + + +class NetworkGroup(str, Enum): + + none = "None" + non_rdma = "NonRDMA" + rdma = "RDMA" + + +class NetworkAdapterStatus(str, Enum): + + inactive = "Inactive" + active = "Active" + + +class NetworkAdapterRDMAStatus(str, Enum): + + incapable = "Incapable" + capable = "Capable" + + +class NetworkAdapterDHCPStatus(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class NodeStatus(str, Enum): + + unknown = "Unknown" + up = "Up" + down = "Down" + rebooting = "Rebooting" + shutting_down = "ShuttingDown" + + +class OrderState(str, Enum): + + untracked = "Untracked" + awaiting_fulfillment = "AwaitingFulfillment" + awaiting_preparation = "AwaitingPreparation" + awaiting_shipment = "AwaitingShipment" + shipped = "Shipped" + arriving = "Arriving" + delivered = "Delivered" + replacement_requested = "ReplacementRequested" + lost_device = "LostDevice" + declined = "Declined" + return_initiated = "ReturnInitiated" + awaiting_return_shipment = "AwaitingReturnShipment" + shipped_back = "ShippedBack" + collected_at_microsoft = "CollectedAtMicrosoft" + awaiting_pickup = "AwaitingPickup" + pickup_completed = "PickupCompleted" + awaiting_drop = "AwaitingDrop" + + +class AuthenticationType(str, Enum): + + invalid = "Invalid" + azure_active_directory = "AzureActiveDirectory" + + +class ShareStatus(str, Enum): + + offline = "Offline" + unknown = "Unknown" + ok = "OK" + updating = "Updating" + needs_attention = "NeedsAttention" + + +class MonitoringStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ShareAccessProtocol(str, Enum): + + smb = "SMB" + nfs = "NFS" + + +class ShareAccessType(str, Enum): + + change = "Change" + read = "Read" + custom = "Custom" + + +class DataPolicy(str, Enum): + + cloud = "Cloud" + local = "Local" + + +class StorageAccountStatus(str, Enum): + + ok = "OK" + offline = "Offline" + unknown = "Unknown" + updating = "Updating" + needs_attention = "NeedsAttention" + + +class SSLStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class AccountType(str, Enum): + + general_purpose_storage = "GeneralPurposeStorage" + blob_storage = "BlobStorage" + + +class UpdateType(str, Enum): + + software = "Software" + kubernetes = "Kubernetes" + firmware = "Firmware" + + +class InstallRebootBehavior(str, Enum): + + never_reboots = "NeverReboots" + requires_reboot = "RequiresReboot" + request_reboot = "RequestReboot" + + +class UpdateStatus(str, Enum): + + download_pending = "DownloadPending" + download_started = "DownloadStarted" + download_completed = "DownloadCompleted" + install_started = "InstallStarted" + install_completed = "InstallCompleted" + + +class UpdateOperation(str, Enum): + + none = "None" + scan = "Scan" + download = "Download" + install = "Install" + + +class UserType(str, Enum): + + share = "Share" + local_management = "LocalManagement" + arm = "ARM" diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_models.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_models.py new file mode 100644 index 000000000000..93210d8612a7 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_models.py @@ -0,0 +1,4607 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ARMBaseModel(Model): + """Represents the base class for all object models. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ARMBaseModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Addon(ARMBaseModel): + """Role Addon. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ArcAddon, IoTAddon + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ArcForKubernetes': 'ArcAddon', 'IotEdge': 'IoTAddon'} + } + + def __init__(self, **kwargs): + super(Addon, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.kind = None + self.kind = 'Addon' + + +class Address(Model): + """The shipping address of the customer. + + All required parameters must be populated in order to send to Azure. + + :param address_line1: The address line1. + :type address_line1: str + :param address_line2: The address line2. + :type address_line2: str + :param address_line3: The address line3. + :type address_line3: str + :param postal_code: The postal code. + :type postal_code: str + :param city: The city name. + :type city: str + :param state: The state name. + :type state: str + :param country: Required. The country name. + :type country: str + """ + + _validation = { + 'country': {'required': True}, + } + + _attribute_map = { + 'address_line1': {'key': 'addressLine1', 'type': 'str'}, + 'address_line2': {'key': 'addressLine2', 'type': 'str'}, + 'address_line3': {'key': 'addressLine3', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Address, self).__init__(**kwargs) + self.address_line1 = kwargs.get('address_line1', None) + self.address_line2 = kwargs.get('address_line2', None) + self.address_line3 = kwargs.get('address_line3', None) + self.postal_code = kwargs.get('postal_code', None) + self.city = kwargs.get('city', None) + self.state = kwargs.get('state', None) + self.country = kwargs.get('country', None) + + +class Alert(ARMBaseModel): + """Alert on the data box edge/gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Alert generated in the resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar title: Alert title. + :vartype title: str + :ivar alert_type: Alert type. + :vartype alert_type: str + :ivar appeared_at_date_time: UTC time when the alert appeared. + :vartype appeared_at_date_time: datetime + :ivar recommendation: Alert recommendation. + :vartype recommendation: str + :ivar severity: Severity of the alert. Possible values include: + 'Informational', 'Warning', 'Critical' + :vartype severity: str or ~azure.mgmt.databoxedge.models.AlertSeverity + :ivar error_details: Error details of the alert. + :vartype error_details: ~azure.mgmt.databoxedge.models.AlertErrorDetails + :ivar detailed_information: Alert details. + :vartype detailed_information: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'appeared_at_date_time': {'readonly': True}, + 'recommendation': {'readonly': True}, + 'severity': {'readonly': True}, + 'error_details': {'readonly': True}, + 'detailed_information': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'appeared_at_date_time': {'key': 'properties.appearedAtDateTime', 'type': 'iso-8601'}, + 'recommendation': {'key': 'properties.recommendation', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'error_details': {'key': 'properties.errorDetails', 'type': 'AlertErrorDetails'}, + 'detailed_information': {'key': 'properties.detailedInformation', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.title = None + self.alert_type = None + self.appeared_at_date_time = None + self.recommendation = None + self.severity = None + self.error_details = None + self.detailed_information = None + + +class AlertErrorDetails(Model): + """Error details for the alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_code: Error code. + :vartype error_code: str + :ivar error_message: Error Message. + :vartype error_message: str + :ivar occurrences: Number of occurrences. + :vartype occurrences: int + """ + + _validation = { + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'occurrences': {'readonly': True}, + } + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'occurrences': {'key': 'occurrences', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertErrorDetails, self).__init__(**kwargs) + self.error_code = None + self.error_message = None + self.occurrences = None + + +class ArcAddon(Addon): + """Arc Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param subscription_id: Required. Arc resource subscription Id + :type subscription_id: str + :param resource_group_name: Required. Arc resource group name + :type resource_group_name: str + :param resource_name: Required. Arc resource Name + :type resource_name: str + :param resource_location: Required. Arc resource location + :type resource_location: str + :ivar version: Arc resource version + :vartype version: str + :ivar host_platform: Host OS supported by the Arc addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'subscription_id': {'required': True}, + 'resource_group_name': {'required': True}, + 'resource_name': {'required': True}, + 'resource_location': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'properties.resourceGroupName', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArcAddon, self).__init__(**kwargs) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.resource_name = kwargs.get('resource_name', None) + self.resource_location = kwargs.get('resource_location', None) + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'ArcForKubernetes' + + +class AsymmetricEncryptedSecret(Model): + """Represent the secrets intended for encryption with asymmetric key pair. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. The value of the secret. + :type value: str + :param encryption_cert_thumbprint: Thumbprint certificate used to encrypt + \\"Value\\". If the value is unencrypted, it will be null. + :type encryption_cert_thumbprint: str + :param encryption_algorithm: Required. The algorithm used to encrypt + "Value". Possible values include: 'None', 'AES256', 'RSAES_PKCS1_v_1_5' + :type encryption_algorithm: str or + ~azure.mgmt.databoxedge.models.EncryptionAlgorithm + """ + + _validation = { + 'value': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'encryption_cert_thumbprint': {'key': 'encryptionCertThumbprint', 'type': 'str'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AsymmetricEncryptedSecret, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.encryption_cert_thumbprint = kwargs.get('encryption_cert_thumbprint', None) + self.encryption_algorithm = kwargs.get('encryption_algorithm', None) + + +class Authentication(Model): + """Authentication mechanism for IoT devices. + + :param symmetric_key: Symmetric key for authentication. + :type symmetric_key: ~azure.mgmt.databoxedge.models.SymmetricKey + """ + + _attribute_map = { + 'symmetric_key': {'key': 'symmetricKey', 'type': 'SymmetricKey'}, + } + + def __init__(self, **kwargs): + super(Authentication, self).__init__(**kwargs) + self.symmetric_key = kwargs.get('symmetric_key', None) + + +class AzureContainerInfo(Model): + """Azure container mapping of the endpoint. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_credential_id: Required. ID of the storage account + credential used to access storage. + :type storage_account_credential_id: str + :param container_name: Required. Container name (Based on the data format + specified, this represents the name of Azure Files/Page blob/Block blob). + :type container_name: str + :param data_format: Required. Storage format used for the file represented + by the share. Possible values include: 'BlockBlob', 'PageBlob', + 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + """ + + _validation = { + 'storage_account_credential_id': {'required': True}, + 'container_name': {'required': True}, + 'data_format': {'required': True}, + } + + _attribute_map = { + 'storage_account_credential_id': {'key': 'storageAccountCredentialId', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'data_format': {'key': 'dataFormat', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureContainerInfo, self).__init__(**kwargs) + self.storage_account_credential_id = kwargs.get('storage_account_credential_id', None) + self.container_name = kwargs.get('container_name', None) + self.data_format = kwargs.get('data_format', None) + + +class BandwidthSchedule(ARMBaseModel): + """The bandwidth schedule details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Bandwidth object related to ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param start: Required. The start time of the schedule in UTC. + :type start: str + :param stop: Required. The stop time of the schedule in UTC. + :type stop: str + :param rate_in_mbps: Required. The bandwidth rate in Mbps. + :type rate_in_mbps: int + :param days: Required. The days of the week when this schedule is + applicable. + :type days: list[str or ~azure.mgmt.databoxedge.models.DayOfWeek] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start': {'required': True}, + 'stop': {'required': True}, + 'rate_in_mbps': {'required': True}, + 'days': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'start': {'key': 'properties.start', 'type': 'str'}, + 'stop': {'key': 'properties.stop', 'type': 'str'}, + 'rate_in_mbps': {'key': 'properties.rateInMbps', 'type': 'int'}, + 'days': {'key': 'properties.days', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(BandwidthSchedule, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.start = kwargs.get('start', None) + self.stop = kwargs.get('stop', None) + self.rate_in_mbps = kwargs.get('rate_in_mbps', None) + self.days = kwargs.get('days', None) + + +class ClientAccessRight(Model): + """The mapping between a particular client IP and the type of access client + has on the NFS share. + + All required parameters must be populated in order to send to Azure. + + :param client: Required. IP of the client. + :type client: str + :param access_permission: Required. Type of access to be allowed for the + client. Possible values include: 'NoAccess', 'ReadOnly', 'ReadWrite' + :type access_permission: str or + ~azure.mgmt.databoxedge.models.ClientPermissionType + """ + + _validation = { + 'client': {'required': True}, + 'access_permission': {'required': True}, + } + + _attribute_map = { + 'client': {'key': 'client', 'type': 'str'}, + 'access_permission': {'key': 'accessPermission', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClientAccessRight, self).__init__(**kwargs) + self.client = kwargs.get('client', None) + self.access_permission = kwargs.get('access_permission', None) + + +class Role(ARMBaseModel): + """Compute role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CloudEdgeManagementRole, IoTRole, KubernetesRole, MECRole + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CloudEdgeManagement': 'CloudEdgeManagementRole', 'IOT': 'IoTRole', 'Kubernetes': 'KubernetesRole', 'MEC': 'MECRole'} + } + + def __init__(self, **kwargs): + super(Role, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.kind = None + self.kind = 'Role' + + +class CloudEdgeManagementRole(Role): + """CloudEdgeManagementRole role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :ivar local_management_status: Local Edge Management Status. Possible + values include: 'Enabled', 'Disabled' + :vartype local_management_status: str or + ~azure.mgmt.databoxedge.models.RoleStatus + :ivar edge_profile: Edge Profile of the resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'local_management_status': {'readonly': True}, + 'edge_profile': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'local_management_status': {'key': 'properties.localManagementStatus', 'type': 'str'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CloudEdgeManagementRole, self).__init__(**kwargs) + self.local_management_status = None + self.edge_profile = None + self.role_status = kwargs.get('role_status', None) + self.kind = 'CloudEdgeManagement' + + +class CloudError(Model): + """An error response from the service. + + :param error: The error details. + :type error: ~azure.mgmt.databoxedge.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.databoxedge.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class CniConfig(Model): + """Cni configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Cni type + :vartype type: str + :ivar version: Cni version + :vartype version: str + :ivar pod_subnet: Pod Subnet + :vartype pod_subnet: str + :ivar service_subnet: Service subnet + :vartype service_subnet: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + 'pod_subnet': {'readonly': True}, + 'service_subnet': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'pod_subnet': {'key': 'podSubnet', 'type': 'str'}, + 'service_subnet': {'key': 'serviceSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CniConfig, self).__init__(**kwargs) + self.type = None + self.version = None + self.pod_subnet = None + self.service_subnet = None + + +class ComputeResource(Model): + """Compute infrastructure Resource. + + All required parameters must be populated in order to send to Azure. + + :param processor_count: Required. Processor count + :type processor_count: int + :param memory_in_gb: Required. Memory in GB + :type memory_in_gb: long + """ + + _validation = { + 'processor_count': {'required': True}, + 'memory_in_gb': {'required': True}, + } + + _attribute_map = { + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(ComputeResource, self).__init__(**kwargs) + self.processor_count = kwargs.get('processor_count', None) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + + +class ContactDetails(Model): + """Contains all the contact details of the customer. + + All required parameters must be populated in order to send to Azure. + + :param contact_person: Required. The contact person name. + :type contact_person: str + :param company_name: Required. The name of the company. + :type company_name: str + :param phone: Required. The phone number. + :type phone: str + :param email_list: Required. The email list. + :type email_list: list[str] + """ + + _validation = { + 'contact_person': {'required': True}, + 'company_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_person': {'key': 'contactPerson', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ContactDetails, self).__init__(**kwargs) + self.contact_person = kwargs.get('contact_person', None) + self.company_name = kwargs.get('company_name', None) + self.phone = kwargs.get('phone', None) + self.email_list = kwargs.get('email_list', None) + + +class Container(ARMBaseModel): + """Represents a container on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Container in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar container_status: Current status of the container. Possible values + include: 'OK', 'Offline', 'Unknown', 'Updating', 'NeedsAttention' + :vartype container_status: str or + ~azure.mgmt.databoxedge.models.ContainerStatus + :param data_format: Required. DataFormat for Container. Possible values + include: 'BlockBlob', 'PageBlob', 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + :ivar refresh_details: Details of the refresh job on this container. + :vartype refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar created_date_time: The UTC time when container got created. + :vartype created_date_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'container_status': {'readonly': True}, + 'data_format': {'required': True}, + 'refresh_details': {'readonly': True}, + 'created_date_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'container_status': {'key': 'properties.containerStatus', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(Container, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.container_status = None + self.data_format = kwargs.get('data_format', None) + self.refresh_details = None + self.created_date_time = None + + +class DataBoxEdgeDevice(ARMBaseModel): + """The Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param location: Required. The location of the device. This is a supported + and registered Azure geographical region (for example, West US, East US, + or Southeast Asia). The geographical region of a device cannot be changed + once it is created, but if an identical geographical region is specified + on update, the request will succeed. + :type location: str + :param tags: The list of tags that describe the device. These tags can be + used to view and group this device (across resource groups). + :type tags: dict[str, str] + :param sku: The SKU type. + :type sku: ~azure.mgmt.databoxedge.models.Sku + :param etag: The etag for the devices. + :type etag: str + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :ivar kind: The etag for the devices. Possible values include: + 'AzureDataBoxGateway', 'AzureStackEdge', 'AzureStackHub', + 'AzureModularDataCentre' + :vartype kind: str or ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceKind + :param system_data: DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param data_box_edge_device_status: The status of the Data Box + Edge/Gateway device. Possible values include: 'ReadyToSetup', 'Online', + 'Offline', 'NeedsAttention', 'Disconnected', 'PartiallyDisconnected', + 'Maintenance' + :type data_box_edge_device_status: str or + ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceStatus + :ivar serial_number: The Serial Number of Data Box Edge/Gateway device. + :vartype serial_number: str + :ivar description: The Description of the Data Box Edge/Gateway device. + :vartype description: str + :ivar model_description: The description of the Data Box Edge/Gateway + device model. + :vartype model_description: str + :ivar device_type: The type of the Data Box Edge/Gateway device. Possible + values include: 'DataBoxEdgeDevice' + :vartype device_type: str or ~azure.mgmt.databoxedge.models.DeviceType + :ivar friendly_name: The Data Box Edge/Gateway device name. + :vartype friendly_name: str + :ivar culture: The Data Box Edge/Gateway device culture. + :vartype culture: str + :ivar device_model: The Data Box Edge/Gateway device model. + :vartype device_model: str + :ivar device_software_version: The Data Box Edge/Gateway device software + version. + :vartype device_software_version: str + :ivar device_local_capacity: The Data Box Edge/Gateway device local + capacity in MB. + :vartype device_local_capacity: long + :ivar time_zone: The Data Box Edge/Gateway device timezone. + :vartype time_zone: str + :ivar device_hcs_version: The device software version number of the device + (eg: 1.2.18105.6). + :vartype device_hcs_version: str + :ivar configured_role_types: Type of compute roles configured. + :vartype configured_role_types: list[str or + ~azure.mgmt.databoxedge.models.RoleTypes] + :ivar node_count: The number of nodes in the cluster. + :vartype node_count: int + :ivar resource_move_details: The details of the move operation on this + resource. + :vartype resource_move_details: + ~azure.mgmt.databoxedge.models.ResourceMoveDetails + :ivar edge_profile: The details of Edge Profile for this resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'description': {'readonly': True}, + 'model_description': {'readonly': True}, + 'device_type': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'culture': {'readonly': True}, + 'device_model': {'readonly': True}, + 'device_software_version': {'readonly': True}, + 'device_local_capacity': {'readonly': True}, + 'time_zone': {'readonly': True}, + 'device_hcs_version': {'readonly': True}, + 'configured_role_types': {'readonly': True}, + 'node_count': {'readonly': True}, + 'resource_move_details': {'readonly': True}, + 'edge_profile': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'data_box_edge_device_status': {'key': 'properties.dataBoxEdgeDeviceStatus', 'type': 'str'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'model_description': {'key': 'properties.modelDescription', 'type': 'str'}, + 'device_type': {'key': 'properties.deviceType', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'culture': {'key': 'properties.culture', 'type': 'str'}, + 'device_model': {'key': 'properties.deviceModel', 'type': 'str'}, + 'device_software_version': {'key': 'properties.deviceSoftwareVersion', 'type': 'str'}, + 'device_local_capacity': {'key': 'properties.deviceLocalCapacity', 'type': 'long'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'device_hcs_version': {'key': 'properties.deviceHcsVersion', 'type': 'str'}, + 'configured_role_types': {'key': 'properties.configuredRoleTypes', 'type': '[str]'}, + 'node_count': {'key': 'properties.nodeCount', 'type': 'int'}, + 'resource_move_details': {'key': 'properties.resourceMoveDetails', 'type': 'ResourceMoveDetails'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDevice, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.etag = kwargs.get('etag', None) + self.identity = kwargs.get('identity', None) + self.kind = None + self.system_data = kwargs.get('system_data', None) + self.data_box_edge_device_status = kwargs.get('data_box_edge_device_status', None) + self.serial_number = None + self.description = None + self.model_description = None + self.device_type = None + self.friendly_name = None + self.culture = None + self.device_model = None + self.device_software_version = None + self.device_local_capacity = None + self.time_zone = None + self.device_hcs_version = None + self.configured_role_types = None + self.node_count = None + self.resource_move_details = None + self.edge_profile = None + + +class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel): + """The extended Info of the Data Box Edge/Gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param encryption_key_thumbprint: The digital signature of encrypted + certificate. + :type encryption_key_thumbprint: str + :param encryption_key: The public part of the encryption certificate. + Client uses this to encrypt any secret. + :type encryption_key: str + :ivar resource_key: The Resource ID of the Resource. + :vartype resource_key: str + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + :param key_vault_sync_status: Key vault sync status. Possible values + include: 'KeyVaultSynced', 'KeyVaultSyncFailed', 'KeyVaultNotConfigured', + 'KeyVaultSyncPending', 'KeyVaultSyncing', 'KeyVaultNotSynced' + :type key_vault_sync_status: str or + ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus + :ivar device_secrets: Device secrets, will be returned only with + ODataFilter $expand=deviceSecrets + :vartype device_secrets: dict[str, ~azure.mgmt.databoxedge.models.Secret] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_key': {'readonly': True}, + 'device_secrets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'}, + 'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'}, + 'resource_key': {'key': 'properties.resourceKey', 'type': 'str'}, + 'client_secret_store_id': {'key': 'properties.clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'properties.clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'properties.channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'properties.channelIntegrityKeyVersion', 'type': 'str'}, + 'key_vault_sync_status': {'key': 'properties.keyVaultSyncStatus', 'type': 'str'}, + 'device_secrets': {'key': 'properties.deviceSecrets', 'type': '{Secret}'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDeviceExtendedInfo, self).__init__(**kwargs) + self.encryption_key_thumbprint = kwargs.get('encryption_key_thumbprint', None) + self.encryption_key = kwargs.get('encryption_key', None) + self.resource_key = None + self.client_secret_store_id = kwargs.get('client_secret_store_id', None) + self.client_secret_store_url = kwargs.get('client_secret_store_url', None) + self.channel_integrity_key_name = kwargs.get('channel_integrity_key_name', None) + self.channel_integrity_key_version = kwargs.get('channel_integrity_key_version', None) + self.key_vault_sync_status = kwargs.get('key_vault_sync_status', None) + self.device_secrets = None + + +class DataBoxEdgeDeviceExtendedInfoPatch(Model): + """The Data Box Edge/Gateway device extended info patch. + + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name for Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + :param sync_status: For changing or to initiate the resync to key-vault + set the status to KeyVaultSyncPending, rest of the status will not be + applicable. Possible values include: 'KeyVaultSynced', + 'KeyVaultSyncFailed', 'KeyVaultNotConfigured', 'KeyVaultSyncPending', + 'KeyVaultSyncing', 'KeyVaultNotSynced' + :type sync_status: str or + ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus + """ + + _attribute_map = { + 'client_secret_store_id': {'key': 'clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'channelIntegrityKeyVersion', 'type': 'str'}, + 'sync_status': {'key': 'syncStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDeviceExtendedInfoPatch, self).__init__(**kwargs) + self.client_secret_store_id = kwargs.get('client_secret_store_id', None) + self.client_secret_store_url = kwargs.get('client_secret_store_url', None) + self.channel_integrity_key_name = kwargs.get('channel_integrity_key_name', None) + self.channel_integrity_key_version = kwargs.get('channel_integrity_key_version', None) + self.sync_status = kwargs.get('sync_status', None) + + +class DataBoxEdgeDevicePatch(Model): + """The Data Box Edge/Gateway device patch. + + :param tags: The tags attached to the Data Box Edge/Gateway resource. + :type tags: dict[str, str] + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :param edge_profile: Edge Profile property of the Data Box Edge/Gateway + device + :type edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfilePatch + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfilePatch'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeDevicePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.edge_profile = kwargs.get('edge_profile', None) + + +class DataBoxEdgeMoveRequest(Model): + """Resource Move details. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_group: Required. Target resource group ARMId + :type target_resource_group: str + :param resources: Required. List of resources to be moved + :type resources: list[str] + """ + + _validation = { + 'target_resource_group': {'required': True}, + 'resources': {'required': True}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeMoveRequest, self).__init__(**kwargs) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.resources = kwargs.get('resources', None) + + +class DataBoxEdgeSku(Model): + """The Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar name: The Sku name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EP2_64_1VPU_W', 'EP2_128_1T4_Mx1_W', 'EP2_256_2T4_W', + 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC', 'Management' + :vartype name: str or ~azure.mgmt.databoxedge.models.SkuName + :ivar kind: The Sku kind. + :vartype kind: str + :ivar tier: The Sku tier. Possible values include: 'Standard' + :vartype tier: str or ~azure.mgmt.databoxedge.models.SkuTier + :ivar size: The Sku kind. + :vartype size: str + :ivar family: The Sku family. + :vartype family: str + :ivar locations: Availability of the Sku for the region. + :vartype locations: list[str] + :ivar api_versions: The API versions in which Sku is available. + :vartype api_versions: list[str] + :ivar location_info: Availability of the Sku for the location/zone/site. + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar signup_option: Sku can be signed up by customer or not. Possible + values include: 'None', 'Available' + :vartype signup_option: str or + ~azure.mgmt.databoxedge.models.SkuSignupOption + :ivar version: Availability of the Sku as preview/stable. Possible values + include: 'Stable', 'Preview' + :vartype version: str or ~azure.mgmt.databoxedge.models.SkuVersion + :ivar availability: Links to the next set of results. Possible values + include: 'Available', 'Unavailable' + :vartype availability: str or + ~azure.mgmt.databoxedge.models.SkuAvailability + :ivar shipment_types: List of Shipment Types supported by this SKU + :vartype shipment_types: list[str or + ~azure.mgmt.databoxedge.models.ShipmentType] + :ivar capabilities: The capability info of the SKU. + :vartype capabilities: list[~azure.mgmt.databoxedge.models.SkuCapability] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'locations': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'location_info': {'readonly': True}, + 'costs': {'readonly': True}, + 'signup_option': {'readonly': True}, + 'version': {'readonly': True}, + 'availability': {'readonly': True}, + 'shipment_types': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'signup_option': {'key': 'signupOption', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'availability': {'key': 'availability', 'type': 'str'}, + 'shipment_types': {'key': 'shipmentTypes', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SkuCapability]'}, + } + + def __init__(self, **kwargs): + super(DataBoxEdgeSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.kind = None + self.tier = None + self.size = None + self.family = None + self.locations = None + self.api_versions = None + self.location_info = None + self.costs = None + self.signup_option = None + self.version = None + self.availability = None + self.shipment_types = None + self.capabilities = None + + +class DCAccessCode(Model): + """DC Access code in the case of Self Managed Shipping. + + :param auth_code: DCAccess Code for the Self Managed shipment. + :type auth_code: str + """ + + _attribute_map = { + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DCAccessCode, self).__init__(**kwargs) + self.auth_code = kwargs.get('auth_code', None) + + +class EdgeProfile(Model): + """Details about Edge Profile for the resource. + + :param subscription: Edge Profile Subscription + :type subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscription + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscription'}, + } + + def __init__(self, **kwargs): + super(EdgeProfile, self).__init__(**kwargs) + self.subscription = kwargs.get('subscription', None) + + +class EdgeProfilePatch(Model): + """The Data Box Edge/Gateway Edge Profile patch. + + :param subscription: The Data Box Edge/Gateway Edge Profile Subscription + patch + :type subscription: + ~azure.mgmt.databoxedge.models.EdgeProfileSubscriptionPatch + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscriptionPatch'}, + } + + def __init__(self, **kwargs): + super(EdgeProfilePatch, self).__init__(**kwargs) + self.subscription = kwargs.get('subscription', None) + + +class EdgeProfileSubscription(Model): + """Subscription details for the Edge Profile. + + :param registration_id: Edge Subscription Registration ID + :type registration_id: str + :param id: ARM ID of the subscription + :type id: str + :param state: Possible values include: 'Registered', 'Warned', + 'Suspended', 'Deleted', 'Unregistered' + :type state: str or ~azure.mgmt.databoxedge.models.SubscriptionState + :param registration_date: + :type registration_date: str + :param subscription_id: + :type subscription_id: str + :param tenant_id: + :type tenant_id: str + :param location_placement_id: + :type location_placement_id: str + :param quota_id: + :type quota_id: str + :param serialized_details: + :type serialized_details: str + :param registered_features: + :type registered_features: + list[~azure.mgmt.databoxedge.models.SubscriptionRegisteredFeatures] + """ + + _attribute_map = { + 'registration_id': {'key': 'registrationId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'registration_date': {'key': 'registrationDate', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'location_placement_id': {'key': 'properties.locationPlacementId', 'type': 'str'}, + 'quota_id': {'key': 'properties.quotaId', 'type': 'str'}, + 'serialized_details': {'key': 'properties.serializedDetails', 'type': 'str'}, + 'registered_features': {'key': 'properties.registeredFeatures', 'type': '[SubscriptionRegisteredFeatures]'}, + } + + def __init__(self, **kwargs): + super(EdgeProfileSubscription, self).__init__(**kwargs) + self.registration_id = kwargs.get('registration_id', None) + self.id = kwargs.get('id', None) + self.state = kwargs.get('state', None) + self.registration_date = kwargs.get('registration_date', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.location_placement_id = kwargs.get('location_placement_id', None) + self.quota_id = kwargs.get('quota_id', None) + self.serialized_details = kwargs.get('serialized_details', None) + self.registered_features = kwargs.get('registered_features', None) + + +class EdgeProfileSubscriptionPatch(Model): + """The Data Box Edge/Gateway Edge Profile Subscription patch. + + :param id: The path ID that uniquely identifies the subscription of the + edge profile. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EdgeProfileSubscriptionPatch, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class EtcdInfo(Model): + """Etcd configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Etcd type + :vartype type: str + :ivar version: Etcd version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EtcdInfo, self).__init__(**kwargs) + self.type = None + self.version = None + + +class Trigger(ARMBaseModel): + """Trigger details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FileEventTrigger, PeriodicTimerEventTrigger + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'FileEvent': 'FileEventTrigger', 'PeriodicTimerEvent': 'PeriodicTimerEventTrigger'} + } + + def __init__(self, **kwargs): + super(Trigger, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.kind = None + self.kind = 'Trigger' + + +class FileEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. File event source details. + :type source_info: ~azure.mgmt.databoxedge.models.FileSourceInfo + :param sink_info: Required. Role sink info. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'FileSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileEventTrigger, self).__init__(**kwargs) + self.source_info = kwargs.get('source_info', None) + self.sink_info = kwargs.get('sink_info', None) + self.custom_context_tag = kwargs.get('custom_context_tag', None) + self.kind = 'FileEvent' + + +class FileSourceInfo(Model): + """File source details. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. File share ID. + :type share_id: str + """ + + _validation = { + 'share_id': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileSourceInfo, self).__init__(**kwargs) + self.share_id = kwargs.get('share_id', None) + + +class GenerateCertResponse(Model): + """Used in activation key generation flow. + + :param public_key: Gets or sets base64 encoded certificate raw data, + this is the public part needed to be uploaded to cert vault + :type public_key: str + :param private_key: Gets or sets base64 encoded private part of the + certificate, + needed to form the activation key + :type private_key: str + :param expiry_time_in_utc: Gets or sets expiry time in UTC + :type expiry_time_in_utc: str + """ + + _attribute_map = { + 'public_key': {'key': 'publicKey', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'expiry_time_in_utc': {'key': 'expiryTimeInUTC', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateCertResponse, self).__init__(**kwargs) + self.public_key = kwargs.get('public_key', None) + self.private_key = kwargs.get('private_key', None) + self.expiry_time_in_utc = kwargs.get('expiry_time_in_utc', None) + + +class ImageRepositoryCredential(Model): + """Image repository credential. + + All required parameters must be populated in order to send to Azure. + + :param image_repository_url: Required. Image repository url (e.g.: + mcr.microsoft.com). + :type image_repository_url: str + :param user_name: Required. Repository user name. + :type user_name: str + :param password: Repository user password. + :type password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'image_repository_url': {'required': True}, + 'user_name': {'required': True}, + } + + _attribute_map = { + 'image_repository_url': {'key': 'imageRepositoryUrl', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, **kwargs): + super(ImageRepositoryCredential, self).__init__(**kwargs) + self.image_repository_url = kwargs.get('image_repository_url', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + + +class IoTAddon(Addon): + """IoT Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param io_tdevice_details: Required. IoT device metadata to which + appliance needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + Addon needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :ivar version: Version of IoT running on the appliance. + :vartype version: str + :ivar host_platform: Host OS supported by the IoT addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTAddon, self).__init__(**kwargs) + self.io_tdevice_details = kwargs.get('io_tdevice_details', None) + self.io_tedge_device_details = kwargs.get('io_tedge_device_details', None) + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'IotEdge' + + +class IoTDeviceInfo(Model): + """Metadata of IoT device/IoT Edge device to be configured. + + All required parameters must be populated in order to send to Azure. + + :param device_id: Required. ID of the IoT device/edge device. + :type device_id: str + :param io_thost_hub: Required. Host name for the IoT hub associated to the + device. + :type io_thost_hub: str + :param io_thost_hub_id: Id for the IoT hub associated to the device. + :type io_thost_hub_id: str + :param authentication: Encrypted IoT device/IoT edge device connection + string. + :type authentication: ~azure.mgmt.databoxedge.models.Authentication + """ + + _validation = { + 'device_id': {'required': True}, + 'io_thost_hub': {'required': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'io_thost_hub': {'key': 'ioTHostHub', 'type': 'str'}, + 'io_thost_hub_id': {'key': 'ioTHostHubId', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'Authentication'}, + } + + def __init__(self, **kwargs): + super(IoTDeviceInfo, self).__init__(**kwargs) + self.device_id = kwargs.get('device_id', None) + self.io_thost_hub = kwargs.get('io_thost_hub', None) + self.io_thost_hub_id = kwargs.get('io_thost_hub_id', None) + self.authentication = kwargs.get('authentication', None) + + +class IoTEdgeAgentInfo(Model): + """IoT edge agent details is optional, this will be used for download system + Agent module while bootstrapping IoT Role if specified. + + All required parameters must be populated in order to send to Azure. + + :param image_name: Required. Name of the IoT edge agent image. + :type image_name: str + :param tag: Required. Image Tag. + :type tag: str + :param image_repository: Image repository details. + :type image_repository: + ~azure.mgmt.databoxedge.models.ImageRepositoryCredential + """ + + _validation = { + 'image_name': {'required': True}, + 'tag': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'image_repository': {'key': 'imageRepository', 'type': 'ImageRepositoryCredential'}, + } + + def __init__(self, **kwargs): + super(IoTEdgeAgentInfo, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.tag = kwargs.get('tag', None) + self.image_repository = kwargs.get('image_repository', None) + + +class IoTRole(Role): + """Compute role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the IoT role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :param io_tdevice_details: Required. IoT device metadata to which data box + edge device needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + role needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param share_mappings: Mount points of shares in role(s). + :type share_mappings: list[~azure.mgmt.databoxedge.models.MountPointMap] + :param io_tedge_agent_info: Iot edge agent details to download the agent + and bootstrap iot runtime. + :type io_tedge_agent_info: ~azure.mgmt.databoxedge.models.IoTEdgeAgentInfo + :ivar host_platform_type: Platform where the Iot runtime is hosted. + Possible values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param compute_resource: Resource allocation + :type compute_resource: ~azure.mgmt.databoxedge.models.ComputeResource + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'host_platform_type': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'io_tedge_agent_info': {'key': 'properties.ioTEdgeAgentInfo', 'type': 'IoTEdgeAgentInfo'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'compute_resource': {'key': 'properties.computeResource', 'type': 'ComputeResource'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTRole, self).__init__(**kwargs) + self.host_platform = kwargs.get('host_platform', None) + self.io_tdevice_details = kwargs.get('io_tdevice_details', None) + self.io_tedge_device_details = kwargs.get('io_tedge_device_details', None) + self.share_mappings = kwargs.get('share_mappings', None) + self.io_tedge_agent_info = kwargs.get('io_tedge_agent_info', None) + self.host_platform_type = None + self.compute_resource = kwargs.get('compute_resource', None) + self.role_status = kwargs.get('role_status', None) + self.kind = 'IOT' + + +class Ipv4Config(Model): + """Details related to the IPv4 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv4 address of the network adapter. + :vartype ip_address: str + :ivar subnet: The IPv4 subnet of the network adapter. + :vartype subnet: str + :ivar gateway: The IPv4 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'subnet': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Ipv4Config, self).__init__(**kwargs) + self.ip_address = None + self.subnet = None + self.gateway = None + + +class Ipv6Config(Model): + """Details related to the IPv6 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv6 address of the network adapter. + :vartype ip_address: str + :ivar prefix_length: The IPv6 prefix of the network adapter. + :vartype prefix_length: int + :ivar gateway: The IPv6 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'prefix_length': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Ipv6Config, self).__init__(**kwargs) + self.ip_address = None + self.prefix_length = None + self.gateway = None + + +class Job(Model): + """A device job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The name of the object. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar status: The current status of the job. Possible values include: + 'Invalid', 'Running', 'Succeeded', 'Failed', 'Canceled', 'Paused', + 'Scheduled' + :vartype status: str or ~azure.mgmt.databoxedge.models.JobStatus + :ivar start_time: The UTC date and time at which the job started. + :vartype start_time: datetime + :ivar end_time: The UTC date and time at which the job completed. + :vartype end_time: datetime + :ivar percent_complete: The percentage of the job that is complete. + :vartype percent_complete: int + :ivar error: The error details. + :vartype error: ~azure.mgmt.databoxedge.models.JobErrorDetails + :ivar job_type: The type of the job. Possible values include: 'Invalid', + 'ScanForUpdates', 'DownloadUpdates', 'InstallUpdates', 'RefreshShare', + 'RefreshContainer', 'Backup', 'Restore', 'TriggerSupportPackage' + :vartype job_type: str or ~azure.mgmt.databoxedge.models.JobType + :ivar current_stage: Current stage of the update operation. Possible + values include: 'Unknown', 'Initial', 'ScanStarted', 'ScanComplete', + 'ScanFailed', 'DownloadStarted', 'DownloadComplete', 'DownloadFailed', + 'InstallStarted', 'InstallComplete', 'InstallFailed', 'RebootInitiated', + 'Success', 'Failure', 'RescanStarted', 'RescanComplete', 'RescanFailed' + :vartype current_stage: str or + ~azure.mgmt.databoxedge.models.UpdateOperationStage + :ivar download_progress: The download progress. + :vartype download_progress: + ~azure.mgmt.databoxedge.models.UpdateDownloadProgress + :ivar install_progress: The install progress. + :vartype install_progress: + ~azure.mgmt.databoxedge.models.UpdateInstallProgress + :ivar total_refresh_errors: Total number of errors encountered during the + refresh process. + :vartype total_refresh_errors: int + :ivar error_manifest_file: Local share/remote container relative path to + the error manifest file of the refresh. + :vartype error_manifest_file: str + :ivar refreshed_entity_id: ARM ID of the entity that was refreshed. + :vartype refreshed_entity_id: str + :param folder: If only subfolders need to be refreshed, then the subfolder + path inside the share or container. (The path is empty if there are no + subfolders.) + :type folder: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'error': {'readonly': True}, + 'job_type': {'readonly': True}, + 'current_stage': {'readonly': True}, + 'download_progress': {'readonly': True}, + 'install_progress': {'readonly': True}, + 'total_refresh_errors': {'readonly': True}, + 'error_manifest_file': {'readonly': True}, + 'refreshed_entity_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'error': {'key': 'error', 'type': 'JobErrorDetails'}, + 'job_type': {'key': 'properties.jobType', 'type': 'str'}, + 'current_stage': {'key': 'properties.currentStage', 'type': 'str'}, + 'download_progress': {'key': 'properties.downloadProgress', 'type': 'UpdateDownloadProgress'}, + 'install_progress': {'key': 'properties.installProgress', 'type': 'UpdateInstallProgress'}, + 'total_refresh_errors': {'key': 'properties.totalRefreshErrors', 'type': 'int'}, + 'error_manifest_file': {'key': 'properties.errorManifestFile', 'type': 'str'}, + 'refreshed_entity_id': {'key': 'properties.refreshedEntityId', 'type': 'str'}, + 'folder': {'key': 'properties.folder', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.status = None + self.start_time = None + self.end_time = None + self.percent_complete = None + self.error = None + self.job_type = None + self.current_stage = None + self.download_progress = None + self.install_progress = None + self.total_refresh_errors = None + self.error_manifest_file = None + self.refreshed_entity_id = None + self.folder = kwargs.get('folder', None) + + +class JobErrorDetails(Model): + """The job error information containing the list of job errors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_details: The error details. + :vartype error_details: list[~azure.mgmt.databoxedge.models.JobErrorItem] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'error_details': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorItem]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobErrorDetails, self).__init__(**kwargs) + self.error_details = None + self.code = None + self.message = None + + +class JobErrorItem(Model): + """The job error items. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendations: The recommended actions. + :vartype recommendations: list[str] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'recommendations': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobErrorItem, self).__init__(**kwargs) + self.recommendations = None + self.code = None + self.message = None + + +class KubernetesClusterInfo(Model): + """Kubernetes cluster configuration. + + Variables are only 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 etcd_info: Etcd configuration + :vartype etcd_info: ~azure.mgmt.databoxedge.models.EtcdInfo + :ivar nodes: Kubernetes cluster nodes + :vartype nodes: list[~azure.mgmt.databoxedge.models.NodeInfo] + :param version: Required. Kubernetes cluster version + :type version: str + """ + + _validation = { + 'etcd_info': {'readonly': True}, + 'nodes': {'readonly': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'etcd_info': {'key': 'etcdInfo', 'type': 'EtcdInfo'}, + 'nodes': {'key': 'nodes', 'type': '[NodeInfo]'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesClusterInfo, self).__init__(**kwargs) + self.etcd_info = None + self.nodes = None + self.version = kwargs.get('version', None) + + +class KubernetesIPConfiguration(Model): + """Kubernetes node IP configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar port: Port of the Kubernetes node. + :vartype port: str + :param ip_address: IP address of the Kubernetes node. + :type ip_address: str + """ + + _validation = { + 'port': {'readonly': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesIPConfiguration, self).__init__(**kwargs) + self.port = None + self.ip_address = kwargs.get('ip_address', None) + + +class KubernetesRole(Role): + """Kubernetes role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the Kubernetes role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar provisioning_state: State of Kubernetes deployment. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.KubernetesState + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param kubernetes_cluster_info: Required. Kubernetes cluster configuration + :type kubernetes_cluster_info: + ~azure.mgmt.databoxedge.models.KubernetesClusterInfo + :param kubernetes_role_resources: Required. Kubernetes role resources + :type kubernetes_role_resources: + ~azure.mgmt.databoxedge.models.KubernetesRoleResources + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'kubernetes_cluster_info': {'required': True}, + 'kubernetes_role_resources': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'kubernetes_cluster_info': {'key': 'properties.kubernetesClusterInfo', 'type': 'KubernetesClusterInfo'}, + 'kubernetes_role_resources': {'key': 'properties.kubernetesRoleResources', 'type': 'KubernetesRoleResources'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesRole, self).__init__(**kwargs) + self.host_platform = kwargs.get('host_platform', None) + self.provisioning_state = None + self.host_platform_type = None + self.kubernetes_cluster_info = kwargs.get('kubernetes_cluster_info', None) + self.kubernetes_role_resources = kwargs.get('kubernetes_role_resources', None) + self.role_status = kwargs.get('role_status', None) + self.kind = 'Kubernetes' + + +class KubernetesRoleCompute(Model): + """Kubernetes role compute 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 vm_profile: Required. VM profile + :type vm_profile: str + :ivar memory_in_bytes: Memory in bytes + :vartype memory_in_bytes: long + :ivar processor_count: Processor count + :vartype processor_count: int + """ + + _validation = { + 'vm_profile': {'required': True}, + 'memory_in_bytes': {'readonly': True}, + 'processor_count': {'readonly': True}, + } + + _attribute_map = { + 'vm_profile': {'key': 'vmProfile', 'type': 'str'}, + 'memory_in_bytes': {'key': 'memoryInBytes', 'type': 'long'}, + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleCompute, self).__init__(**kwargs) + self.vm_profile = kwargs.get('vm_profile', None) + self.memory_in_bytes = None + self.processor_count = None + + +class KubernetesRoleNetwork(Model): + """Kubernetes role network resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar cni_config: Cni configuration + :vartype cni_config: ~azure.mgmt.databoxedge.models.CniConfig + :ivar load_balancer_config: Load balancer configuration + :vartype load_balancer_config: + ~azure.mgmt.databoxedge.models.LoadBalancerConfig + """ + + _validation = { + 'cni_config': {'readonly': True}, + 'load_balancer_config': {'readonly': True}, + } + + _attribute_map = { + 'cni_config': {'key': 'cniConfig', 'type': 'CniConfig'}, + 'load_balancer_config': {'key': 'loadBalancerConfig', 'type': 'LoadBalancerConfig'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleNetwork, self).__init__(**kwargs) + self.cni_config = None + self.load_balancer_config = None + + +class KubernetesRoleResources(Model): + """Kubernetes role resources. + + Variables are only 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 storage: Kubernetes role storage resource + :type storage: ~azure.mgmt.databoxedge.models.KubernetesRoleStorage + :param compute: Required. Kubernetes role compute resource + :type compute: ~azure.mgmt.databoxedge.models.KubernetesRoleCompute + :ivar network: Kubernetes role network resource + :vartype network: ~azure.mgmt.databoxedge.models.KubernetesRoleNetwork + """ + + _validation = { + 'compute': {'required': True}, + 'network': {'readonly': True}, + } + + _attribute_map = { + 'storage': {'key': 'storage', 'type': 'KubernetesRoleStorage'}, + 'compute': {'key': 'compute', 'type': 'KubernetesRoleCompute'}, + 'network': {'key': 'network', 'type': 'KubernetesRoleNetwork'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleResources, self).__init__(**kwargs) + self.storage = kwargs.get('storage', None) + self.compute = kwargs.get('compute', None) + self.network = None + + +class KubernetesRoleStorage(Model): + """Kubernetes role storage resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar storage_classes: Kubernetes storage class info. + :vartype storage_classes: + list[~azure.mgmt.databoxedge.models.KubernetesRoleStorageClassInfo] + :param endpoints: Mount points of shares in role(s). + :type endpoints: list[~azure.mgmt.databoxedge.models.MountPointMap] + """ + + _validation = { + 'storage_classes': {'readonly': True}, + } + + _attribute_map = { + 'storage_classes': {'key': 'storageClasses', 'type': '[KubernetesRoleStorageClassInfo]'}, + 'endpoints': {'key': 'endpoints', 'type': '[MountPointMap]'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleStorage, self).__init__(**kwargs) + self.storage_classes = None + self.endpoints = kwargs.get('endpoints', None) + + +class KubernetesRoleStorageClassInfo(Model): + """Kubernetes storage class info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Storage class name. + :vartype name: str + :ivar type: Storage class type. + :vartype type: str + :ivar posix_compliant: If provisioned storage is posix compliant. Possible + values include: 'Invalid', 'Enabled', 'Disabled' + :vartype posix_compliant: str or + ~azure.mgmt.databoxedge.models.PosixComplianceStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'posix_compliant': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'posix_compliant': {'key': 'posixCompliant', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesRoleStorageClassInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.posix_compliant = None + + +class LoadBalancerConfig(Model): + """Load balancer configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Load balancer type + :vartype type: str + :ivar version: Load balancer version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadBalancerConfig, self).__init__(**kwargs) + self.type = None + self.version = None + + +class MECRole(Role): + """MEC role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param connection_string: Activation key of the MEC. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param controller_endpoint: Controller Endpoint. + :type controller_endpoint: str + :param resource_unique_id: Unique Id of the Resource. + :type resource_unique_id: str + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'AsymmetricEncryptedSecret'}, + 'controller_endpoint': {'key': 'properties.controllerEndpoint', 'type': 'str'}, + 'resource_unique_id': {'key': 'properties.resourceUniqueId', 'type': 'str'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MECRole, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.controller_endpoint = kwargs.get('controller_endpoint', None) + self.resource_unique_id = kwargs.get('resource_unique_id', None) + self.role_status = kwargs.get('role_status', None) + self.kind = 'MEC' + + +class MetricConfiguration(Model): + """Metric configuration. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The Resource ID on which the metrics should + be pushed. + :type resource_id: str + :param mdm_account: The MDM account to which the counters should be + pushed. + :type mdm_account: str + :param metric_name_space: The MDM namespace to which the counters should + be pushed. This is required if MDMAccount is specified + :type metric_name_space: str + :param counter_sets: Required. Host name for the IoT hub associated to the + device. + :type counter_sets: list[~azure.mgmt.databoxedge.models.MetricCounterSet] + """ + + _validation = { + 'resource_id': {'required': True}, + 'counter_sets': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'mdm_account': {'key': 'mdmAccount', 'type': 'str'}, + 'metric_name_space': {'key': 'metricNameSpace', 'type': 'str'}, + 'counter_sets': {'key': 'counterSets', 'type': '[MetricCounterSet]'}, + } + + def __init__(self, **kwargs): + super(MetricConfiguration, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.mdm_account = kwargs.get('mdm_account', None) + self.metric_name_space = kwargs.get('metric_name_space', None) + self.counter_sets = kwargs.get('counter_sets', None) + + +class MetricCounter(Model): + """The metric counter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The counter name. + :type name: str + :param instance: The instance from which counter should be collected. + :type instance: str + :param dimension_filter: The dimension filter. + :type dimension_filter: + list[~azure.mgmt.databoxedge.models.MetricDimension] + :param additional_dimensions: The additional dimensions to be added to + metric. + :type additional_dimensions: + list[~azure.mgmt.databoxedge.models.MetricDimension] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'str'}, + 'dimension_filter': {'key': 'dimensionFilter', 'type': '[MetricDimension]'}, + 'additional_dimensions': {'key': 'additionalDimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, **kwargs): + super(MetricCounter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.instance = kwargs.get('instance', None) + self.dimension_filter = kwargs.get('dimension_filter', None) + self.additional_dimensions = kwargs.get('additional_dimensions', None) + + +class MetricCounterSet(Model): + """The metric counter set. + + All required parameters must be populated in order to send to Azure. + + :param counters: Required. The counters that should be collected in this + set. + :type counters: list[~azure.mgmt.databoxedge.models.MetricCounter] + """ + + _validation = { + 'counters': {'required': True}, + } + + _attribute_map = { + 'counters': {'key': 'counters', 'type': '[MetricCounter]'}, + } + + def __init__(self, **kwargs): + super(MetricCounterSet, self).__init__(**kwargs) + self.counters = kwargs.get('counters', None) + + +class MetricDimension(Model): + """The metric dimension. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. The dimension type. + :type source_type: str + :param source_name: Required. The dimension value. + :type source_name: str + """ + + _validation = { + 'source_type': {'required': True}, + 'source_name': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'source_name': {'key': 'sourceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricDimension, self).__init__(**kwargs) + self.source_type = kwargs.get('source_type', None) + self.source_name = kwargs.get('source_name', None) + + +class MetricDimensionV1(Model): + """Metric Dimension v1. + + :param name: Name of the metrics dimension. + :type name: str + :param display_name: Display name of the metrics dimension. + :type display_name: str + :param to_be_exported_for_shoebox: To be exported to shoe box. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MetricDimensionV1, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class MetricSpecificationV1(Model): + """Metric specification version 1. + + :param name: Name of the metric. + :type name: str + :param display_name: Display name of the metric. + :type display_name: str + :param display_description: Description of the metric to be displayed. + :type display_description: str + :param unit: Metric units. Possible values include: 'NotSpecified', + 'Percent', 'Count', 'Seconds', 'Milliseconds', 'Bytes', 'BytesPerSecond', + 'CountPerSecond' + :type unit: str or ~azure.mgmt.databoxedge.models.MetricUnit + :param aggregation_type: Metric aggregation type. Possible values include: + 'NotSpecified', 'None', 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + :type aggregation_type: str or + ~azure.mgmt.databoxedge.models.MetricAggregationType + :param dimensions: Metric dimensions, other than default dimension which + is resource. + :type dimensions: list[~azure.mgmt.databoxedge.models.MetricDimensionV1] + :param fill_gap_with_zero: Set true to fill the gaps with zero. + :type fill_gap_with_zero: bool + :param category: Metric category. Possible values include: 'Capacity', + 'Transaction' + :type category: str or ~azure.mgmt.databoxedge.models.MetricCategory + :param resource_id_dimension_name_override: Resource name override. + :type resource_id_dimension_name_override: str + :param supported_time_grain_types: Support granularity of metrics. + :type supported_time_grain_types: list[str or + ~azure.mgmt.databoxedge.models.TimeGrain] + :param supported_aggregation_types: Support metric aggregation type. + :type supported_aggregation_types: list[str or + ~azure.mgmt.databoxedge.models.MetricAggregationType] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimensionV1]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(MetricSpecificationV1, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.dimensions = kwargs.get('dimensions', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.category = kwargs.get('category', None) + self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) + self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + + +class MonitoringMetricConfiguration(ARMBaseModel): + """The metric setting details for the role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: MonitoringConfiguration on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param metric_configurations: Required. The metrics configuration details + :type metric_configurations: + list[~azure.mgmt.databoxedge.models.MetricConfiguration] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'metric_configurations': {'key': 'properties.metricConfigurations', 'type': '[MetricConfiguration]'}, + } + + def __init__(self, **kwargs): + super(MonitoringMetricConfiguration, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.metric_configurations = kwargs.get('metric_configurations', None) + + +class MountPointMap(Model): + """The share mount point. + + Variables are only 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 share_id: Required. ID of the share mounted to the role VM. + :type share_id: str + :ivar role_id: ID of the role to which share is mounted. + :vartype role_id: str + :ivar mount_point: Mount point for the share. + :vartype mount_point: str + :ivar mount_type: Mounting type. Possible values include: 'Volume', + 'HostPath' + :vartype mount_type: str or ~azure.mgmt.databoxedge.models.MountType + :ivar role_type: Role type. Possible values include: 'IOT', 'ASA', + 'Functions', 'Cognitive', 'MEC', 'CloudEdgeManagement', 'Kubernetes' + :vartype role_type: str or ~azure.mgmt.databoxedge.models.RoleTypes + """ + + _validation = { + 'share_id': {'required': True}, + 'role_id': {'readonly': True}, + 'mount_point': {'readonly': True}, + 'mount_type': {'readonly': True}, + 'role_type': {'readonly': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'role_id': {'key': 'roleId', 'type': 'str'}, + 'mount_point': {'key': 'mountPoint', 'type': 'str'}, + 'mount_type': {'key': 'mountType', 'type': 'str'}, + 'role_type': {'key': 'roleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MountPointMap, self).__init__(**kwargs) + self.share_id = kwargs.get('share_id', None) + self.role_id = None + self.mount_point = None + self.mount_type = None + self.role_type = None + + +class NetworkAdapter(Model): + """Represents the networkAdapter on a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar adapter_id: Instance ID of network adapter. + :vartype adapter_id: str + :ivar adapter_position: Hardware position of network adapter. + :vartype adapter_position: + ~azure.mgmt.databoxedge.models.NetworkAdapterPosition + :ivar index: Logical index of the adapter. + :vartype index: int + :ivar node_id: Node ID of the network adapter. + :vartype node_id: str + :ivar network_adapter_name: Network adapter name. + :vartype network_adapter_name: str + :ivar label: Hardware label for the adapter. + :vartype label: str + :ivar mac_address: MAC address. + :vartype mac_address: str + :ivar link_speed: Link speed. + :vartype link_speed: long + :ivar status: Value indicating whether this adapter is valid. Possible + values include: 'Inactive', 'Active' + :vartype status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterStatus + :param rdma_status: Value indicating whether this adapter is RDMA capable. + Possible values include: 'Incapable', 'Capable' + :type rdma_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterRDMAStatus + :param dhcp_status: Value indicating whether this adapter has DHCP + enabled. Possible values include: 'Disabled', 'Enabled' + :type dhcp_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterDHCPStatus + :ivar ipv4_configuration: The IPv4 configuration of the network adapter. + :vartype ipv4_configuration: ~azure.mgmt.databoxedge.models.Ipv4Config + :ivar ipv6_configuration: The IPv6 configuration of the network adapter. + :vartype ipv6_configuration: ~azure.mgmt.databoxedge.models.Ipv6Config + :ivar ipv6_link_local_address: The IPv6 local address. + :vartype ipv6_link_local_address: str + :ivar dns_servers: The list of DNS Servers of the device. + :vartype dns_servers: list[str] + """ + + _validation = { + 'adapter_id': {'readonly': True}, + 'adapter_position': {'readonly': True}, + 'index': {'readonly': True}, + 'node_id': {'readonly': True}, + 'network_adapter_name': {'readonly': True}, + 'label': {'readonly': True}, + 'mac_address': {'readonly': True}, + 'link_speed': {'readonly': True}, + 'status': {'readonly': True}, + 'ipv4_configuration': {'readonly': True}, + 'ipv6_configuration': {'readonly': True}, + 'ipv6_link_local_address': {'readonly': True}, + 'dns_servers': {'readonly': True}, + } + + _attribute_map = { + 'adapter_id': {'key': 'adapterId', 'type': 'str'}, + 'adapter_position': {'key': 'adapterPosition', 'type': 'NetworkAdapterPosition'}, + 'index': {'key': 'index', 'type': 'int'}, + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'network_adapter_name': {'key': 'networkAdapterName', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + 'link_speed': {'key': 'linkSpeed', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'rdma_status': {'key': 'rdmaStatus', 'type': 'str'}, + 'dhcp_status': {'key': 'dhcpStatus', 'type': 'str'}, + 'ipv4_configuration': {'key': 'ipv4Configuration', 'type': 'Ipv4Config'}, + 'ipv6_configuration': {'key': 'ipv6Configuration', 'type': 'Ipv6Config'}, + 'ipv6_link_local_address': {'key': 'ipv6LinkLocalAddress', 'type': 'str'}, + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NetworkAdapter, self).__init__(**kwargs) + self.adapter_id = None + self.adapter_position = None + self.index = None + self.node_id = None + self.network_adapter_name = None + self.label = None + self.mac_address = None + self.link_speed = None + self.status = None + self.rdma_status = kwargs.get('rdma_status', None) + self.dhcp_status = kwargs.get('dhcp_status', None) + self.ipv4_configuration = None + self.ipv6_configuration = None + self.ipv6_link_local_address = None + self.dns_servers = None + + +class NetworkAdapterPosition(Model): + """The network adapter position. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar network_group: The network group. Possible values include: 'None', + 'NonRDMA', 'RDMA' + :vartype network_group: str or ~azure.mgmt.databoxedge.models.NetworkGroup + :ivar port: The port. + :vartype port: int + """ + + _validation = { + 'network_group': {'readonly': True}, + 'port': {'readonly': True}, + } + + _attribute_map = { + 'network_group': {'key': 'networkGroup', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NetworkAdapterPosition, self).__init__(**kwargs) + self.network_group = None + self.port = None + + +class NetworkSettings(ARMBaseModel): + """The network settings of a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: NetworkSettings on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar network_adapters: The network adapter list on the device. + :vartype network_adapters: + list[~azure.mgmt.databoxedge.models.NetworkAdapter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'network_adapters': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'network_adapters': {'key': 'properties.networkAdapters', 'type': '[NetworkAdapter]'}, + } + + def __init__(self, **kwargs): + super(NetworkSettings, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.network_adapters = None + + +class Node(ARMBaseModel): + """Represents a single node in a Data box Edge/Gateway device + Gateway devices, standalone Edge devices and a single node cluster Edge + device will all have 1 node + Multi-node Edge devices will have more than 1 nodes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar node_status: The current status of the individual node. Possible + values include: 'Unknown', 'Up', 'Down', 'Rebooting', 'ShuttingDown' + :vartype node_status: str or ~azure.mgmt.databoxedge.models.NodeStatus + :ivar node_chassis_serial_number: Serial number of the Chassis + :vartype node_chassis_serial_number: str + :ivar node_serial_number: Serial number of the individual node + :vartype node_serial_number: str + :ivar node_display_name: Display Name of the individual node + :vartype node_display_name: str + :ivar node_friendly_software_version: Friendly software version name that + is currently installed on the node + :vartype node_friendly_software_version: str + :ivar node_hcs_version: HCS version that is currently installed on the + node + :vartype node_hcs_version: str + :ivar node_instance_id: Guid instance id of the node + :vartype node_instance_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'node_status': {'readonly': True}, + 'node_chassis_serial_number': {'readonly': True}, + 'node_serial_number': {'readonly': True}, + 'node_display_name': {'readonly': True}, + 'node_friendly_software_version': {'readonly': True}, + 'node_hcs_version': {'readonly': True}, + 'node_instance_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'node_status': {'key': 'properties.nodeStatus', 'type': 'str'}, + 'node_chassis_serial_number': {'key': 'properties.nodeChassisSerialNumber', 'type': 'str'}, + 'node_serial_number': {'key': 'properties.nodeSerialNumber', 'type': 'str'}, + 'node_display_name': {'key': 'properties.nodeDisplayName', 'type': 'str'}, + 'node_friendly_software_version': {'key': 'properties.nodeFriendlySoftwareVersion', 'type': 'str'}, + 'node_hcs_version': {'key': 'properties.nodeHcsVersion', 'type': 'str'}, + 'node_instance_id': {'key': 'properties.nodeInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Node, self).__init__(**kwargs) + self.node_status = None + self.node_chassis_serial_number = None + self.node_serial_number = None + self.node_display_name = None + self.node_friendly_software_version = None + self.node_hcs_version = None + self.node_instance_id = None + + +class NodeInfo(Model): + """Kubernetes node info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Node name. + :vartype name: str + :ivar type: Node type - Master/Worker. Possible values include: 'Invalid', + 'Master', 'Worker' + :vartype type: str or ~azure.mgmt.databoxedge.models.KubernetesNodeType + :param ip_configuration: IP Configuration of the Kubernetes node. + :type ip_configuration: + list[~azure.mgmt.databoxedge.models.KubernetesIPConfiguration] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_configuration': {'key': 'ipConfiguration', 'type': '[KubernetesIPConfiguration]'}, + } + + def __init__(self, **kwargs): + super(NodeInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.ip_configuration = kwargs.get('ip_configuration', None) + + +class Operation(Model): + """Operations. + + :param name: Name of the operation. + :type name: str + :param display: Properties displayed for the operation. + :type display: ~azure.mgmt.databoxedge.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param is_data_action: Indicates whether the operation is a data action + :type is_data_action: bool + :param service_specification: Service specification. + :type service_specification: + ~azure.mgmt.databoxedge.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationDisplay(Model): + """Operation display properties. + + :param provider: Provider name. + :type provider: str + :param resource: The type of resource in which the operation is performed. + :type resource: str + :param operation: Operation to be performed on the resource. + :type operation: str + :param description: Description of the operation to be performed. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class Order(ARMBaseModel): + """The order details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Order configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param contact_information: Required. The contact details. + :type contact_information: ~azure.mgmt.databoxedge.models.ContactDetails + :param shipping_address: The shipping address. + :type shipping_address: ~azure.mgmt.databoxedge.models.Address + :ivar current_status: Current status of the order. + :vartype current_status: ~azure.mgmt.databoxedge.models.OrderStatus + :ivar order_history: List of status changes in the order. + :vartype order_history: list[~azure.mgmt.databoxedge.models.OrderStatus] + :ivar serial_number: Serial number of the device. + :vartype serial_number: str + :ivar delivery_tracking_info: Tracking information for the package + delivered to the customer whether it has an original or a replacement + device. + :vartype delivery_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :ivar return_tracking_info: Tracking information for the package returned + from the customer whether it has an original or a replacement device. + :vartype return_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :param shipment_type: ShipmentType of the order. Possible values include: + 'NotApplicable', 'ShippedToCustomer', 'SelfPickup' + :type shipment_type: str or ~azure.mgmt.databoxedge.models.ShipmentType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_information': {'required': True}, + 'current_status': {'readonly': True}, + 'order_history': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'delivery_tracking_info': {'readonly': True}, + 'return_tracking_info': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'contact_information': {'key': 'properties.contactInformation', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'Address'}, + 'current_status': {'key': 'properties.currentStatus', 'type': 'OrderStatus'}, + 'order_history': {'key': 'properties.orderHistory', 'type': '[OrderStatus]'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'delivery_tracking_info': {'key': 'properties.deliveryTrackingInfo', 'type': '[TrackingInfo]'}, + 'return_tracking_info': {'key': 'properties.returnTrackingInfo', 'type': '[TrackingInfo]'}, + 'shipment_type': {'key': 'properties.shipmentType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Order, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.contact_information = kwargs.get('contact_information', None) + self.shipping_address = kwargs.get('shipping_address', None) + self.current_status = None + self.order_history = None + self.serial_number = None + self.delivery_tracking_info = None + self.return_tracking_info = None + self.shipment_type = kwargs.get('shipment_type', None) + + +class OrderStatus(Model): + """Represents a single status change. + + Variables are only 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 status: Required. Status of the order as per the allowed status + types. Possible values include: 'Untracked', 'AwaitingFulfillment', + 'AwaitingPreparation', 'AwaitingShipment', 'Shipped', 'Arriving', + 'Delivered', 'ReplacementRequested', 'LostDevice', 'Declined', + 'ReturnInitiated', 'AwaitingReturnShipment', 'ShippedBack', + 'CollectedAtMicrosoft', 'AwaitingPickup', 'PickupCompleted', + 'AwaitingDrop' + :type status: str or ~azure.mgmt.databoxedge.models.OrderState + :ivar update_date_time: Time of status update. + :vartype update_date_time: datetime + :param comments: Comments related to this status change. + :type comments: str + :ivar tracking_information: Tracking information related to the state in + the ordering flow + :vartype tracking_information: ~azure.mgmt.databoxedge.models.TrackingInfo + :ivar additional_order_details: Dictionary to hold generic information + which is not stored + by the already existing properties + :vartype additional_order_details: dict[str, str] + """ + + _validation = { + 'status': {'required': True}, + 'update_date_time': {'readonly': True}, + 'tracking_information': {'readonly': True}, + 'additional_order_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'update_date_time': {'key': 'updateDateTime', 'type': 'iso-8601'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'tracking_information': {'key': 'trackingInformation', 'type': 'TrackingInfo'}, + 'additional_order_details': {'key': 'additionalOrderDetails', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(OrderStatus, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.update_date_time = None + self.comments = kwargs.get('comments', None) + self.tracking_information = None + self.additional_order_details = None + + +class PeriodicTimerEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. Periodic timer details. + :type source_info: ~azure.mgmt.databoxedge.models.PeriodicTimerSourceInfo + :param sink_info: Required. Role Sink information. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'PeriodicTimerSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PeriodicTimerEventTrigger, self).__init__(**kwargs) + self.source_info = kwargs.get('source_info', None) + self.sink_info = kwargs.get('sink_info', None) + self.custom_context_tag = kwargs.get('custom_context_tag', None) + self.kind = 'PeriodicTimerEvent' + + +class PeriodicTimerSourceInfo(Model): + """Periodic timer event source. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. The time of the day that results in a valid + trigger. Schedule is computed with reference to the time specified upto + seconds. If timezone is not specified the time will considered to be in + device timezone. The value will always be returned as UTC time. + :type start_time: datetime + :param schedule: Required. Periodic frequency at which timer event needs + to be raised. Supports daily, hourly, minutes, and seconds. + :type schedule: str + :param topic: Topic where periodic events are published to IoT device. + :type topic: str + """ + + _validation = { + 'start_time': {'required': True}, + 'schedule': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'schedule': {'key': 'schedule', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PeriodicTimerSourceInfo, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.schedule = kwargs.get('schedule', None) + self.topic = kwargs.get('topic', None) + + +class RefreshDetails(Model): + """Fields for tracking refresh job on the share or container. + + :param in_progress_refresh_job_id: If a refresh job is currently in + progress on this share or container, this field indicates the ARM resource + ID of that job. The field is empty if no job is in progress. + :type in_progress_refresh_job_id: str + :param last_completed_refresh_job_time_in_utc: Indicates the completed + time for the last refresh job on this particular share or container, if + any.This could be a failed job or a successful job. + :type last_completed_refresh_job_time_in_utc: datetime + :param error_manifest_file: Indicates the relative path of the error xml + for the last refresh job on this particular share or container, if any. + This could be a failed job or a successful job. + :type error_manifest_file: str + :param last_job: Indicates the id of the last refresh job on this + particular share or container,if any. This could be a failed job or a + successful job. + :type last_job: str + """ + + _attribute_map = { + 'in_progress_refresh_job_id': {'key': 'inProgressRefreshJobId', 'type': 'str'}, + 'last_completed_refresh_job_time_in_utc': {'key': 'lastCompletedRefreshJobTimeInUTC', 'type': 'iso-8601'}, + 'error_manifest_file': {'key': 'errorManifestFile', 'type': 'str'}, + 'last_job': {'key': 'lastJob', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RefreshDetails, self).__init__(**kwargs) + self.in_progress_refresh_job_id = kwargs.get('in_progress_refresh_job_id', None) + self.last_completed_refresh_job_time_in_utc = kwargs.get('last_completed_refresh_job_time_in_utc', None) + self.error_manifest_file = kwargs.get('error_manifest_file', None) + self.last_job = kwargs.get('last_job', None) + + +class ResourceIdentity(Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: Identity type. Possible values include: 'None', + 'SystemAssigned', 'UserAssigned' + :type type: str or ~azure.mgmt.databoxedge.models.MsiIdentityType + :ivar principal_id: Service Principal Id backing the Msi + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = None + self.tenant_id = None + + +class ResourceMoveDetails(Model): + """Fields for tracking resource move. + + :param operation_in_progress: Denotes whether move operation is in + progress. Possible values include: 'None', 'ResourceMoveInProgress', + 'ResourceMoveFailed' + :type operation_in_progress: str or + ~azure.mgmt.databoxedge.models.ResourceMoveStatus + :param operation_in_progress_lock_timeout_in_utc: Denotes the timeout of + the operation to finish + :type operation_in_progress_lock_timeout_in_utc: datetime + """ + + _attribute_map = { + 'operation_in_progress': {'key': 'operationInProgress', 'type': 'str'}, + 'operation_in_progress_lock_timeout_in_utc': {'key': 'operationInProgressLockTimeoutInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ResourceMoveDetails, self).__init__(**kwargs) + self.operation_in_progress = kwargs.get('operation_in_progress', None) + self.operation_in_progress_lock_timeout_in_utc = kwargs.get('operation_in_progress_lock_timeout_in_utc', None) + + +class ResourceTypeSku(Model): + """Resource type Sku object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The resource type. + :vartype resource_type: str + :ivar skus: The skus. + :vartype skus: list[~azure.mgmt.databoxedge.models.SkuInformation] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'skus': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[SkuInformation]'}, + } + + def __init__(self, **kwargs): + super(ResourceTypeSku, self).__init__(**kwargs) + self.resource_type = None + self.skus = None + + +class RoleSinkInfo(Model): + """Compute role against which events will be raised. + + All required parameters must be populated in order to send to Azure. + + :param role_id: Required. Compute role ID. + :type role_id: str + """ + + _validation = { + 'role_id': {'required': True}, + } + + _attribute_map = { + 'role_id': {'key': 'roleId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoleSinkInfo, self).__init__(**kwargs) + self.role_id = kwargs.get('role_id', None) + + +class Secret(Model): + """Holds device secret either as a KeyVault reference or as an encrypted + value. + + :param encrypted_secret: Encrypted (using device public key) secret value. + :type encrypted_secret: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param key_vault_id: Id of the Key-Vault where secret is stored (ex: + secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). + :type key_vault_id: str + """ + + _attribute_map = { + 'encrypted_secret': {'key': 'encryptedSecret', 'type': 'AsymmetricEncryptedSecret'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Secret, self).__init__(**kwargs) + self.encrypted_secret = kwargs.get('encrypted_secret', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class SecuritySettings(ARMBaseModel): + """The security settings of a device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param device_admin_password: Required. Device administrator password as + an encrypted string (encrypted using RSA PKCS #1) is used to sign into the + local web UI of the device. The Actual password should have at least 8 + characters that are a combination of uppercase, lowercase, numeric, and + special characters. + :type device_admin_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'device_admin_password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_admin_password': {'key': 'properties.deviceAdminPassword', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, **kwargs): + super(SecuritySettings, self).__init__(**kwargs) + self.device_admin_password = kwargs.get('device_admin_password', None) + + +class ServiceSpecification(Model): + """Service specification. + + :param metric_specifications: Metric specification as defined by shoebox. + :type metric_specifications: + list[~azure.mgmt.databoxedge.models.MetricSpecificationV1] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecificationV1]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class Share(ARMBaseModel): + """Represents a share on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Share on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the share. + :type description: str + :param share_status: Required. Current status of the share. Possible + values include: 'Offline', 'Unknown', 'OK', 'Updating', 'NeedsAttention' + :type share_status: str or ~azure.mgmt.databoxedge.models.ShareStatus + :param monitoring_status: Required. Current monitoring status of the + share. Possible values include: 'Enabled', 'Disabled' + :type monitoring_status: str or + ~azure.mgmt.databoxedge.models.MonitoringStatus + :param azure_container_info: Azure container mapping for the share. + :type azure_container_info: + ~azure.mgmt.databoxedge.models.AzureContainerInfo + :param access_protocol: Required. Access protocol to be used by the share. + Possible values include: 'SMB', 'NFS' + :type access_protocol: str or + ~azure.mgmt.databoxedge.models.ShareAccessProtocol + :param user_access_rights: Mapping of users and corresponding access + rights on the share (required for SMB protocol). + :type user_access_rights: + list[~azure.mgmt.databoxedge.models.UserAccessRight] + :param client_access_rights: List of IP addresses and corresponding access + rights on the share(required for NFS protocol). + :type client_access_rights: + list[~azure.mgmt.databoxedge.models.ClientAccessRight] + :param refresh_details: Details of the refresh job on this share. + :type refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar share_mappings: Share mount point to the role. + :vartype share_mappings: + list[~azure.mgmt.databoxedge.models.MountPointMap] + :param data_policy: Data policy of the share. Possible values include: + 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_status': {'required': True}, + 'monitoring_status': {'required': True}, + 'access_protocol': {'required': True}, + 'share_mappings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'share_status': {'key': 'properties.shareStatus', 'type': 'str'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + 'azure_container_info': {'key': 'properties.azureContainerInfo', 'type': 'AzureContainerInfo'}, + 'access_protocol': {'key': 'properties.accessProtocol', 'type': 'str'}, + 'user_access_rights': {'key': 'properties.userAccessRights', 'type': '[UserAccessRight]'}, + 'client_access_rights': {'key': 'properties.clientAccessRights', 'type': '[ClientAccessRight]'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Share, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.description = kwargs.get('description', None) + self.share_status = kwargs.get('share_status', None) + self.monitoring_status = kwargs.get('monitoring_status', None) + self.azure_container_info = kwargs.get('azure_container_info', None) + self.access_protocol = kwargs.get('access_protocol', None) + self.user_access_rights = kwargs.get('user_access_rights', None) + self.client_access_rights = kwargs.get('client_access_rights', None) + self.refresh_details = kwargs.get('refresh_details', None) + self.share_mappings = None + self.data_policy = kwargs.get('data_policy', None) + + +class ShareAccessRight(Model): + """Specifies the mapping between this particular user and the type of access + he has on shares on this device. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. The share ID. + :type share_id: str + :param access_type: Required. Type of access to be allowed on the share + for this user. Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'share_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShareAccessRight, self).__init__(**kwargs) + self.share_id = kwargs.get('share_id', None) + self.access_type = kwargs.get('access_type', None) + + +class Sku(Model): + """The SKU type. + + :param name: SKU name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EP2_64_1VPU_W', 'EP2_128_1T4_Mx1_W', 'EP2_256_2T4_W', + 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC', 'Management' + :type name: str or ~azure.mgmt.databoxedge.models.SkuName + :param tier: The SKU tier. This is based on the SKU name. Possible values + include: 'Standard' + :type tier: str or ~azure.mgmt.databoxedge.models.SkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + + +class SkuCapability(Model): + """The metadata to describe the capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuCapability, self).__init__(**kwargs) + self.name = None + self.value = None + + +class SkuCost(Model): + """The metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The cost quantity. + :vartype quantity: long + :ivar extended_unit: The extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class SkuInformation(Model): + """Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The sku name. + :vartype name: str + :ivar tier: The sku tier. + :vartype tier: str + :ivar kind: The sku kind. + :vartype kind: str + :ivar family: The Sku family. + :vartype family: str + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar locations: The locations where Sku is available. + :vartype locations: list[str] + :ivar location_info: The locations where Sku is available with zones and + sites info + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar required_quota_ids: The required quotaIds for the sku to be + available. + :vartype required_quota_ids: list[str] + :ivar required_features: The required features for the sku to be + available. + :vartype required_features: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'kind': {'readonly': True}, + 'family': {'readonly': True}, + 'costs': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'required_quota_ids': {'readonly': True}, + 'required_features': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'required_quota_ids': {'key': 'requiredQuotaIds', 'type': '[str]'}, + 'required_features': {'key': 'requiredFeatures', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SkuInformation, self).__init__(**kwargs) + self.name = None + self.tier = None + self.kind = None + self.family = None + self.costs = None + self.locations = None + self.location_info = None + self.required_quota_ids = None + self.required_features = None + + +class SkuInformationList(Model): + """List of SKU Information objects. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of ResourceTypeSku objects + :vartype value: list[~azure.mgmt.databoxedge.models.ResourceTypeSku] + :ivar next_link: Links to the next set of results + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceTypeSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuInformationList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class SkuLocationInfo(Model): + """The location info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: The location. + :vartype location: str + :ivar zones: The zones. + :vartype zones: list[str] + :ivar sites: The sites. + :vartype sites: list[str] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'sites': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'sites': {'key': 'sites', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.sites = None + + +class StorageAccount(ARMBaseModel): + """Represents a Storage Account on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccount object on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the storage Account. + :type description: str + :param storage_account_status: Current status of the storage account. + Possible values include: 'OK', 'Offline', 'Unknown', 'Updating', + 'NeedsAttention' + :type storage_account_status: str or + ~azure.mgmt.databoxedge.models.StorageAccountStatus + :param data_policy: Required. Data policy of the storage Account. Possible + values include: 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + :param storage_account_credential_id: Storage Account Credential Id + :type storage_account_credential_id: str + :ivar blob_endpoint: BlobEndpoint of Storage Account + :vartype blob_endpoint: str + :ivar container_count: The Container Count. Present only for Storage + Accounts with DataPolicy set to Cloud. + :vartype container_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_policy': {'required': True}, + 'blob_endpoint': {'readonly': True}, + 'container_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'storage_account_status': {'key': 'properties.storageAccountStatus', 'type': 'str'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + 'storage_account_credential_id': {'key': 'properties.storageAccountCredentialId', 'type': 'str'}, + 'blob_endpoint': {'key': 'properties.blobEndpoint', 'type': 'str'}, + 'container_count': {'key': 'properties.containerCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(StorageAccount, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.description = kwargs.get('description', None) + self.storage_account_status = kwargs.get('storage_account_status', None) + self.data_policy = kwargs.get('data_policy', None) + self.storage_account_credential_id = kwargs.get('storage_account_credential_id', None) + self.blob_endpoint = None + self.container_count = None + + +class StorageAccountCredential(ARMBaseModel): + """The storage account credential. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccountCredential object + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param alias: Required. Alias for the storage account. + :type alias: str + :param user_name: Username for the storage account. + :type user_name: str + :param account_key: Encrypted storage key. + :type account_key: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param connection_string: Connection string for the storage account. Use + this string if username and account key are not specified. + :type connection_string: str + :param ssl_status: Required. Signifies whether SSL needs to be enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type ssl_status: str or ~azure.mgmt.databoxedge.models.SSLStatus + :param blob_domain_name: Blob end point for private clouds. + :type blob_domain_name: str + :param account_type: Required. Type of storage accessed on the storage + account. Possible values include: 'GeneralPurposeStorage', 'BlobStorage' + :type account_type: str or ~azure.mgmt.databoxedge.models.AccountType + :param storage_account_id: Id of the storage account. + :type storage_account_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alias': {'required': True}, + 'ssl_status': {'required': True}, + 'account_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'alias': {'key': 'properties.alias', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'account_key': {'key': 'properties.accountKey', 'type': 'AsymmetricEncryptedSecret'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'ssl_status': {'key': 'properties.sslStatus', 'type': 'str'}, + 'blob_domain_name': {'key': 'properties.blobDomainName', 'type': 'str'}, + 'account_type': {'key': 'properties.accountType', 'type': 'str'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccountCredential, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.alias = kwargs.get('alias', None) + self.user_name = kwargs.get('user_name', None) + self.account_key = kwargs.get('account_key', None) + self.connection_string = kwargs.get('connection_string', None) + self.ssl_status = kwargs.get('ssl_status', None) + self.blob_domain_name = kwargs.get('blob_domain_name', None) + self.account_type = kwargs.get('account_type', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + + +class SubscriptionRegisteredFeatures(Model): + """SubscriptionRegisteredFeatures. + + :param name: + :type name: str + :param state: + :type state: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionRegisteredFeatures, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.state = kwargs.get('state', None) + + +class SymmetricKey(Model): + """Symmetric key for authentication. + + :param connection_string: Connection string based on the symmetric key. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, **kwargs): + super(SymmetricKey, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.databoxedge.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TrackingInfo(Model): + """Tracking courier information. + + :param serial_number: Serial number of the device being tracked. + :type serial_number: str + :param carrier_name: Name of the carrier used in the delivery. + :type carrier_name: str + :param tracking_id: Tracking ID of the shipment. + :type tracking_id: str + :param tracking_url: Tracking URL of the shipment. + :type tracking_url: str + """ + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackingInfo, self).__init__(**kwargs) + self.serial_number = kwargs.get('serial_number', None) + self.carrier_name = kwargs.get('carrier_name', None) + self.tracking_id = kwargs.get('tracking_id', None) + self.tracking_url = kwargs.get('tracking_url', None) + + +class UpdateDetails(Model): + """Update Specific attributes. + + :param update_title: Title of the Update + :type update_title: str + :param update_size: Size of the update(In Bytes) + :type update_size: float + :param update_type: Type of the Update. Possible values include: + 'Software', 'Kubernetes', 'Firmware' + :type update_type: str or ~azure.mgmt.databoxedge.models.UpdateType + :param target_version: Target Version number + :type target_version: str + :param estimated_install_time_in_mins: Estimated Install Time for the + update + :type estimated_install_time_in_mins: int + :param reboot_behavior: Indicates if updates are available and at least + one of the updates needs a reboot. Possible values include: + 'NeverReboots', 'RequiresReboot', 'RequestReboot' + :type reboot_behavior: str or + ~azure.mgmt.databoxedge.models.InstallRebootBehavior + :param status: Status of the update. Possible values include: + 'DownloadPending', 'DownloadStarted', 'DownloadCompleted', + 'InstallStarted', 'InstallCompleted' + :type status: str or ~azure.mgmt.databoxedge.models.UpdateStatus + """ + + _attribute_map = { + 'update_title': {'key': 'updateTitle', 'type': 'str'}, + 'update_size': {'key': 'updateSize', 'type': 'float'}, + 'update_type': {'key': 'updateType', 'type': 'str'}, + 'target_version': {'key': 'targetVersion', 'type': 'str'}, + 'estimated_install_time_in_mins': {'key': 'estimatedInstallTimeInMins', 'type': 'int'}, + 'reboot_behavior': {'key': 'rebootBehavior', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpdateDetails, self).__init__(**kwargs) + self.update_title = kwargs.get('update_title', None) + self.update_size = kwargs.get('update_size', None) + self.update_type = kwargs.get('update_type', None) + self.target_version = kwargs.get('target_version', None) + self.estimated_install_time_in_mins = kwargs.get('estimated_install_time_in_mins', None) + self.reboot_behavior = kwargs.get('reboot_behavior', None) + self.status = kwargs.get('status', None) + + +class UpdateDownloadProgress(Model): + """Details about the download progress of update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar download_phase: The download phase. Possible values include: + 'Unknown', 'Initializing', 'Downloading', 'Verifying' + :vartype download_phase: str or + ~azure.mgmt.databoxedge.models.DownloadPhase + :ivar percent_complete: Percentage of completion. + :vartype percent_complete: int + :ivar total_bytes_to_download: Total bytes to download. + :vartype total_bytes_to_download: float + :ivar total_bytes_downloaded: Total bytes downloaded. + :vartype total_bytes_downloaded: float + :ivar number_of_updates_to_download: Number of updates to download. + :vartype number_of_updates_to_download: int + :ivar number_of_updates_downloaded: Number of updates downloaded. + :vartype number_of_updates_downloaded: int + """ + + _validation = { + 'download_phase': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'total_bytes_to_download': {'readonly': True}, + 'total_bytes_downloaded': {'readonly': True}, + 'number_of_updates_to_download': {'readonly': True}, + 'number_of_updates_downloaded': {'readonly': True}, + } + + _attribute_map = { + 'download_phase': {'key': 'downloadPhase', 'type': 'str'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'total_bytes_to_download': {'key': 'totalBytesToDownload', 'type': 'float'}, + 'total_bytes_downloaded': {'key': 'totalBytesDownloaded', 'type': 'float'}, + 'number_of_updates_to_download': {'key': 'numberOfUpdatesToDownload', 'type': 'int'}, + 'number_of_updates_downloaded': {'key': 'numberOfUpdatesDownloaded', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdateDownloadProgress, self).__init__(**kwargs) + self.download_phase = None + self.percent_complete = None + self.total_bytes_to_download = None + self.total_bytes_downloaded = None + self.number_of_updates_to_download = None + self.number_of_updates_downloaded = None + + +class UpdateInstallProgress(Model): + """Progress details during installation of updates. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar percent_complete: Percentage completed. + :vartype percent_complete: int + :ivar number_of_updates_to_install: Number of updates to install. + :vartype number_of_updates_to_install: int + :ivar number_of_updates_installed: Number of updates installed. + :vartype number_of_updates_installed: int + """ + + _validation = { + 'percent_complete': {'readonly': True}, + 'number_of_updates_to_install': {'readonly': True}, + 'number_of_updates_installed': {'readonly': True}, + } + + _attribute_map = { + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'number_of_updates_to_install': {'key': 'numberOfUpdatesToInstall', 'type': 'int'}, + 'number_of_updates_installed': {'key': 'numberOfUpdatesInstalled', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdateInstallProgress, self).__init__(**kwargs) + self.percent_complete = None + self.number_of_updates_to_install = None + self.number_of_updates_installed = None + + +class UpdateSummary(ARMBaseModel): + """Details about ongoing updates and availability of updates on the device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: UpdateSummary Result + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param device_version_number: The current version of the device in format: + 1.2.17312.13.", + :type device_version_number: str + :param friendly_device_version_name: The current version of the device in + text format. + :type friendly_device_version_name: str + :param device_last_scanned_date_time: The last time when a scan was done + on the device. + :type device_last_scanned_date_time: datetime + :param last_completed_scan_job_date_time: The time when the last scan job + was completed (success/cancelled/failed) on the appliance. + :type last_completed_scan_job_date_time: datetime + :ivar last_completed_download_job_date_time: The time when the last + Download job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_download_job_date_time: datetime + :ivar last_completed_download_job_id: JobId of the last ran download + job.(Can be success/cancelled/failed) + :vartype last_completed_download_job_id: str + :ivar last_download_job_status: JobStatus of the last ran download job. + Possible values include: 'Invalid', 'Running', 'Succeeded', 'Failed', + 'Canceled', 'Paused', 'Scheduled' + :vartype last_download_job_status: str or + ~azure.mgmt.databoxedge.models.JobStatus + :ivar last_completed_install_job_date_time: The time when the last Install + job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_install_job_date_time: datetime + :ivar last_completed_install_job_id: JobId of the last ran install + job.(Can be success/cancelled/failed) + :vartype last_completed_install_job_id: str + :ivar last_install_job_status: JobStatus of the last ran install job. + Possible values include: 'Invalid', 'Running', 'Succeeded', 'Failed', + 'Canceled', 'Paused', 'Scheduled' + :vartype last_install_job_status: str or + ~azure.mgmt.databoxedge.models.JobStatus + :ivar total_number_of_updates_available: The number of updates available + for the current device version as per the last device scan. + :vartype total_number_of_updates_available: int + :ivar total_number_of_updates_pending_download: The total number of items + pending download. + :vartype total_number_of_updates_pending_download: int + :ivar total_number_of_updates_pending_install: The total number of items + pending install. + :vartype total_number_of_updates_pending_install: int + :ivar reboot_behavior: Indicates if updates are available and at least one + of the updates needs a reboot. Possible values include: 'NeverReboots', + 'RequiresReboot', 'RequestReboot' + :vartype reboot_behavior: str or + ~azure.mgmt.databoxedge.models.InstallRebootBehavior + :ivar ongoing_update_operation: The current update operation. Possible + values include: 'None', 'Scan', 'Download', 'Install' + :vartype ongoing_update_operation: str or + ~azure.mgmt.databoxedge.models.UpdateOperation + :ivar in_progress_download_job_id: The job ID of the download job in + progress. + :vartype in_progress_download_job_id: str + :ivar in_progress_install_job_id: The job ID of the install job in + progress. + :vartype in_progress_install_job_id: str + :ivar in_progress_download_job_started_date_time: The time when the + currently running download (if any) started. + :vartype in_progress_download_job_started_date_time: datetime + :ivar in_progress_install_job_started_date_time: The time when the + currently running install (if any) started. + :vartype in_progress_install_job_started_date_time: datetime + :ivar update_titles: The list of updates available for install. + :vartype update_titles: list[str] + :ivar updates: The list of updates available for install. + :vartype updates: list[~azure.mgmt.databoxedge.models.UpdateDetails] + :ivar total_update_size_in_bytes: The total size of updates available for + download in bytes. + :vartype total_update_size_in_bytes: float + :ivar total_time_in_minutes: The total time in Minutes + :vartype total_time_in_minutes: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_completed_download_job_date_time': {'readonly': True}, + 'last_completed_download_job_id': {'readonly': True}, + 'last_download_job_status': {'readonly': True}, + 'last_completed_install_job_date_time': {'readonly': True}, + 'last_completed_install_job_id': {'readonly': True}, + 'last_install_job_status': {'readonly': True}, + 'total_number_of_updates_available': {'readonly': True}, + 'total_number_of_updates_pending_download': {'readonly': True}, + 'total_number_of_updates_pending_install': {'readonly': True}, + 'reboot_behavior': {'readonly': True}, + 'ongoing_update_operation': {'readonly': True}, + 'in_progress_download_job_id': {'readonly': True}, + 'in_progress_install_job_id': {'readonly': True}, + 'in_progress_download_job_started_date_time': {'readonly': True}, + 'in_progress_install_job_started_date_time': {'readonly': True}, + 'update_titles': {'readonly': True}, + 'updates': {'readonly': True}, + 'total_update_size_in_bytes': {'readonly': True}, + 'total_time_in_minutes': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'device_version_number': {'key': 'properties.deviceVersionNumber', 'type': 'str'}, + 'friendly_device_version_name': {'key': 'properties.friendlyDeviceVersionName', 'type': 'str'}, + 'device_last_scanned_date_time': {'key': 'properties.deviceLastScannedDateTime', 'type': 'iso-8601'}, + 'last_completed_scan_job_date_time': {'key': 'properties.lastCompletedScanJobDateTime', 'type': 'iso-8601'}, + 'last_completed_download_job_date_time': {'key': 'properties.lastCompletedDownloadJobDateTime', 'type': 'iso-8601'}, + 'last_completed_download_job_id': {'key': 'properties.lastCompletedDownloadJobId', 'type': 'str'}, + 'last_download_job_status': {'key': 'properties.lastDownloadJobStatus', 'type': 'str'}, + 'last_completed_install_job_date_time': {'key': 'properties.lastCompletedInstallJobDateTime', 'type': 'iso-8601'}, + 'last_completed_install_job_id': {'key': 'properties.lastCompletedInstallJobId', 'type': 'str'}, + 'last_install_job_status': {'key': 'properties.lastInstallJobStatus', 'type': 'str'}, + 'total_number_of_updates_available': {'key': 'properties.totalNumberOfUpdatesAvailable', 'type': 'int'}, + 'total_number_of_updates_pending_download': {'key': 'properties.totalNumberOfUpdatesPendingDownload', 'type': 'int'}, + 'total_number_of_updates_pending_install': {'key': 'properties.totalNumberOfUpdatesPendingInstall', 'type': 'int'}, + 'reboot_behavior': {'key': 'properties.rebootBehavior', 'type': 'str'}, + 'ongoing_update_operation': {'key': 'properties.ongoingUpdateOperation', 'type': 'str'}, + 'in_progress_download_job_id': {'key': 'properties.inProgressDownloadJobId', 'type': 'str'}, + 'in_progress_install_job_id': {'key': 'properties.inProgressInstallJobId', 'type': 'str'}, + 'in_progress_download_job_started_date_time': {'key': 'properties.inProgressDownloadJobStartedDateTime', 'type': 'iso-8601'}, + 'in_progress_install_job_started_date_time': {'key': 'properties.inProgressInstallJobStartedDateTime', 'type': 'iso-8601'}, + 'update_titles': {'key': 'properties.updateTitles', 'type': '[str]'}, + 'updates': {'key': 'properties.updates', 'type': '[UpdateDetails]'}, + 'total_update_size_in_bytes': {'key': 'properties.totalUpdateSizeInBytes', 'type': 'float'}, + 'total_time_in_minutes': {'key': 'properties.totalTimeInMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdateSummary, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.device_version_number = kwargs.get('device_version_number', None) + self.friendly_device_version_name = kwargs.get('friendly_device_version_name', None) + self.device_last_scanned_date_time = kwargs.get('device_last_scanned_date_time', None) + self.last_completed_scan_job_date_time = kwargs.get('last_completed_scan_job_date_time', None) + self.last_completed_download_job_date_time = None + self.last_completed_download_job_id = None + self.last_download_job_status = None + self.last_completed_install_job_date_time = None + self.last_completed_install_job_id = None + self.last_install_job_status = None + self.total_number_of_updates_available = None + self.total_number_of_updates_pending_download = None + self.total_number_of_updates_pending_install = None + self.reboot_behavior = None + self.ongoing_update_operation = None + self.in_progress_download_job_id = None + self.in_progress_install_job_id = None + self.in_progress_download_job_started_date_time = None + self.in_progress_install_job_started_date_time = None + self.update_titles = None + self.updates = None + self.total_update_size_in_bytes = None + self.total_time_in_minutes = None + + +class UploadCertificateRequest(Model): + """The upload certificate request. + + All required parameters must be populated in order to send to Azure. + + :param authentication_type: The authentication type. Possible values + include: 'Invalid', 'AzureActiveDirectory' + :type authentication_type: str or + ~azure.mgmt.databoxedge.models.AuthenticationType + :param certificate: Required. The base64 encoded certificate raw data. + :type certificate: str + """ + + _validation = { + 'certificate': {'required': True}, + } + + _attribute_map = { + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'str'}, + 'certificate': {'key': 'properties.certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UploadCertificateRequest, self).__init__(**kwargs) + self.authentication_type = kwargs.get('authentication_type', None) + self.certificate = kwargs.get('certificate', None) + + +class UploadCertificateResponse(Model): + """The upload registration certificate response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param auth_type: Specifies authentication type. Possible values include: + 'Invalid', 'AzureActiveDirectory' + :type auth_type: str or ~azure.mgmt.databoxedge.models.AuthenticationType + :ivar resource_id: The resource ID of the Data Box Edge/Gateway device. + :vartype resource_id: str + :ivar aad_authority: Azure Active Directory tenant authority. + :vartype aad_authority: str + :ivar aad_tenant_id: Azure Active Directory tenant ID. + :vartype aad_tenant_id: str + :ivar service_principal_client_id: Azure Active Directory service + principal client ID. + :vartype service_principal_client_id: str + :ivar service_principal_object_id: Azure Active Directory service + principal object ID. + :vartype service_principal_object_id: str + :ivar azure_management_endpoint_audience: The azure management endpoint + audience. + :vartype azure_management_endpoint_audience: str + :ivar aad_audience: Identifier of the target resource that is the + recipient of the requested token. + :vartype aad_audience: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'aad_authority': {'readonly': True}, + 'aad_tenant_id': {'readonly': True}, + 'service_principal_client_id': {'readonly': True}, + 'service_principal_object_id': {'readonly': True}, + 'azure_management_endpoint_audience': {'readonly': True}, + 'aad_audience': {'readonly': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'aad_authority': {'key': 'aadAuthority', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, + 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UploadCertificateResponse, self).__init__(**kwargs) + self.auth_type = kwargs.get('auth_type', None) + self.resource_id = None + self.aad_authority = None + self.aad_tenant_id = None + self.service_principal_client_id = None + self.service_principal_object_id = None + self.azure_management_endpoint_audience = None + self.aad_audience = None + + +class User(ARMBaseModel): + """Represents a user who has access to one or more shares on the Data Box + Edge/Gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: User in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param encrypted_password: The password details. + :type encrypted_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :ivar share_access_rights: List of shares that the user has rights on. + This field should not be specified during user creation. + :vartype share_access_rights: + list[~azure.mgmt.databoxedge.models.ShareAccessRight] + :param user_type: Type of the user. Possible values include: 'Share', + 'LocalManagement', 'ARM' + :type user_type: str or ~azure.mgmt.databoxedge.models.UserType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_access_rights': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'encrypted_password': {'key': 'properties.encryptedPassword', 'type': 'AsymmetricEncryptedSecret'}, + 'share_access_rights': {'key': 'properties.shareAccessRights', 'type': '[ShareAccessRight]'}, + 'user_type': {'key': 'properties.userType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.system_data = kwargs.get('system_data', None) + self.encrypted_password = kwargs.get('encrypted_password', None) + self.share_access_rights = None + self.user_type = kwargs.get('user_type', None) + + +class UserAccessRight(Model): + """The mapping between a particular user and the access type on the SMB share. + + All required parameters must be populated in order to send to Azure. + + :param user_id: Required. User ID (already existing in the device). + :type user_id: str + :param access_type: Required. Type of access to be allowed for the user. + Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'user_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserAccessRight, self).__init__(**kwargs) + self.user_id = kwargs.get('user_id', None) + self.access_type = kwargs.get('access_type', None) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_models_py3.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_models_py3.py new file mode 100644 index 000000000000..e8a256d25c63 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_models_py3.py @@ -0,0 +1,4607 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ARMBaseModel(Model): + """Represents the base class for all object models. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ARMBaseModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Addon(ARMBaseModel): + """Role Addon. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ArcAddon, IoTAddon + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ArcForKubernetes': 'ArcAddon', 'IotEdge': 'IoTAddon'} + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Addon, self).__init__(**kwargs) + self.system_data = system_data + self.kind = None + self.kind = 'Addon' + + +class Address(Model): + """The shipping address of the customer. + + All required parameters must be populated in order to send to Azure. + + :param address_line1: The address line1. + :type address_line1: str + :param address_line2: The address line2. + :type address_line2: str + :param address_line3: The address line3. + :type address_line3: str + :param postal_code: The postal code. + :type postal_code: str + :param city: The city name. + :type city: str + :param state: The state name. + :type state: str + :param country: Required. The country name. + :type country: str + """ + + _validation = { + 'country': {'required': True}, + } + + _attribute_map = { + 'address_line1': {'key': 'addressLine1', 'type': 'str'}, + 'address_line2': {'key': 'addressLine2', 'type': 'str'}, + 'address_line3': {'key': 'addressLine3', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + } + + def __init__(self, *, country: str, address_line1: str=None, address_line2: str=None, address_line3: str=None, postal_code: str=None, city: str=None, state: str=None, **kwargs) -> None: + super(Address, self).__init__(**kwargs) + self.address_line1 = address_line1 + self.address_line2 = address_line2 + self.address_line3 = address_line3 + self.postal_code = postal_code + self.city = city + self.state = state + self.country = country + + +class Alert(ARMBaseModel): + """Alert on the data box edge/gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Alert generated in the resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar title: Alert title. + :vartype title: str + :ivar alert_type: Alert type. + :vartype alert_type: str + :ivar appeared_at_date_time: UTC time when the alert appeared. + :vartype appeared_at_date_time: datetime + :ivar recommendation: Alert recommendation. + :vartype recommendation: str + :ivar severity: Severity of the alert. Possible values include: + 'Informational', 'Warning', 'Critical' + :vartype severity: str or ~azure.mgmt.databoxedge.models.AlertSeverity + :ivar error_details: Error details of the alert. + :vartype error_details: ~azure.mgmt.databoxedge.models.AlertErrorDetails + :ivar detailed_information: Alert details. + :vartype detailed_information: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'appeared_at_date_time': {'readonly': True}, + 'recommendation': {'readonly': True}, + 'severity': {'readonly': True}, + 'error_details': {'readonly': True}, + 'detailed_information': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'appeared_at_date_time': {'key': 'properties.appearedAtDateTime', 'type': 'iso-8601'}, + 'recommendation': {'key': 'properties.recommendation', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'error_details': {'key': 'properties.errorDetails', 'type': 'AlertErrorDetails'}, + 'detailed_information': {'key': 'properties.detailedInformation', 'type': '{str}'}, + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.system_data = system_data + self.title = None + self.alert_type = None + self.appeared_at_date_time = None + self.recommendation = None + self.severity = None + self.error_details = None + self.detailed_information = None + + +class AlertErrorDetails(Model): + """Error details for the alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_code: Error code. + :vartype error_code: str + :ivar error_message: Error Message. + :vartype error_message: str + :ivar occurrences: Number of occurrences. + :vartype occurrences: int + """ + + _validation = { + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'occurrences': {'readonly': True}, + } + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'occurrences': {'key': 'occurrences', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(AlertErrorDetails, self).__init__(**kwargs) + self.error_code = None + self.error_message = None + self.occurrences = None + + +class ArcAddon(Addon): + """Arc Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param subscription_id: Required. Arc resource subscription Id + :type subscription_id: str + :param resource_group_name: Required. Arc resource group name + :type resource_group_name: str + :param resource_name: Required. Arc resource Name + :type resource_name: str + :param resource_location: Required. Arc resource location + :type resource_location: str + :ivar version: Arc resource version + :vartype version: str + :ivar host_platform: Host OS supported by the Arc addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'subscription_id': {'required': True}, + 'resource_group_name': {'required': True}, + 'resource_name': {'required': True}, + 'resource_location': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'properties.resourceGroupName', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, subscription_id: str, resource_group_name: str, resource_name: str, resource_location: str, system_data=None, **kwargs) -> None: + super(ArcAddon, self).__init__(system_data=system_data, **kwargs) + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.resource_name = resource_name + self.resource_location = resource_location + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'ArcForKubernetes' + + +class AsymmetricEncryptedSecret(Model): + """Represent the secrets intended for encryption with asymmetric key pair. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. The value of the secret. + :type value: str + :param encryption_cert_thumbprint: Thumbprint certificate used to encrypt + \\"Value\\". If the value is unencrypted, it will be null. + :type encryption_cert_thumbprint: str + :param encryption_algorithm: Required. The algorithm used to encrypt + "Value". Possible values include: 'None', 'AES256', 'RSAES_PKCS1_v_1_5' + :type encryption_algorithm: str or + ~azure.mgmt.databoxedge.models.EncryptionAlgorithm + """ + + _validation = { + 'value': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'encryption_cert_thumbprint': {'key': 'encryptionCertThumbprint', 'type': 'str'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + } + + def __init__(self, *, value: str, encryption_algorithm, encryption_cert_thumbprint: str=None, **kwargs) -> None: + super(AsymmetricEncryptedSecret, self).__init__(**kwargs) + self.value = value + self.encryption_cert_thumbprint = encryption_cert_thumbprint + self.encryption_algorithm = encryption_algorithm + + +class Authentication(Model): + """Authentication mechanism for IoT devices. + + :param symmetric_key: Symmetric key for authentication. + :type symmetric_key: ~azure.mgmt.databoxedge.models.SymmetricKey + """ + + _attribute_map = { + 'symmetric_key': {'key': 'symmetricKey', 'type': 'SymmetricKey'}, + } + + def __init__(self, *, symmetric_key=None, **kwargs) -> None: + super(Authentication, self).__init__(**kwargs) + self.symmetric_key = symmetric_key + + +class AzureContainerInfo(Model): + """Azure container mapping of the endpoint. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_credential_id: Required. ID of the storage account + credential used to access storage. + :type storage_account_credential_id: str + :param container_name: Required. Container name (Based on the data format + specified, this represents the name of Azure Files/Page blob/Block blob). + :type container_name: str + :param data_format: Required. Storage format used for the file represented + by the share. Possible values include: 'BlockBlob', 'PageBlob', + 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + """ + + _validation = { + 'storage_account_credential_id': {'required': True}, + 'container_name': {'required': True}, + 'data_format': {'required': True}, + } + + _attribute_map = { + 'storage_account_credential_id': {'key': 'storageAccountCredentialId', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'data_format': {'key': 'dataFormat', 'type': 'str'}, + } + + def __init__(self, *, storage_account_credential_id: str, container_name: str, data_format, **kwargs) -> None: + super(AzureContainerInfo, self).__init__(**kwargs) + self.storage_account_credential_id = storage_account_credential_id + self.container_name = container_name + self.data_format = data_format + + +class BandwidthSchedule(ARMBaseModel): + """The bandwidth schedule details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Bandwidth object related to ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param start: Required. The start time of the schedule in UTC. + :type start: str + :param stop: Required. The stop time of the schedule in UTC. + :type stop: str + :param rate_in_mbps: Required. The bandwidth rate in Mbps. + :type rate_in_mbps: int + :param days: Required. The days of the week when this schedule is + applicable. + :type days: list[str or ~azure.mgmt.databoxedge.models.DayOfWeek] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start': {'required': True}, + 'stop': {'required': True}, + 'rate_in_mbps': {'required': True}, + 'days': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'start': {'key': 'properties.start', 'type': 'str'}, + 'stop': {'key': 'properties.stop', 'type': 'str'}, + 'rate_in_mbps': {'key': 'properties.rateInMbps', 'type': 'int'}, + 'days': {'key': 'properties.days', 'type': '[str]'}, + } + + def __init__(self, *, start: str, stop: str, rate_in_mbps: int, days, system_data=None, **kwargs) -> None: + super(BandwidthSchedule, self).__init__(**kwargs) + self.system_data = system_data + self.start = start + self.stop = stop + self.rate_in_mbps = rate_in_mbps + self.days = days + + +class ClientAccessRight(Model): + """The mapping between a particular client IP and the type of access client + has on the NFS share. + + All required parameters must be populated in order to send to Azure. + + :param client: Required. IP of the client. + :type client: str + :param access_permission: Required. Type of access to be allowed for the + client. Possible values include: 'NoAccess', 'ReadOnly', 'ReadWrite' + :type access_permission: str or + ~azure.mgmt.databoxedge.models.ClientPermissionType + """ + + _validation = { + 'client': {'required': True}, + 'access_permission': {'required': True}, + } + + _attribute_map = { + 'client': {'key': 'client', 'type': 'str'}, + 'access_permission': {'key': 'accessPermission', 'type': 'str'}, + } + + def __init__(self, *, client: str, access_permission, **kwargs) -> None: + super(ClientAccessRight, self).__init__(**kwargs) + self.client = client + self.access_permission = access_permission + + +class Role(ARMBaseModel): + """Compute role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CloudEdgeManagementRole, IoTRole, KubernetesRole, MECRole + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CloudEdgeManagement': 'CloudEdgeManagementRole', 'IOT': 'IoTRole', 'Kubernetes': 'KubernetesRole', 'MEC': 'MECRole'} + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Role, self).__init__(**kwargs) + self.system_data = system_data + self.kind = None + self.kind = 'Role' + + +class CloudEdgeManagementRole(Role): + """CloudEdgeManagementRole role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :ivar local_management_status: Local Edge Management Status. Possible + values include: 'Enabled', 'Disabled' + :vartype local_management_status: str or + ~azure.mgmt.databoxedge.models.RoleStatus + :ivar edge_profile: Edge Profile of the resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'local_management_status': {'readonly': True}, + 'edge_profile': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'local_management_status': {'key': 'properties.localManagementStatus', 'type': 'str'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, role_status, system_data=None, **kwargs) -> None: + super(CloudEdgeManagementRole, self).__init__(system_data=system_data, **kwargs) + self.local_management_status = None + self.edge_profile = None + self.role_status = role_status + self.kind = 'CloudEdgeManagement' + + +class CloudError(Model): + """An error response from the service. + + :param error: The error details. + :type error: ~azure.mgmt.databoxedge.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.databoxedge.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class CniConfig(Model): + """Cni configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Cni type + :vartype type: str + :ivar version: Cni version + :vartype version: str + :ivar pod_subnet: Pod Subnet + :vartype pod_subnet: str + :ivar service_subnet: Service subnet + :vartype service_subnet: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + 'pod_subnet': {'readonly': True}, + 'service_subnet': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'pod_subnet': {'key': 'podSubnet', 'type': 'str'}, + 'service_subnet': {'key': 'serviceSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CniConfig, self).__init__(**kwargs) + self.type = None + self.version = None + self.pod_subnet = None + self.service_subnet = None + + +class ComputeResource(Model): + """Compute infrastructure Resource. + + All required parameters must be populated in order to send to Azure. + + :param processor_count: Required. Processor count + :type processor_count: int + :param memory_in_gb: Required. Memory in GB + :type memory_in_gb: long + """ + + _validation = { + 'processor_count': {'required': True}, + 'memory_in_gb': {'required': True}, + } + + _attribute_map = { + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'long'}, + } + + def __init__(self, *, processor_count: int, memory_in_gb: int, **kwargs) -> None: + super(ComputeResource, self).__init__(**kwargs) + self.processor_count = processor_count + self.memory_in_gb = memory_in_gb + + +class ContactDetails(Model): + """Contains all the contact details of the customer. + + All required parameters must be populated in order to send to Azure. + + :param contact_person: Required. The contact person name. + :type contact_person: str + :param company_name: Required. The name of the company. + :type company_name: str + :param phone: Required. The phone number. + :type phone: str + :param email_list: Required. The email list. + :type email_list: list[str] + """ + + _validation = { + 'contact_person': {'required': True}, + 'company_name': {'required': True}, + 'phone': {'required': True}, + 'email_list': {'required': True}, + } + + _attribute_map = { + 'contact_person': {'key': 'contactPerson', 'type': 'str'}, + 'company_name': {'key': 'companyName', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + 'email_list': {'key': 'emailList', 'type': '[str]'}, + } + + def __init__(self, *, contact_person: str, company_name: str, phone: str, email_list, **kwargs) -> None: + super(ContactDetails, self).__init__(**kwargs) + self.contact_person = contact_person + self.company_name = company_name + self.phone = phone + self.email_list = email_list + + +class Container(ARMBaseModel): + """Represents a container on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Container in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar container_status: Current status of the container. Possible values + include: 'OK', 'Offline', 'Unknown', 'Updating', 'NeedsAttention' + :vartype container_status: str or + ~azure.mgmt.databoxedge.models.ContainerStatus + :param data_format: Required. DataFormat for Container. Possible values + include: 'BlockBlob', 'PageBlob', 'AzureFile' + :type data_format: str or + ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + :ivar refresh_details: Details of the refresh job on this container. + :vartype refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar created_date_time: The UTC time when container got created. + :vartype created_date_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'container_status': {'readonly': True}, + 'data_format': {'required': True}, + 'refresh_details': {'readonly': True}, + 'created_date_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'container_status': {'key': 'properties.containerStatus', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, data_format, system_data=None, **kwargs) -> None: + super(Container, self).__init__(**kwargs) + self.system_data = system_data + self.container_status = None + self.data_format = data_format + self.refresh_details = None + self.created_date_time = None + + +class DataBoxEdgeDevice(ARMBaseModel): + """The Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param location: Required. The location of the device. This is a supported + and registered Azure geographical region (for example, West US, East US, + or Southeast Asia). The geographical region of a device cannot be changed + once it is created, but if an identical geographical region is specified + on update, the request will succeed. + :type location: str + :param tags: The list of tags that describe the device. These tags can be + used to view and group this device (across resource groups). + :type tags: dict[str, str] + :param sku: The SKU type. + :type sku: ~azure.mgmt.databoxedge.models.Sku + :param etag: The etag for the devices. + :type etag: str + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :ivar kind: The etag for the devices. Possible values include: + 'AzureDataBoxGateway', 'AzureStackEdge', 'AzureStackHub', + 'AzureModularDataCentre' + :vartype kind: str or ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceKind + :param system_data: DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param data_box_edge_device_status: The status of the Data Box + Edge/Gateway device. Possible values include: 'ReadyToSetup', 'Online', + 'Offline', 'NeedsAttention', 'Disconnected', 'PartiallyDisconnected', + 'Maintenance' + :type data_box_edge_device_status: str or + ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceStatus + :ivar serial_number: The Serial Number of Data Box Edge/Gateway device. + :vartype serial_number: str + :ivar description: The Description of the Data Box Edge/Gateway device. + :vartype description: str + :ivar model_description: The description of the Data Box Edge/Gateway + device model. + :vartype model_description: str + :ivar device_type: The type of the Data Box Edge/Gateway device. Possible + values include: 'DataBoxEdgeDevice' + :vartype device_type: str or ~azure.mgmt.databoxedge.models.DeviceType + :ivar friendly_name: The Data Box Edge/Gateway device name. + :vartype friendly_name: str + :ivar culture: The Data Box Edge/Gateway device culture. + :vartype culture: str + :ivar device_model: The Data Box Edge/Gateway device model. + :vartype device_model: str + :ivar device_software_version: The Data Box Edge/Gateway device software + version. + :vartype device_software_version: str + :ivar device_local_capacity: The Data Box Edge/Gateway device local + capacity in MB. + :vartype device_local_capacity: long + :ivar time_zone: The Data Box Edge/Gateway device timezone. + :vartype time_zone: str + :ivar device_hcs_version: The device software version number of the device + (eg: 1.2.18105.6). + :vartype device_hcs_version: str + :ivar configured_role_types: Type of compute roles configured. + :vartype configured_role_types: list[str or + ~azure.mgmt.databoxedge.models.RoleTypes] + :ivar node_count: The number of nodes in the cluster. + :vartype node_count: int + :ivar resource_move_details: The details of the move operation on this + resource. + :vartype resource_move_details: + ~azure.mgmt.databoxedge.models.ResourceMoveDetails + :ivar edge_profile: The details of Edge Profile for this resource + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'description': {'readonly': True}, + 'model_description': {'readonly': True}, + 'device_type': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'culture': {'readonly': True}, + 'device_model': {'readonly': True}, + 'device_software_version': {'readonly': True}, + 'device_local_capacity': {'readonly': True}, + 'time_zone': {'readonly': True}, + 'device_hcs_version': {'readonly': True}, + 'configured_role_types': {'readonly': True}, + 'node_count': {'readonly': True}, + 'resource_move_details': {'readonly': True}, + 'edge_profile': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'data_box_edge_device_status': {'key': 'properties.dataBoxEdgeDeviceStatus', 'type': 'str'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'model_description': {'key': 'properties.modelDescription', 'type': 'str'}, + 'device_type': {'key': 'properties.deviceType', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'culture': {'key': 'properties.culture', 'type': 'str'}, + 'device_model': {'key': 'properties.deviceModel', 'type': 'str'}, + 'device_software_version': {'key': 'properties.deviceSoftwareVersion', 'type': 'str'}, + 'device_local_capacity': {'key': 'properties.deviceLocalCapacity', 'type': 'long'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'device_hcs_version': {'key': 'properties.deviceHcsVersion', 'type': 'str'}, + 'configured_role_types': {'key': 'properties.configuredRoleTypes', 'type': '[str]'}, + 'node_count': {'key': 'properties.nodeCount', 'type': 'int'}, + 'resource_move_details': {'key': 'properties.resourceMoveDetails', 'type': 'ResourceMoveDetails'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfile'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, etag: str=None, identity=None, system_data=None, data_box_edge_device_status=None, **kwargs) -> None: + super(DataBoxEdgeDevice, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.sku = sku + self.etag = etag + self.identity = identity + self.kind = None + self.system_data = system_data + self.data_box_edge_device_status = data_box_edge_device_status + self.serial_number = None + self.description = None + self.model_description = None + self.device_type = None + self.friendly_name = None + self.culture = None + self.device_model = None + self.device_software_version = None + self.device_local_capacity = None + self.time_zone = None + self.device_hcs_version = None + self.configured_role_types = None + self.node_count = None + self.resource_move_details = None + self.edge_profile = None + + +class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel): + """The extended Info of the Data Box Edge/Gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param encryption_key_thumbprint: The digital signature of encrypted + certificate. + :type encryption_key_thumbprint: str + :param encryption_key: The public part of the encryption certificate. + Client uses this to encrypt any secret. + :type encryption_key: str + :ivar resource_key: The Resource ID of the Resource. + :vartype resource_key: str + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + :param key_vault_sync_status: Key vault sync status. Possible values + include: 'KeyVaultSynced', 'KeyVaultSyncFailed', 'KeyVaultNotConfigured', + 'KeyVaultSyncPending', 'KeyVaultSyncing', 'KeyVaultNotSynced' + :type key_vault_sync_status: str or + ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus + :ivar device_secrets: Device secrets, will be returned only with + ODataFilter $expand=deviceSecrets + :vartype device_secrets: dict[str, ~azure.mgmt.databoxedge.models.Secret] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_key': {'readonly': True}, + 'device_secrets': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'}, + 'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'}, + 'resource_key': {'key': 'properties.resourceKey', 'type': 'str'}, + 'client_secret_store_id': {'key': 'properties.clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'properties.clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'properties.channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'properties.channelIntegrityKeyVersion', 'type': 'str'}, + 'key_vault_sync_status': {'key': 'properties.keyVaultSyncStatus', 'type': 'str'}, + 'device_secrets': {'key': 'properties.deviceSecrets', 'type': '{Secret}'}, + } + + def __init__(self, *, encryption_key_thumbprint: str=None, encryption_key: str=None, client_secret_store_id: str=None, client_secret_store_url: str=None, channel_integrity_key_name: str=None, channel_integrity_key_version: str=None, key_vault_sync_status=None, **kwargs) -> None: + super(DataBoxEdgeDeviceExtendedInfo, self).__init__(**kwargs) + self.encryption_key_thumbprint = encryption_key_thumbprint + self.encryption_key = encryption_key + self.resource_key = None + self.client_secret_store_id = client_secret_store_id + self.client_secret_store_url = client_secret_store_url + self.channel_integrity_key_name = channel_integrity_key_name + self.channel_integrity_key_version = channel_integrity_key_version + self.key_vault_sync_status = key_vault_sync_status + self.device_secrets = None + + +class DataBoxEdgeDeviceExtendedInfoPatch(Model): + """The Data Box Edge/Gateway device extended info patch. + + :param client_secret_store_id: The Key Vault ARM Id for client secrets + :type client_secret_store_id: str + :param client_secret_store_url: The url to access the Client Key Vault + :type client_secret_store_url: str + :param channel_integrity_key_name: The name for Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_name: str + :param channel_integrity_key_version: The version of Channel Integrity Key + stored in the Client Key Vault + :type channel_integrity_key_version: str + :param sync_status: For changing or to initiate the resync to key-vault + set the status to KeyVaultSyncPending, rest of the status will not be + applicable. Possible values include: 'KeyVaultSynced', + 'KeyVaultSyncFailed', 'KeyVaultNotConfigured', 'KeyVaultSyncPending', + 'KeyVaultSyncing', 'KeyVaultNotSynced' + :type sync_status: str or + ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus + """ + + _attribute_map = { + 'client_secret_store_id': {'key': 'clientSecretStoreId', 'type': 'str'}, + 'client_secret_store_url': {'key': 'clientSecretStoreUrl', 'type': 'str'}, + 'channel_integrity_key_name': {'key': 'channelIntegrityKeyName', 'type': 'str'}, + 'channel_integrity_key_version': {'key': 'channelIntegrityKeyVersion', 'type': 'str'}, + 'sync_status': {'key': 'syncStatus', 'type': 'str'}, + } + + def __init__(self, *, client_secret_store_id: str=None, client_secret_store_url: str=None, channel_integrity_key_name: str=None, channel_integrity_key_version: str=None, sync_status=None, **kwargs) -> None: + super(DataBoxEdgeDeviceExtendedInfoPatch, self).__init__(**kwargs) + self.client_secret_store_id = client_secret_store_id + self.client_secret_store_url = client_secret_store_url + self.channel_integrity_key_name = channel_integrity_key_name + self.channel_integrity_key_version = channel_integrity_key_version + self.sync_status = sync_status + + +class DataBoxEdgeDevicePatch(Model): + """The Data Box Edge/Gateway device patch. + + :param tags: The tags attached to the Data Box Edge/Gateway resource. + :type tags: dict[str, str] + :param identity: Msi identity of the resource + :type identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :param edge_profile: Edge Profile property of the Data Box Edge/Gateway + device + :type edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfilePatch + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'edge_profile': {'key': 'properties.edgeProfile', 'type': 'EdgeProfilePatch'}, + } + + def __init__(self, *, tags=None, identity=None, edge_profile=None, **kwargs) -> None: + super(DataBoxEdgeDevicePatch, self).__init__(**kwargs) + self.tags = tags + self.identity = identity + self.edge_profile = edge_profile + + +class DataBoxEdgeMoveRequest(Model): + """Resource Move details. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_group: Required. Target resource group ARMId + :type target_resource_group: str + :param resources: Required. List of resources to be moved + :type resources: list[str] + """ + + _validation = { + 'target_resource_group': {'required': True}, + 'resources': {'required': True}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + } + + def __init__(self, *, target_resource_group: str, resources, **kwargs) -> None: + super(DataBoxEdgeMoveRequest, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources + + +class DataBoxEdgeSku(Model): + """The Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar name: The Sku name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EP2_64_1VPU_W', 'EP2_128_1T4_Mx1_W', 'EP2_256_2T4_W', + 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC', 'Management' + :vartype name: str or ~azure.mgmt.databoxedge.models.SkuName + :ivar kind: The Sku kind. + :vartype kind: str + :ivar tier: The Sku tier. Possible values include: 'Standard' + :vartype tier: str or ~azure.mgmt.databoxedge.models.SkuTier + :ivar size: The Sku kind. + :vartype size: str + :ivar family: The Sku family. + :vartype family: str + :ivar locations: Availability of the Sku for the region. + :vartype locations: list[str] + :ivar api_versions: The API versions in which Sku is available. + :vartype api_versions: list[str] + :ivar location_info: Availability of the Sku for the location/zone/site. + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar signup_option: Sku can be signed up by customer or not. Possible + values include: 'None', 'Available' + :vartype signup_option: str or + ~azure.mgmt.databoxedge.models.SkuSignupOption + :ivar version: Availability of the Sku as preview/stable. Possible values + include: 'Stable', 'Preview' + :vartype version: str or ~azure.mgmt.databoxedge.models.SkuVersion + :ivar availability: Links to the next set of results. Possible values + include: 'Available', 'Unavailable' + :vartype availability: str or + ~azure.mgmt.databoxedge.models.SkuAvailability + :ivar shipment_types: List of Shipment Types supported by this SKU + :vartype shipment_types: list[str or + ~azure.mgmt.databoxedge.models.ShipmentType] + :ivar capabilities: The capability info of the SKU. + :vartype capabilities: list[~azure.mgmt.databoxedge.models.SkuCapability] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'kind': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'locations': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'location_info': {'readonly': True}, + 'costs': {'readonly': True}, + 'signup_option': {'readonly': True}, + 'version': {'readonly': True}, + 'availability': {'readonly': True}, + 'shipment_types': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'signup_option': {'key': 'signupOption', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'availability': {'key': 'availability', 'type': 'str'}, + 'shipment_types': {'key': 'shipmentTypes', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SkuCapability]'}, + } + + def __init__(self, **kwargs) -> None: + super(DataBoxEdgeSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.kind = None + self.tier = None + self.size = None + self.family = None + self.locations = None + self.api_versions = None + self.location_info = None + self.costs = None + self.signup_option = None + self.version = None + self.availability = None + self.shipment_types = None + self.capabilities = None + + +class DCAccessCode(Model): + """DC Access code in the case of Self Managed Shipping. + + :param auth_code: DCAccess Code for the Self Managed shipment. + :type auth_code: str + """ + + _attribute_map = { + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, auth_code: str=None, **kwargs) -> None: + super(DCAccessCode, self).__init__(**kwargs) + self.auth_code = auth_code + + +class EdgeProfile(Model): + """Details about Edge Profile for the resource. + + :param subscription: Edge Profile Subscription + :type subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscription + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscription'}, + } + + def __init__(self, *, subscription=None, **kwargs) -> None: + super(EdgeProfile, self).__init__(**kwargs) + self.subscription = subscription + + +class EdgeProfilePatch(Model): + """The Data Box Edge/Gateway Edge Profile patch. + + :param subscription: The Data Box Edge/Gateway Edge Profile Subscription + patch + :type subscription: + ~azure.mgmt.databoxedge.models.EdgeProfileSubscriptionPatch + """ + + _attribute_map = { + 'subscription': {'key': 'subscription', 'type': 'EdgeProfileSubscriptionPatch'}, + } + + def __init__(self, *, subscription=None, **kwargs) -> None: + super(EdgeProfilePatch, self).__init__(**kwargs) + self.subscription = subscription + + +class EdgeProfileSubscription(Model): + """Subscription details for the Edge Profile. + + :param registration_id: Edge Subscription Registration ID + :type registration_id: str + :param id: ARM ID of the subscription + :type id: str + :param state: Possible values include: 'Registered', 'Warned', + 'Suspended', 'Deleted', 'Unregistered' + :type state: str or ~azure.mgmt.databoxedge.models.SubscriptionState + :param registration_date: + :type registration_date: str + :param subscription_id: + :type subscription_id: str + :param tenant_id: + :type tenant_id: str + :param location_placement_id: + :type location_placement_id: str + :param quota_id: + :type quota_id: str + :param serialized_details: + :type serialized_details: str + :param registered_features: + :type registered_features: + list[~azure.mgmt.databoxedge.models.SubscriptionRegisteredFeatures] + """ + + _attribute_map = { + 'registration_id': {'key': 'registrationId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'registration_date': {'key': 'registrationDate', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'location_placement_id': {'key': 'properties.locationPlacementId', 'type': 'str'}, + 'quota_id': {'key': 'properties.quotaId', 'type': 'str'}, + 'serialized_details': {'key': 'properties.serializedDetails', 'type': 'str'}, + 'registered_features': {'key': 'properties.registeredFeatures', 'type': '[SubscriptionRegisteredFeatures]'}, + } + + def __init__(self, *, registration_id: str=None, id: str=None, state=None, registration_date: str=None, subscription_id: str=None, tenant_id: str=None, location_placement_id: str=None, quota_id: str=None, serialized_details: str=None, registered_features=None, **kwargs) -> None: + super(EdgeProfileSubscription, self).__init__(**kwargs) + self.registration_id = registration_id + self.id = id + self.state = state + self.registration_date = registration_date + self.subscription_id = subscription_id + self.tenant_id = tenant_id + self.location_placement_id = location_placement_id + self.quota_id = quota_id + self.serialized_details = serialized_details + self.registered_features = registered_features + + +class EdgeProfileSubscriptionPatch(Model): + """The Data Box Edge/Gateway Edge Profile Subscription patch. + + :param id: The path ID that uniquely identifies the subscription of the + edge profile. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(EdgeProfileSubscriptionPatch, self).__init__(**kwargs) + self.id = id + + +class EtcdInfo(Model): + """Etcd configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Etcd type + :vartype type: str + :ivar version: Etcd version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(EtcdInfo, self).__init__(**kwargs) + self.type = None + self.version = None + + +class Trigger(ARMBaseModel): + """Trigger details. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FileEventTrigger, PeriodicTimerEventTrigger + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'FileEvent': 'FileEventTrigger', 'PeriodicTimerEvent': 'PeriodicTimerEventTrigger'} + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(Trigger, self).__init__(**kwargs) + self.system_data = system_data + self.kind = None + self.kind = 'Trigger' + + +class FileEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. File event source details. + :type source_info: ~azure.mgmt.databoxedge.models.FileSourceInfo + :param sink_info: Required. Role sink info. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'FileSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, *, source_info, sink_info, system_data=None, custom_context_tag: str=None, **kwargs) -> None: + super(FileEventTrigger, self).__init__(system_data=system_data, **kwargs) + self.source_info = source_info + self.sink_info = sink_info + self.custom_context_tag = custom_context_tag + self.kind = 'FileEvent' + + +class FileSourceInfo(Model): + """File source details. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. File share ID. + :type share_id: str + """ + + _validation = { + 'share_id': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + } + + def __init__(self, *, share_id: str, **kwargs) -> None: + super(FileSourceInfo, self).__init__(**kwargs) + self.share_id = share_id + + +class GenerateCertResponse(Model): + """Used in activation key generation flow. + + :param public_key: Gets or sets base64 encoded certificate raw data, + this is the public part needed to be uploaded to cert vault + :type public_key: str + :param private_key: Gets or sets base64 encoded private part of the + certificate, + needed to form the activation key + :type private_key: str + :param expiry_time_in_utc: Gets or sets expiry time in UTC + :type expiry_time_in_utc: str + """ + + _attribute_map = { + 'public_key': {'key': 'publicKey', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'expiry_time_in_utc': {'key': 'expiryTimeInUTC', 'type': 'str'}, + } + + def __init__(self, *, public_key: str=None, private_key: str=None, expiry_time_in_utc: str=None, **kwargs) -> None: + super(GenerateCertResponse, self).__init__(**kwargs) + self.public_key = public_key + self.private_key = private_key + self.expiry_time_in_utc = expiry_time_in_utc + + +class ImageRepositoryCredential(Model): + """Image repository credential. + + All required parameters must be populated in order to send to Azure. + + :param image_repository_url: Required. Image repository url (e.g.: + mcr.microsoft.com). + :type image_repository_url: str + :param user_name: Required. Repository user name. + :type user_name: str + :param password: Repository user password. + :type password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'image_repository_url': {'required': True}, + 'user_name': {'required': True}, + } + + _attribute_map = { + 'image_repository_url': {'key': 'imageRepositoryUrl', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, *, image_repository_url: str, user_name: str, password=None, **kwargs) -> None: + super(ImageRepositoryCredential, self).__init__(**kwargs) + self.image_repository_url = image_repository_url + self.user_name = user_name + self.password = password + + +class IoTAddon(Addon): + """IoT Addon. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Addon type + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param io_tdevice_details: Required. IoT device metadata to which + appliance needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + Addon needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :ivar version: Version of IoT running on the appliance. + :vartype version: str + :ivar host_platform: Host OS supported by the IoT addon. Possible values + include: 'Windows', 'Linux' + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.AddonState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'version': {'readonly': True}, + 'host_platform': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, io_tdevice_details, io_tedge_device_details, system_data=None, **kwargs) -> None: + super(IoTAddon, self).__init__(system_data=system_data, **kwargs) + self.io_tdevice_details = io_tdevice_details + self.io_tedge_device_details = io_tedge_device_details + self.version = None + self.host_platform = None + self.host_platform_type = None + self.provisioning_state = None + self.kind = 'IotEdge' + + +class IoTDeviceInfo(Model): + """Metadata of IoT device/IoT Edge device to be configured. + + All required parameters must be populated in order to send to Azure. + + :param device_id: Required. ID of the IoT device/edge device. + :type device_id: str + :param io_thost_hub: Required. Host name for the IoT hub associated to the + device. + :type io_thost_hub: str + :param io_thost_hub_id: Id for the IoT hub associated to the device. + :type io_thost_hub_id: str + :param authentication: Encrypted IoT device/IoT edge device connection + string. + :type authentication: ~azure.mgmt.databoxedge.models.Authentication + """ + + _validation = { + 'device_id': {'required': True}, + 'io_thost_hub': {'required': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'io_thost_hub': {'key': 'ioTHostHub', 'type': 'str'}, + 'io_thost_hub_id': {'key': 'ioTHostHubId', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'Authentication'}, + } + + def __init__(self, *, device_id: str, io_thost_hub: str, io_thost_hub_id: str=None, authentication=None, **kwargs) -> None: + super(IoTDeviceInfo, self).__init__(**kwargs) + self.device_id = device_id + self.io_thost_hub = io_thost_hub + self.io_thost_hub_id = io_thost_hub_id + self.authentication = authentication + + +class IoTEdgeAgentInfo(Model): + """IoT edge agent details is optional, this will be used for download system + Agent module while bootstrapping IoT Role if specified. + + All required parameters must be populated in order to send to Azure. + + :param image_name: Required. Name of the IoT edge agent image. + :type image_name: str + :param tag: Required. Image Tag. + :type tag: str + :param image_repository: Image repository details. + :type image_repository: + ~azure.mgmt.databoxedge.models.ImageRepositoryCredential + """ + + _validation = { + 'image_name': {'required': True}, + 'tag': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'image_repository': {'key': 'imageRepository', 'type': 'ImageRepositoryCredential'}, + } + + def __init__(self, *, image_name: str, tag: str, image_repository=None, **kwargs) -> None: + super(IoTEdgeAgentInfo, self).__init__(**kwargs) + self.image_name = image_name + self.tag = tag + self.image_repository = image_repository + + +class IoTRole(Role): + """Compute role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the IoT role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :param io_tdevice_details: Required. IoT device metadata to which data box + edge device needs to be connected. + :type io_tdevice_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param io_tedge_device_details: Required. IoT edge device to which the IoT + role needs to be configured. + :type io_tedge_device_details: + ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :param share_mappings: Mount points of shares in role(s). + :type share_mappings: list[~azure.mgmt.databoxedge.models.MountPointMap] + :param io_tedge_agent_info: Iot edge agent details to download the agent + and bootstrap iot runtime. + :type io_tedge_agent_info: ~azure.mgmt.databoxedge.models.IoTEdgeAgentInfo + :ivar host_platform_type: Platform where the Iot runtime is hosted. + Possible values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param compute_resource: Resource allocation + :type compute_resource: ~azure.mgmt.databoxedge.models.ComputeResource + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'io_tdevice_details': {'required': True}, + 'io_tedge_device_details': {'required': True}, + 'host_platform_type': {'readonly': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'io_tedge_agent_info': {'key': 'properties.ioTEdgeAgentInfo', 'type': 'IoTEdgeAgentInfo'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'compute_resource': {'key': 'properties.computeResource', 'type': 'ComputeResource'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, host_platform, io_tdevice_details, io_tedge_device_details, role_status, system_data=None, share_mappings=None, io_tedge_agent_info=None, compute_resource=None, **kwargs) -> None: + super(IoTRole, self).__init__(system_data=system_data, **kwargs) + self.host_platform = host_platform + self.io_tdevice_details = io_tdevice_details + self.io_tedge_device_details = io_tedge_device_details + self.share_mappings = share_mappings + self.io_tedge_agent_info = io_tedge_agent_info + self.host_platform_type = None + self.compute_resource = compute_resource + self.role_status = role_status + self.kind = 'IOT' + + +class Ipv4Config(Model): + """Details related to the IPv4 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv4 address of the network adapter. + :vartype ip_address: str + :ivar subnet: The IPv4 subnet of the network adapter. + :vartype subnet: str + :ivar gateway: The IPv4 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'subnet': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Ipv4Config, self).__init__(**kwargs) + self.ip_address = None + self.subnet = None + self.gateway = None + + +class Ipv6Config(Model): + """Details related to the IPv6 address configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IPv6 address of the network adapter. + :vartype ip_address: str + :ivar prefix_length: The IPv6 prefix of the network adapter. + :vartype prefix_length: int + :ivar gateway: The IPv6 gateway of the network adapter. + :vartype gateway: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + 'prefix_length': {'readonly': True}, + 'gateway': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, + 'gateway': {'key': 'gateway', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Ipv6Config, self).__init__(**kwargs) + self.ip_address = None + self.prefix_length = None + self.gateway = None + + +class Job(Model): + """A device job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The name of the object. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar status: The current status of the job. Possible values include: + 'Invalid', 'Running', 'Succeeded', 'Failed', 'Canceled', 'Paused', + 'Scheduled' + :vartype status: str or ~azure.mgmt.databoxedge.models.JobStatus + :ivar start_time: The UTC date and time at which the job started. + :vartype start_time: datetime + :ivar end_time: The UTC date and time at which the job completed. + :vartype end_time: datetime + :ivar percent_complete: The percentage of the job that is complete. + :vartype percent_complete: int + :ivar error: The error details. + :vartype error: ~azure.mgmt.databoxedge.models.JobErrorDetails + :ivar job_type: The type of the job. Possible values include: 'Invalid', + 'ScanForUpdates', 'DownloadUpdates', 'InstallUpdates', 'RefreshShare', + 'RefreshContainer', 'Backup', 'Restore', 'TriggerSupportPackage' + :vartype job_type: str or ~azure.mgmt.databoxedge.models.JobType + :ivar current_stage: Current stage of the update operation. Possible + values include: 'Unknown', 'Initial', 'ScanStarted', 'ScanComplete', + 'ScanFailed', 'DownloadStarted', 'DownloadComplete', 'DownloadFailed', + 'InstallStarted', 'InstallComplete', 'InstallFailed', 'RebootInitiated', + 'Success', 'Failure', 'RescanStarted', 'RescanComplete', 'RescanFailed' + :vartype current_stage: str or + ~azure.mgmt.databoxedge.models.UpdateOperationStage + :ivar download_progress: The download progress. + :vartype download_progress: + ~azure.mgmt.databoxedge.models.UpdateDownloadProgress + :ivar install_progress: The install progress. + :vartype install_progress: + ~azure.mgmt.databoxedge.models.UpdateInstallProgress + :ivar total_refresh_errors: Total number of errors encountered during the + refresh process. + :vartype total_refresh_errors: int + :ivar error_manifest_file: Local share/remote container relative path to + the error manifest file of the refresh. + :vartype error_manifest_file: str + :ivar refreshed_entity_id: ARM ID of the entity that was refreshed. + :vartype refreshed_entity_id: str + :param folder: If only subfolders need to be refreshed, then the subfolder + path inside the share or container. (The path is empty if there are no + subfolders.) + :type folder: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'error': {'readonly': True}, + 'job_type': {'readonly': True}, + 'current_stage': {'readonly': True}, + 'download_progress': {'readonly': True}, + 'install_progress': {'readonly': True}, + 'total_refresh_errors': {'readonly': True}, + 'error_manifest_file': {'readonly': True}, + 'refreshed_entity_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'error': {'key': 'error', 'type': 'JobErrorDetails'}, + 'job_type': {'key': 'properties.jobType', 'type': 'str'}, + 'current_stage': {'key': 'properties.currentStage', 'type': 'str'}, + 'download_progress': {'key': 'properties.downloadProgress', 'type': 'UpdateDownloadProgress'}, + 'install_progress': {'key': 'properties.installProgress', 'type': 'UpdateInstallProgress'}, + 'total_refresh_errors': {'key': 'properties.totalRefreshErrors', 'type': 'int'}, + 'error_manifest_file': {'key': 'properties.errorManifestFile', 'type': 'str'}, + 'refreshed_entity_id': {'key': 'properties.refreshedEntityId', 'type': 'str'}, + 'folder': {'key': 'properties.folder', 'type': 'str'}, + } + + def __init__(self, *, folder: str=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.status = None + self.start_time = None + self.end_time = None + self.percent_complete = None + self.error = None + self.job_type = None + self.current_stage = None + self.download_progress = None + self.install_progress = None + self.total_refresh_errors = None + self.error_manifest_file = None + self.refreshed_entity_id = None + self.folder = folder + + +class JobErrorDetails(Model): + """The job error information containing the list of job errors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_details: The error details. + :vartype error_details: list[~azure.mgmt.databoxedge.models.JobErrorItem] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'error_details': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'error_details': {'key': 'errorDetails', 'type': '[JobErrorItem]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobErrorDetails, self).__init__(**kwargs) + self.error_details = None + self.code = None + self.message = None + + +class JobErrorItem(Model): + """The job error items. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendations: The recommended actions. + :vartype recommendations: list[str] + :ivar code: The code intended for programmatic access. + :vartype code: str + :ivar message: The message that describes the error in detail. + :vartype message: str + """ + + _validation = { + 'recommendations': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobErrorItem, self).__init__(**kwargs) + self.recommendations = None + self.code = None + self.message = None + + +class KubernetesClusterInfo(Model): + """Kubernetes cluster configuration. + + Variables are only 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 etcd_info: Etcd configuration + :vartype etcd_info: ~azure.mgmt.databoxedge.models.EtcdInfo + :ivar nodes: Kubernetes cluster nodes + :vartype nodes: list[~azure.mgmt.databoxedge.models.NodeInfo] + :param version: Required. Kubernetes cluster version + :type version: str + """ + + _validation = { + 'etcd_info': {'readonly': True}, + 'nodes': {'readonly': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'etcd_info': {'key': 'etcdInfo', 'type': 'EtcdInfo'}, + 'nodes': {'key': 'nodes', 'type': '[NodeInfo]'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, version: str, **kwargs) -> None: + super(KubernetesClusterInfo, self).__init__(**kwargs) + self.etcd_info = None + self.nodes = None + self.version = version + + +class KubernetesIPConfiguration(Model): + """Kubernetes node IP configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar port: Port of the Kubernetes node. + :vartype port: str + :param ip_address: IP address of the Kubernetes node. + :type ip_address: str + """ + + _validation = { + 'port': {'readonly': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str=None, **kwargs) -> None: + super(KubernetesIPConfiguration, self).__init__(**kwargs) + self.port = None + self.ip_address = ip_address + + +class KubernetesRole(Role): + """Kubernetes role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param host_platform: Required. Host OS supported by the Kubernetes role. + Possible values include: 'Windows', 'Linux' + :type host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar provisioning_state: State of Kubernetes deployment. Possible values + include: 'Invalid', 'Creating', 'Created', 'Updating', 'Reconfiguring', + 'Failed', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.databoxedge.models.KubernetesState + :ivar host_platform_type: Platform where the runtime is hosted. Possible + values include: 'KubernetesCluster', 'LinuxVM' + :vartype host_platform_type: str or + ~azure.mgmt.databoxedge.models.HostPlatformType + :param kubernetes_cluster_info: Required. Kubernetes cluster configuration + :type kubernetes_cluster_info: + ~azure.mgmt.databoxedge.models.KubernetesClusterInfo + :param kubernetes_role_resources: Required. Kubernetes role resources + :type kubernetes_role_resources: + ~azure.mgmt.databoxedge.models.KubernetesRoleResources + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'host_platform': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'host_platform_type': {'readonly': True}, + 'kubernetes_cluster_info': {'required': True}, + 'kubernetes_role_resources': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'host_platform_type': {'key': 'properties.hostPlatformType', 'type': 'str'}, + 'kubernetes_cluster_info': {'key': 'properties.kubernetesClusterInfo', 'type': 'KubernetesClusterInfo'}, + 'kubernetes_role_resources': {'key': 'properties.kubernetesRoleResources', 'type': 'KubernetesRoleResources'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, host_platform, kubernetes_cluster_info, kubernetes_role_resources, role_status, system_data=None, **kwargs) -> None: + super(KubernetesRole, self).__init__(system_data=system_data, **kwargs) + self.host_platform = host_platform + self.provisioning_state = None + self.host_platform_type = None + self.kubernetes_cluster_info = kubernetes_cluster_info + self.kubernetes_role_resources = kubernetes_role_resources + self.role_status = role_status + self.kind = 'Kubernetes' + + +class KubernetesRoleCompute(Model): + """Kubernetes role compute 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 vm_profile: Required. VM profile + :type vm_profile: str + :ivar memory_in_bytes: Memory in bytes + :vartype memory_in_bytes: long + :ivar processor_count: Processor count + :vartype processor_count: int + """ + + _validation = { + 'vm_profile': {'required': True}, + 'memory_in_bytes': {'readonly': True}, + 'processor_count': {'readonly': True}, + } + + _attribute_map = { + 'vm_profile': {'key': 'vmProfile', 'type': 'str'}, + 'memory_in_bytes': {'key': 'memoryInBytes', 'type': 'long'}, + 'processor_count': {'key': 'processorCount', 'type': 'int'}, + } + + def __init__(self, *, vm_profile: str, **kwargs) -> None: + super(KubernetesRoleCompute, self).__init__(**kwargs) + self.vm_profile = vm_profile + self.memory_in_bytes = None + self.processor_count = None + + +class KubernetesRoleNetwork(Model): + """Kubernetes role network resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar cni_config: Cni configuration + :vartype cni_config: ~azure.mgmt.databoxedge.models.CniConfig + :ivar load_balancer_config: Load balancer configuration + :vartype load_balancer_config: + ~azure.mgmt.databoxedge.models.LoadBalancerConfig + """ + + _validation = { + 'cni_config': {'readonly': True}, + 'load_balancer_config': {'readonly': True}, + } + + _attribute_map = { + 'cni_config': {'key': 'cniConfig', 'type': 'CniConfig'}, + 'load_balancer_config': {'key': 'loadBalancerConfig', 'type': 'LoadBalancerConfig'}, + } + + def __init__(self, **kwargs) -> None: + super(KubernetesRoleNetwork, self).__init__(**kwargs) + self.cni_config = None + self.load_balancer_config = None + + +class KubernetesRoleResources(Model): + """Kubernetes role resources. + + Variables are only 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 storage: Kubernetes role storage resource + :type storage: ~azure.mgmt.databoxedge.models.KubernetesRoleStorage + :param compute: Required. Kubernetes role compute resource + :type compute: ~azure.mgmt.databoxedge.models.KubernetesRoleCompute + :ivar network: Kubernetes role network resource + :vartype network: ~azure.mgmt.databoxedge.models.KubernetesRoleNetwork + """ + + _validation = { + 'compute': {'required': True}, + 'network': {'readonly': True}, + } + + _attribute_map = { + 'storage': {'key': 'storage', 'type': 'KubernetesRoleStorage'}, + 'compute': {'key': 'compute', 'type': 'KubernetesRoleCompute'}, + 'network': {'key': 'network', 'type': 'KubernetesRoleNetwork'}, + } + + def __init__(self, *, compute, storage=None, **kwargs) -> None: + super(KubernetesRoleResources, self).__init__(**kwargs) + self.storage = storage + self.compute = compute + self.network = None + + +class KubernetesRoleStorage(Model): + """Kubernetes role storage resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar storage_classes: Kubernetes storage class info. + :vartype storage_classes: + list[~azure.mgmt.databoxedge.models.KubernetesRoleStorageClassInfo] + :param endpoints: Mount points of shares in role(s). + :type endpoints: list[~azure.mgmt.databoxedge.models.MountPointMap] + """ + + _validation = { + 'storage_classes': {'readonly': True}, + } + + _attribute_map = { + 'storage_classes': {'key': 'storageClasses', 'type': '[KubernetesRoleStorageClassInfo]'}, + 'endpoints': {'key': 'endpoints', 'type': '[MountPointMap]'}, + } + + def __init__(self, *, endpoints=None, **kwargs) -> None: + super(KubernetesRoleStorage, self).__init__(**kwargs) + self.storage_classes = None + self.endpoints = endpoints + + +class KubernetesRoleStorageClassInfo(Model): + """Kubernetes storage class info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Storage class name. + :vartype name: str + :ivar type: Storage class type. + :vartype type: str + :ivar posix_compliant: If provisioned storage is posix compliant. Possible + values include: 'Invalid', 'Enabled', 'Disabled' + :vartype posix_compliant: str or + ~azure.mgmt.databoxedge.models.PosixComplianceStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'posix_compliant': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'posix_compliant': {'key': 'posixCompliant', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KubernetesRoleStorageClassInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.posix_compliant = None + + +class LoadBalancerConfig(Model): + """Load balancer configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Load balancer type + :vartype type: str + :ivar version: Load balancer version + :vartype version: str + """ + + _validation = { + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LoadBalancerConfig, self).__init__(**kwargs) + self.type = None + self.version = None + + +class MECRole(Role): + """MEC role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Role configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param connection_string: Activation key of the MEC. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param controller_endpoint: Controller Endpoint. + :type controller_endpoint: str + :param resource_unique_id: Unique Id of the Resource. + :type resource_unique_id: str + :param role_status: Required. Role status. Possible values include: + 'Enabled', 'Disabled' + :type role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'role_status': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'AsymmetricEncryptedSecret'}, + 'controller_endpoint': {'key': 'properties.controllerEndpoint', 'type': 'str'}, + 'resource_unique_id': {'key': 'properties.resourceUniqueId', 'type': 'str'}, + 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + } + + def __init__(self, *, role_status, system_data=None, connection_string=None, controller_endpoint: str=None, resource_unique_id: str=None, **kwargs) -> None: + super(MECRole, self).__init__(system_data=system_data, **kwargs) + self.connection_string = connection_string + self.controller_endpoint = controller_endpoint + self.resource_unique_id = resource_unique_id + self.role_status = role_status + self.kind = 'MEC' + + +class MetricConfiguration(Model): + """Metric configuration. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The Resource ID on which the metrics should + be pushed. + :type resource_id: str + :param mdm_account: The MDM account to which the counters should be + pushed. + :type mdm_account: str + :param metric_name_space: The MDM namespace to which the counters should + be pushed. This is required if MDMAccount is specified + :type metric_name_space: str + :param counter_sets: Required. Host name for the IoT hub associated to the + device. + :type counter_sets: list[~azure.mgmt.databoxedge.models.MetricCounterSet] + """ + + _validation = { + 'resource_id': {'required': True}, + 'counter_sets': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'mdm_account': {'key': 'mdmAccount', 'type': 'str'}, + 'metric_name_space': {'key': 'metricNameSpace', 'type': 'str'}, + 'counter_sets': {'key': 'counterSets', 'type': '[MetricCounterSet]'}, + } + + def __init__(self, *, resource_id: str, counter_sets, mdm_account: str=None, metric_name_space: str=None, **kwargs) -> None: + super(MetricConfiguration, self).__init__(**kwargs) + self.resource_id = resource_id + self.mdm_account = mdm_account + self.metric_name_space = metric_name_space + self.counter_sets = counter_sets + + +class MetricCounter(Model): + """The metric counter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The counter name. + :type name: str + :param instance: The instance from which counter should be collected. + :type instance: str + :param dimension_filter: The dimension filter. + :type dimension_filter: + list[~azure.mgmt.databoxedge.models.MetricDimension] + :param additional_dimensions: The additional dimensions to be added to + metric. + :type additional_dimensions: + list[~azure.mgmt.databoxedge.models.MetricDimension] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'str'}, + 'dimension_filter': {'key': 'dimensionFilter', 'type': '[MetricDimension]'}, + 'additional_dimensions': {'key': 'additionalDimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, *, name: str, instance: str=None, dimension_filter=None, additional_dimensions=None, **kwargs) -> None: + super(MetricCounter, self).__init__(**kwargs) + self.name = name + self.instance = instance + self.dimension_filter = dimension_filter + self.additional_dimensions = additional_dimensions + + +class MetricCounterSet(Model): + """The metric counter set. + + All required parameters must be populated in order to send to Azure. + + :param counters: Required. The counters that should be collected in this + set. + :type counters: list[~azure.mgmt.databoxedge.models.MetricCounter] + """ + + _validation = { + 'counters': {'required': True}, + } + + _attribute_map = { + 'counters': {'key': 'counters', 'type': '[MetricCounter]'}, + } + + def __init__(self, *, counters, **kwargs) -> None: + super(MetricCounterSet, self).__init__(**kwargs) + self.counters = counters + + +class MetricDimension(Model): + """The metric dimension. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. The dimension type. + :type source_type: str + :param source_name: Required. The dimension value. + :type source_name: str + """ + + _validation = { + 'source_type': {'required': True}, + 'source_name': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'source_name': {'key': 'sourceName', 'type': 'str'}, + } + + def __init__(self, *, source_type: str, source_name: str, **kwargs) -> None: + super(MetricDimension, self).__init__(**kwargs) + self.source_type = source_type + self.source_name = source_name + + +class MetricDimensionV1(Model): + """Metric Dimension v1. + + :param name: Name of the metrics dimension. + :type name: str + :param display_name: Display name of the metrics dimension. + :type display_name: str + :param to_be_exported_for_shoebox: To be exported to shoe box. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + super(MetricDimensionV1, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class MetricSpecificationV1(Model): + """Metric specification version 1. + + :param name: Name of the metric. + :type name: str + :param display_name: Display name of the metric. + :type display_name: str + :param display_description: Description of the metric to be displayed. + :type display_description: str + :param unit: Metric units. Possible values include: 'NotSpecified', + 'Percent', 'Count', 'Seconds', 'Milliseconds', 'Bytes', 'BytesPerSecond', + 'CountPerSecond' + :type unit: str or ~azure.mgmt.databoxedge.models.MetricUnit + :param aggregation_type: Metric aggregation type. Possible values include: + 'NotSpecified', 'None', 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + :type aggregation_type: str or + ~azure.mgmt.databoxedge.models.MetricAggregationType + :param dimensions: Metric dimensions, other than default dimension which + is resource. + :type dimensions: list[~azure.mgmt.databoxedge.models.MetricDimensionV1] + :param fill_gap_with_zero: Set true to fill the gaps with zero. + :type fill_gap_with_zero: bool + :param category: Metric category. Possible values include: 'Capacity', + 'Transaction' + :type category: str or ~azure.mgmt.databoxedge.models.MetricCategory + :param resource_id_dimension_name_override: Resource name override. + :type resource_id_dimension_name_override: str + :param supported_time_grain_types: Support granularity of metrics. + :type supported_time_grain_types: list[str or + ~azure.mgmt.databoxedge.models.TimeGrain] + :param supported_aggregation_types: Support metric aggregation type. + :type supported_aggregation_types: list[str or + ~azure.mgmt.databoxedge.models.MetricAggregationType] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimensionV1]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit=None, aggregation_type=None, dimensions=None, fill_gap_with_zero: bool=None, category=None, resource_id_dimension_name_override: str=None, supported_time_grain_types=None, supported_aggregation_types=None, **kwargs) -> None: + super(MetricSpecificationV1, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.dimensions = dimensions + self.fill_gap_with_zero = fill_gap_with_zero + self.category = category + self.resource_id_dimension_name_override = resource_id_dimension_name_override + self.supported_time_grain_types = supported_time_grain_types + self.supported_aggregation_types = supported_aggregation_types + + +class MonitoringMetricConfiguration(ARMBaseModel): + """The metric setting details for the role. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: MonitoringConfiguration on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param metric_configurations: Required. The metrics configuration details + :type metric_configurations: + list[~azure.mgmt.databoxedge.models.MetricConfiguration] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_configurations': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'metric_configurations': {'key': 'properties.metricConfigurations', 'type': '[MetricConfiguration]'}, + } + + def __init__(self, *, metric_configurations, system_data=None, **kwargs) -> None: + super(MonitoringMetricConfiguration, self).__init__(**kwargs) + self.system_data = system_data + self.metric_configurations = metric_configurations + + +class MountPointMap(Model): + """The share mount point. + + Variables are only 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 share_id: Required. ID of the share mounted to the role VM. + :type share_id: str + :ivar role_id: ID of the role to which share is mounted. + :vartype role_id: str + :ivar mount_point: Mount point for the share. + :vartype mount_point: str + :ivar mount_type: Mounting type. Possible values include: 'Volume', + 'HostPath' + :vartype mount_type: str or ~azure.mgmt.databoxedge.models.MountType + :ivar role_type: Role type. Possible values include: 'IOT', 'ASA', + 'Functions', 'Cognitive', 'MEC', 'CloudEdgeManagement', 'Kubernetes' + :vartype role_type: str or ~azure.mgmt.databoxedge.models.RoleTypes + """ + + _validation = { + 'share_id': {'required': True}, + 'role_id': {'readonly': True}, + 'mount_point': {'readonly': True}, + 'mount_type': {'readonly': True}, + 'role_type': {'readonly': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'role_id': {'key': 'roleId', 'type': 'str'}, + 'mount_point': {'key': 'mountPoint', 'type': 'str'}, + 'mount_type': {'key': 'mountType', 'type': 'str'}, + 'role_type': {'key': 'roleType', 'type': 'str'}, + } + + def __init__(self, *, share_id: str, **kwargs) -> None: + super(MountPointMap, self).__init__(**kwargs) + self.share_id = share_id + self.role_id = None + self.mount_point = None + self.mount_type = None + self.role_type = None + + +class NetworkAdapter(Model): + """Represents the networkAdapter on a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar adapter_id: Instance ID of network adapter. + :vartype adapter_id: str + :ivar adapter_position: Hardware position of network adapter. + :vartype adapter_position: + ~azure.mgmt.databoxedge.models.NetworkAdapterPosition + :ivar index: Logical index of the adapter. + :vartype index: int + :ivar node_id: Node ID of the network adapter. + :vartype node_id: str + :ivar network_adapter_name: Network adapter name. + :vartype network_adapter_name: str + :ivar label: Hardware label for the adapter. + :vartype label: str + :ivar mac_address: MAC address. + :vartype mac_address: str + :ivar link_speed: Link speed. + :vartype link_speed: long + :ivar status: Value indicating whether this adapter is valid. Possible + values include: 'Inactive', 'Active' + :vartype status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterStatus + :param rdma_status: Value indicating whether this adapter is RDMA capable. + Possible values include: 'Incapable', 'Capable' + :type rdma_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterRDMAStatus + :param dhcp_status: Value indicating whether this adapter has DHCP + enabled. Possible values include: 'Disabled', 'Enabled' + :type dhcp_status: str or + ~azure.mgmt.databoxedge.models.NetworkAdapterDHCPStatus + :ivar ipv4_configuration: The IPv4 configuration of the network adapter. + :vartype ipv4_configuration: ~azure.mgmt.databoxedge.models.Ipv4Config + :ivar ipv6_configuration: The IPv6 configuration of the network adapter. + :vartype ipv6_configuration: ~azure.mgmt.databoxedge.models.Ipv6Config + :ivar ipv6_link_local_address: The IPv6 local address. + :vartype ipv6_link_local_address: str + :ivar dns_servers: The list of DNS Servers of the device. + :vartype dns_servers: list[str] + """ + + _validation = { + 'adapter_id': {'readonly': True}, + 'adapter_position': {'readonly': True}, + 'index': {'readonly': True}, + 'node_id': {'readonly': True}, + 'network_adapter_name': {'readonly': True}, + 'label': {'readonly': True}, + 'mac_address': {'readonly': True}, + 'link_speed': {'readonly': True}, + 'status': {'readonly': True}, + 'ipv4_configuration': {'readonly': True}, + 'ipv6_configuration': {'readonly': True}, + 'ipv6_link_local_address': {'readonly': True}, + 'dns_servers': {'readonly': True}, + } + + _attribute_map = { + 'adapter_id': {'key': 'adapterId', 'type': 'str'}, + 'adapter_position': {'key': 'adapterPosition', 'type': 'NetworkAdapterPosition'}, + 'index': {'key': 'index', 'type': 'int'}, + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'network_adapter_name': {'key': 'networkAdapterName', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + 'link_speed': {'key': 'linkSpeed', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'rdma_status': {'key': 'rdmaStatus', 'type': 'str'}, + 'dhcp_status': {'key': 'dhcpStatus', 'type': 'str'}, + 'ipv4_configuration': {'key': 'ipv4Configuration', 'type': 'Ipv4Config'}, + 'ipv6_configuration': {'key': 'ipv6Configuration', 'type': 'Ipv6Config'}, + 'ipv6_link_local_address': {'key': 'ipv6LinkLocalAddress', 'type': 'str'}, + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__(self, *, rdma_status=None, dhcp_status=None, **kwargs) -> None: + super(NetworkAdapter, self).__init__(**kwargs) + self.adapter_id = None + self.adapter_position = None + self.index = None + self.node_id = None + self.network_adapter_name = None + self.label = None + self.mac_address = None + self.link_speed = None + self.status = None + self.rdma_status = rdma_status + self.dhcp_status = dhcp_status + self.ipv4_configuration = None + self.ipv6_configuration = None + self.ipv6_link_local_address = None + self.dns_servers = None + + +class NetworkAdapterPosition(Model): + """The network adapter position. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar network_group: The network group. Possible values include: 'None', + 'NonRDMA', 'RDMA' + :vartype network_group: str or ~azure.mgmt.databoxedge.models.NetworkGroup + :ivar port: The port. + :vartype port: int + """ + + _validation = { + 'network_group': {'readonly': True}, + 'port': {'readonly': True}, + } + + _attribute_map = { + 'network_group': {'key': 'networkGroup', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(NetworkAdapterPosition, self).__init__(**kwargs) + self.network_group = None + self.port = None + + +class NetworkSettings(ARMBaseModel): + """The network settings of a device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: NetworkSettings on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar network_adapters: The network adapter list on the device. + :vartype network_adapters: + list[~azure.mgmt.databoxedge.models.NetworkAdapter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'network_adapters': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'network_adapters': {'key': 'properties.networkAdapters', 'type': '[NetworkAdapter]'}, + } + + def __init__(self, *, system_data=None, **kwargs) -> None: + super(NetworkSettings, self).__init__(**kwargs) + self.system_data = system_data + self.network_adapters = None + + +class Node(ARMBaseModel): + """Represents a single node in a Data box Edge/Gateway device + Gateway devices, standalone Edge devices and a single node cluster Edge + device will all have 1 node + Multi-node Edge devices will have more than 1 nodes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :ivar node_status: The current status of the individual node. Possible + values include: 'Unknown', 'Up', 'Down', 'Rebooting', 'ShuttingDown' + :vartype node_status: str or ~azure.mgmt.databoxedge.models.NodeStatus + :ivar node_chassis_serial_number: Serial number of the Chassis + :vartype node_chassis_serial_number: str + :ivar node_serial_number: Serial number of the individual node + :vartype node_serial_number: str + :ivar node_display_name: Display Name of the individual node + :vartype node_display_name: str + :ivar node_friendly_software_version: Friendly software version name that + is currently installed on the node + :vartype node_friendly_software_version: str + :ivar node_hcs_version: HCS version that is currently installed on the + node + :vartype node_hcs_version: str + :ivar node_instance_id: Guid instance id of the node + :vartype node_instance_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'node_status': {'readonly': True}, + 'node_chassis_serial_number': {'readonly': True}, + 'node_serial_number': {'readonly': True}, + 'node_display_name': {'readonly': True}, + 'node_friendly_software_version': {'readonly': True}, + 'node_hcs_version': {'readonly': True}, + 'node_instance_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'node_status': {'key': 'properties.nodeStatus', 'type': 'str'}, + 'node_chassis_serial_number': {'key': 'properties.nodeChassisSerialNumber', 'type': 'str'}, + 'node_serial_number': {'key': 'properties.nodeSerialNumber', 'type': 'str'}, + 'node_display_name': {'key': 'properties.nodeDisplayName', 'type': 'str'}, + 'node_friendly_software_version': {'key': 'properties.nodeFriendlySoftwareVersion', 'type': 'str'}, + 'node_hcs_version': {'key': 'properties.nodeHcsVersion', 'type': 'str'}, + 'node_instance_id': {'key': 'properties.nodeInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Node, self).__init__(**kwargs) + self.node_status = None + self.node_chassis_serial_number = None + self.node_serial_number = None + self.node_display_name = None + self.node_friendly_software_version = None + self.node_hcs_version = None + self.node_instance_id = None + + +class NodeInfo(Model): + """Kubernetes node info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Node name. + :vartype name: str + :ivar type: Node type - Master/Worker. Possible values include: 'Invalid', + 'Master', 'Worker' + :vartype type: str or ~azure.mgmt.databoxedge.models.KubernetesNodeType + :param ip_configuration: IP Configuration of the Kubernetes node. + :type ip_configuration: + list[~azure.mgmt.databoxedge.models.KubernetesIPConfiguration] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_configuration': {'key': 'ipConfiguration', 'type': '[KubernetesIPConfiguration]'}, + } + + def __init__(self, *, ip_configuration=None, **kwargs) -> None: + super(NodeInfo, self).__init__(**kwargs) + self.name = None + self.type = None + self.ip_configuration = ip_configuration + + +class Operation(Model): + """Operations. + + :param name: Name of the operation. + :type name: str + :param display: Properties displayed for the operation. + :type display: ~azure.mgmt.databoxedge.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param is_data_action: Indicates whether the operation is a data action + :type is_data_action: bool + :param service_specification: Service specification. + :type service_specification: + ~azure.mgmt.databoxedge.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, is_data_action: bool=None, service_specification=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.is_data_action = is_data_action + self.service_specification = service_specification + + +class OperationDisplay(Model): + """Operation display properties. + + :param provider: Provider name. + :type provider: str + :param resource: The type of resource in which the operation is performed. + :type resource: str + :param operation: Operation to be performed on the resource. + :type operation: str + :param description: Description of the operation to be performed. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Order(ARMBaseModel): + """The order details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Order configured on ASE resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param contact_information: Required. The contact details. + :type contact_information: ~azure.mgmt.databoxedge.models.ContactDetails + :param shipping_address: The shipping address. + :type shipping_address: ~azure.mgmt.databoxedge.models.Address + :ivar current_status: Current status of the order. + :vartype current_status: ~azure.mgmt.databoxedge.models.OrderStatus + :ivar order_history: List of status changes in the order. + :vartype order_history: list[~azure.mgmt.databoxedge.models.OrderStatus] + :ivar serial_number: Serial number of the device. + :vartype serial_number: str + :ivar delivery_tracking_info: Tracking information for the package + delivered to the customer whether it has an original or a replacement + device. + :vartype delivery_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :ivar return_tracking_info: Tracking information for the package returned + from the customer whether it has an original or a replacement device. + :vartype return_tracking_info: + list[~azure.mgmt.databoxedge.models.TrackingInfo] + :param shipment_type: ShipmentType of the order. Possible values include: + 'NotApplicable', 'ShippedToCustomer', 'SelfPickup' + :type shipment_type: str or ~azure.mgmt.databoxedge.models.ShipmentType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_information': {'required': True}, + 'current_status': {'readonly': True}, + 'order_history': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'delivery_tracking_info': {'readonly': True}, + 'return_tracking_info': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'contact_information': {'key': 'properties.contactInformation', 'type': 'ContactDetails'}, + 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'Address'}, + 'current_status': {'key': 'properties.currentStatus', 'type': 'OrderStatus'}, + 'order_history': {'key': 'properties.orderHistory', 'type': '[OrderStatus]'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'delivery_tracking_info': {'key': 'properties.deliveryTrackingInfo', 'type': '[TrackingInfo]'}, + 'return_tracking_info': {'key': 'properties.returnTrackingInfo', 'type': '[TrackingInfo]'}, + 'shipment_type': {'key': 'properties.shipmentType', 'type': 'str'}, + } + + def __init__(self, *, contact_information, system_data=None, shipping_address=None, shipment_type=None, **kwargs) -> None: + super(Order, self).__init__(**kwargs) + self.system_data = system_data + self.contact_information = contact_information + self.shipping_address = shipping_address + self.current_status = None + self.order_history = None + self.serial_number = None + self.delivery_tracking_info = None + self.return_tracking_info = None + self.shipment_type = shipment_type + + +class OrderStatus(Model): + """Represents a single status change. + + Variables are only 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 status: Required. Status of the order as per the allowed status + types. Possible values include: 'Untracked', 'AwaitingFulfillment', + 'AwaitingPreparation', 'AwaitingShipment', 'Shipped', 'Arriving', + 'Delivered', 'ReplacementRequested', 'LostDevice', 'Declined', + 'ReturnInitiated', 'AwaitingReturnShipment', 'ShippedBack', + 'CollectedAtMicrosoft', 'AwaitingPickup', 'PickupCompleted', + 'AwaitingDrop' + :type status: str or ~azure.mgmt.databoxedge.models.OrderState + :ivar update_date_time: Time of status update. + :vartype update_date_time: datetime + :param comments: Comments related to this status change. + :type comments: str + :ivar tracking_information: Tracking information related to the state in + the ordering flow + :vartype tracking_information: ~azure.mgmt.databoxedge.models.TrackingInfo + :ivar additional_order_details: Dictionary to hold generic information + which is not stored + by the already existing properties + :vartype additional_order_details: dict[str, str] + """ + + _validation = { + 'status': {'required': True}, + 'update_date_time': {'readonly': True}, + 'tracking_information': {'readonly': True}, + 'additional_order_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'update_date_time': {'key': 'updateDateTime', 'type': 'iso-8601'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'tracking_information': {'key': 'trackingInformation', 'type': 'TrackingInfo'}, + 'additional_order_details': {'key': 'additionalOrderDetails', 'type': '{str}'}, + } + + def __init__(self, *, status, comments: str=None, **kwargs) -> None: + super(OrderStatus, self).__init__(**kwargs) + self.status = status + self.update_date_time = None + self.comments = comments + self.tracking_information = None + self.additional_order_details = None + + +class PeriodicTimerEventTrigger(Trigger): + """Trigger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Trigger in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param kind: Required. Constant filled by server. + :type kind: str + :param source_info: Required. Periodic timer details. + :type source_info: ~azure.mgmt.databoxedge.models.PeriodicTimerSourceInfo + :param sink_info: Required. Role Sink information. + :type sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :param custom_context_tag: A custom context tag typically used to + correlate the trigger against its usage. For example, if a periodic timer + trigger is intended for certain specific IoT modules in the device, the + tag can be the name or the image URL of the module. + :type custom_context_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'source_info': {'required': True}, + 'sink_info': {'required': True}, + 'custom_context_tag': {'max_length': 192}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'source_info': {'key': 'properties.sourceInfo', 'type': 'PeriodicTimerSourceInfo'}, + 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, + 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + } + + def __init__(self, *, source_info, sink_info, system_data=None, custom_context_tag: str=None, **kwargs) -> None: + super(PeriodicTimerEventTrigger, self).__init__(system_data=system_data, **kwargs) + self.source_info = source_info + self.sink_info = sink_info + self.custom_context_tag = custom_context_tag + self.kind = 'PeriodicTimerEvent' + + +class PeriodicTimerSourceInfo(Model): + """Periodic timer event source. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. The time of the day that results in a valid + trigger. Schedule is computed with reference to the time specified upto + seconds. If timezone is not specified the time will considered to be in + device timezone. The value will always be returned as UTC time. + :type start_time: datetime + :param schedule: Required. Periodic frequency at which timer event needs + to be raised. Supports daily, hourly, minutes, and seconds. + :type schedule: str + :param topic: Topic where periodic events are published to IoT device. + :type topic: str + """ + + _validation = { + 'start_time': {'required': True}, + 'schedule': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'schedule': {'key': 'schedule', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + } + + def __init__(self, *, start_time, schedule: str, topic: str=None, **kwargs) -> None: + super(PeriodicTimerSourceInfo, self).__init__(**kwargs) + self.start_time = start_time + self.schedule = schedule + self.topic = topic + + +class RefreshDetails(Model): + """Fields for tracking refresh job on the share or container. + + :param in_progress_refresh_job_id: If a refresh job is currently in + progress on this share or container, this field indicates the ARM resource + ID of that job. The field is empty if no job is in progress. + :type in_progress_refresh_job_id: str + :param last_completed_refresh_job_time_in_utc: Indicates the completed + time for the last refresh job on this particular share or container, if + any.This could be a failed job or a successful job. + :type last_completed_refresh_job_time_in_utc: datetime + :param error_manifest_file: Indicates the relative path of the error xml + for the last refresh job on this particular share or container, if any. + This could be a failed job or a successful job. + :type error_manifest_file: str + :param last_job: Indicates the id of the last refresh job on this + particular share or container,if any. This could be a failed job or a + successful job. + :type last_job: str + """ + + _attribute_map = { + 'in_progress_refresh_job_id': {'key': 'inProgressRefreshJobId', 'type': 'str'}, + 'last_completed_refresh_job_time_in_utc': {'key': 'lastCompletedRefreshJobTimeInUTC', 'type': 'iso-8601'}, + 'error_manifest_file': {'key': 'errorManifestFile', 'type': 'str'}, + 'last_job': {'key': 'lastJob', 'type': 'str'}, + } + + def __init__(self, *, in_progress_refresh_job_id: str=None, last_completed_refresh_job_time_in_utc=None, error_manifest_file: str=None, last_job: str=None, **kwargs) -> None: + super(RefreshDetails, self).__init__(**kwargs) + self.in_progress_refresh_job_id = in_progress_refresh_job_id + self.last_completed_refresh_job_time_in_utc = last_completed_refresh_job_time_in_utc + self.error_manifest_file = error_manifest_file + self.last_job = last_job + + +class ResourceIdentity(Model): + """Msi identity details of the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: Identity type. Possible values include: 'None', + 'SystemAssigned', 'UserAssigned' + :type type: str or ~azure.mgmt.databoxedge.models.MsiIdentityType + :ivar principal_id: Service Principal Id backing the Msi + :vartype principal_id: str + :ivar tenant_id: Home Tenant Id + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = None + self.tenant_id = None + + +class ResourceMoveDetails(Model): + """Fields for tracking resource move. + + :param operation_in_progress: Denotes whether move operation is in + progress. Possible values include: 'None', 'ResourceMoveInProgress', + 'ResourceMoveFailed' + :type operation_in_progress: str or + ~azure.mgmt.databoxedge.models.ResourceMoveStatus + :param operation_in_progress_lock_timeout_in_utc: Denotes the timeout of + the operation to finish + :type operation_in_progress_lock_timeout_in_utc: datetime + """ + + _attribute_map = { + 'operation_in_progress': {'key': 'operationInProgress', 'type': 'str'}, + 'operation_in_progress_lock_timeout_in_utc': {'key': 'operationInProgressLockTimeoutInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, *, operation_in_progress=None, operation_in_progress_lock_timeout_in_utc=None, **kwargs) -> None: + super(ResourceMoveDetails, self).__init__(**kwargs) + self.operation_in_progress = operation_in_progress + self.operation_in_progress_lock_timeout_in_utc = operation_in_progress_lock_timeout_in_utc + + +class ResourceTypeSku(Model): + """Resource type Sku object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The resource type. + :vartype resource_type: str + :ivar skus: The skus. + :vartype skus: list[~azure.mgmt.databoxedge.models.SkuInformation] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'skus': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[SkuInformation]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceTypeSku, self).__init__(**kwargs) + self.resource_type = None + self.skus = None + + +class RoleSinkInfo(Model): + """Compute role against which events will be raised. + + All required parameters must be populated in order to send to Azure. + + :param role_id: Required. Compute role ID. + :type role_id: str + """ + + _validation = { + 'role_id': {'required': True}, + } + + _attribute_map = { + 'role_id': {'key': 'roleId', 'type': 'str'}, + } + + def __init__(self, *, role_id: str, **kwargs) -> None: + super(RoleSinkInfo, self).__init__(**kwargs) + self.role_id = role_id + + +class Secret(Model): + """Holds device secret either as a KeyVault reference or as an encrypted + value. + + :param encrypted_secret: Encrypted (using device public key) secret value. + :type encrypted_secret: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param key_vault_id: Id of the Key-Vault where secret is stored (ex: + secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). + :type key_vault_id: str + """ + + _attribute_map = { + 'encrypted_secret': {'key': 'encryptedSecret', 'type': 'AsymmetricEncryptedSecret'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, encrypted_secret=None, key_vault_id: str=None, **kwargs) -> None: + super(Secret, self).__init__(**kwargs) + self.encrypted_secret = encrypted_secret + self.key_vault_id = key_vault_id + + +class SecuritySettings(ARMBaseModel): + """The security settings of a device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param device_admin_password: Required. Device administrator password as + an encrypted string (encrypted using RSA PKCS #1) is used to sign into the + local web UI of the device. The Actual password should have at least 8 + characters that are a combination of uppercase, lowercase, numeric, and + special characters. + :type device_admin_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'device_admin_password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'device_admin_password': {'key': 'properties.deviceAdminPassword', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, *, device_admin_password, **kwargs) -> None: + super(SecuritySettings, self).__init__(**kwargs) + self.device_admin_password = device_admin_password + + +class ServiceSpecification(Model): + """Service specification. + + :param metric_specifications: Metric specification as defined by shoebox. + :type metric_specifications: + list[~azure.mgmt.databoxedge.models.MetricSpecificationV1] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecificationV1]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + + +class Share(ARMBaseModel): + """Represents a share on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: Share on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the share. + :type description: str + :param share_status: Required. Current status of the share. Possible + values include: 'Offline', 'Unknown', 'OK', 'Updating', 'NeedsAttention' + :type share_status: str or ~azure.mgmt.databoxedge.models.ShareStatus + :param monitoring_status: Required. Current monitoring status of the + share. Possible values include: 'Enabled', 'Disabled' + :type monitoring_status: str or + ~azure.mgmt.databoxedge.models.MonitoringStatus + :param azure_container_info: Azure container mapping for the share. + :type azure_container_info: + ~azure.mgmt.databoxedge.models.AzureContainerInfo + :param access_protocol: Required. Access protocol to be used by the share. + Possible values include: 'SMB', 'NFS' + :type access_protocol: str or + ~azure.mgmt.databoxedge.models.ShareAccessProtocol + :param user_access_rights: Mapping of users and corresponding access + rights on the share (required for SMB protocol). + :type user_access_rights: + list[~azure.mgmt.databoxedge.models.UserAccessRight] + :param client_access_rights: List of IP addresses and corresponding access + rights on the share(required for NFS protocol). + :type client_access_rights: + list[~azure.mgmt.databoxedge.models.ClientAccessRight] + :param refresh_details: Details of the refresh job on this share. + :type refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails + :ivar share_mappings: Share mount point to the role. + :vartype share_mappings: + list[~azure.mgmt.databoxedge.models.MountPointMap] + :param data_policy: Data policy of the share. Possible values include: + 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_status': {'required': True}, + 'monitoring_status': {'required': True}, + 'access_protocol': {'required': True}, + 'share_mappings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'share_status': {'key': 'properties.shareStatus', 'type': 'str'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + 'azure_container_info': {'key': 'properties.azureContainerInfo', 'type': 'AzureContainerInfo'}, + 'access_protocol': {'key': 'properties.accessProtocol', 'type': 'str'}, + 'user_access_rights': {'key': 'properties.userAccessRights', 'type': '[UserAccessRight]'}, + 'client_access_rights': {'key': 'properties.clientAccessRights', 'type': '[ClientAccessRight]'}, + 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, + 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + } + + def __init__(self, *, share_status, monitoring_status, access_protocol, system_data=None, description: str=None, azure_container_info=None, user_access_rights=None, client_access_rights=None, refresh_details=None, data_policy=None, **kwargs) -> None: + super(Share, self).__init__(**kwargs) + self.system_data = system_data + self.description = description + self.share_status = share_status + self.monitoring_status = monitoring_status + self.azure_container_info = azure_container_info + self.access_protocol = access_protocol + self.user_access_rights = user_access_rights + self.client_access_rights = client_access_rights + self.refresh_details = refresh_details + self.share_mappings = None + self.data_policy = data_policy + + +class ShareAccessRight(Model): + """Specifies the mapping between this particular user and the type of access + he has on shares on this device. + + All required parameters must be populated in order to send to Azure. + + :param share_id: Required. The share ID. + :type share_id: str + :param access_type: Required. Type of access to be allowed on the share + for this user. Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'share_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'share_id': {'key': 'shareId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, *, share_id: str, access_type, **kwargs) -> None: + super(ShareAccessRight, self).__init__(**kwargs) + self.share_id = share_id + self.access_type = access_type + + +class Sku(Model): + """The SKU type. + + :param name: SKU name. Possible values include: 'Gateway', 'Edge', + 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', + 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA', 'TDC', 'TCA_Small', + 'GPU', 'TCA_Large', 'EdgeP_Base', 'EdgeP_High', 'EdgePR_Base', + 'EdgePR_Base_UPS', 'EP2_64_1VPU_W', 'EP2_128_1T4_Mx1_W', 'EP2_256_2T4_W', + 'EdgeMR_Mini', 'RCA_Small', 'RCA_Large', 'RDC', 'Management' + :type name: str or ~azure.mgmt.databoxedge.models.SkuName + :param tier: The SKU tier. This is based on the SKU name. Possible values + include: 'Standard' + :type tier: str or ~azure.mgmt.databoxedge.models.SkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name=None, tier=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class SkuCapability(Model): + """The metadata to describe the capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuCapability, self).__init__(**kwargs) + self.name = None + self.value = None + + +class SkuCost(Model): + """The metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The cost quantity. + :vartype quantity: long + :ivar extended_unit: The extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuCost, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class SkuInformation(Model): + """Sku information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The sku name. + :vartype name: str + :ivar tier: The sku tier. + :vartype tier: str + :ivar kind: The sku kind. + :vartype kind: str + :ivar family: The Sku family. + :vartype family: str + :ivar costs: The pricing info of the Sku. + :vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost] + :ivar locations: The locations where Sku is available. + :vartype locations: list[str] + :ivar location_info: The locations where Sku is available with zones and + sites info + :vartype location_info: + list[~azure.mgmt.databoxedge.models.SkuLocationInfo] + :ivar required_quota_ids: The required quotaIds for the sku to be + available. + :vartype required_quota_ids: list[str] + :ivar required_features: The required features for the sku to be + available. + :vartype required_features: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'kind': {'readonly': True}, + 'family': {'readonly': True}, + 'costs': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'required_quota_ids': {'readonly': True}, + 'required_features': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'costs': {'key': 'costs', 'type': '[SkuCost]'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'}, + 'required_quota_ids': {'key': 'requiredQuotaIds', 'type': '[str]'}, + 'required_features': {'key': 'requiredFeatures', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuInformation, self).__init__(**kwargs) + self.name = None + self.tier = None + self.kind = None + self.family = None + self.costs = None + self.locations = None + self.location_info = None + self.required_quota_ids = None + self.required_features = None + + +class SkuInformationList(Model): + """List of SKU Information objects. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of ResourceTypeSku objects + :vartype value: list[~azure.mgmt.databoxedge.models.ResourceTypeSku] + :ivar next_link: Links to the next set of results + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceTypeSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuInformationList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class SkuLocationInfo(Model): + """The location info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: The location. + :vartype location: str + :ivar zones: The zones. + :vartype zones: list[str] + :ivar sites: The sites. + :vartype sites: list[str] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'sites': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'sites': {'key': 'sites', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.sites = None + + +class StorageAccount(ARMBaseModel): + """Represents a Storage Account on the Data Box Edge/Gateway device. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccount object on ASE device + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param description: Description for the storage Account. + :type description: str + :param storage_account_status: Current status of the storage account. + Possible values include: 'OK', 'Offline', 'Unknown', 'Updating', + 'NeedsAttention' + :type storage_account_status: str or + ~azure.mgmt.databoxedge.models.StorageAccountStatus + :param data_policy: Required. Data policy of the storage Account. Possible + values include: 'Cloud', 'Local' + :type data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + :param storage_account_credential_id: Storage Account Credential Id + :type storage_account_credential_id: str + :ivar blob_endpoint: BlobEndpoint of Storage Account + :vartype blob_endpoint: str + :ivar container_count: The Container Count. Present only for Storage + Accounts with DataPolicy set to Cloud. + :vartype container_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_policy': {'required': True}, + 'blob_endpoint': {'readonly': True}, + 'container_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'storage_account_status': {'key': 'properties.storageAccountStatus', 'type': 'str'}, + 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + 'storage_account_credential_id': {'key': 'properties.storageAccountCredentialId', 'type': 'str'}, + 'blob_endpoint': {'key': 'properties.blobEndpoint', 'type': 'str'}, + 'container_count': {'key': 'properties.containerCount', 'type': 'int'}, + } + + def __init__(self, *, data_policy, system_data=None, description: str=None, storage_account_status=None, storage_account_credential_id: str=None, **kwargs) -> None: + super(StorageAccount, self).__init__(**kwargs) + self.system_data = system_data + self.description = description + self.storage_account_status = storage_account_status + self.data_policy = data_policy + self.storage_account_credential_id = storage_account_credential_id + self.blob_endpoint = None + self.container_count = None + + +class StorageAccountCredential(ARMBaseModel): + """The storage account credential. + + Variables are only 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 id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: StorageAccountCredential object + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param alias: Required. Alias for the storage account. + :type alias: str + :param user_name: Username for the storage account. + :type user_name: str + :param account_key: Encrypted storage key. + :type account_key: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :param connection_string: Connection string for the storage account. Use + this string if username and account key are not specified. + :type connection_string: str + :param ssl_status: Required. Signifies whether SSL needs to be enabled or + not. Possible values include: 'Enabled', 'Disabled' + :type ssl_status: str or ~azure.mgmt.databoxedge.models.SSLStatus + :param blob_domain_name: Blob end point for private clouds. + :type blob_domain_name: str + :param account_type: Required. Type of storage accessed on the storage + account. Possible values include: 'GeneralPurposeStorage', 'BlobStorage' + :type account_type: str or ~azure.mgmt.databoxedge.models.AccountType + :param storage_account_id: Id of the storage account. + :type storage_account_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alias': {'required': True}, + 'ssl_status': {'required': True}, + 'account_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'alias': {'key': 'properties.alias', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'account_key': {'key': 'properties.accountKey', 'type': 'AsymmetricEncryptedSecret'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'ssl_status': {'key': 'properties.sslStatus', 'type': 'str'}, + 'blob_domain_name': {'key': 'properties.blobDomainName', 'type': 'str'}, + 'account_type': {'key': 'properties.accountType', 'type': 'str'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + } + + def __init__(self, *, alias: str, ssl_status, account_type, system_data=None, user_name: str=None, account_key=None, connection_string: str=None, blob_domain_name: str=None, storage_account_id: str=None, **kwargs) -> None: + super(StorageAccountCredential, self).__init__(**kwargs) + self.system_data = system_data + self.alias = alias + self.user_name = user_name + self.account_key = account_key + self.connection_string = connection_string + self.ssl_status = ssl_status + self.blob_domain_name = blob_domain_name + self.account_type = account_type + self.storage_account_id = storage_account_id + + +class SubscriptionRegisteredFeatures(Model): + """SubscriptionRegisteredFeatures. + + :param name: + :type name: str + :param state: + :type state: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, state: str=None, **kwargs) -> None: + super(SubscriptionRegisteredFeatures, self).__init__(**kwargs) + self.name = name + self.state = state + + +class SymmetricKey(Model): + """Symmetric key for authentication. + + :param connection_string: Connection string based on the symmetric key. + :type connection_string: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'AsymmetricEncryptedSecret'}, + } + + def __init__(self, *, connection_string=None, **kwargs) -> None: + super(SymmetricKey, self).__init__(**kwargs) + self.connection_string = connection_string + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.databoxedge.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TrackingInfo(Model): + """Tracking courier information. + + :param serial_number: Serial number of the device being tracked. + :type serial_number: str + :param carrier_name: Name of the carrier used in the delivery. + :type carrier_name: str + :param tracking_id: Tracking ID of the shipment. + :type tracking_id: str + :param tracking_url: Tracking URL of the shipment. + :type tracking_url: str + """ + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'carrier_name': {'key': 'carrierName', 'type': 'str'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + } + + def __init__(self, *, serial_number: str=None, carrier_name: str=None, tracking_id: str=None, tracking_url: str=None, **kwargs) -> None: + super(TrackingInfo, self).__init__(**kwargs) + self.serial_number = serial_number + self.carrier_name = carrier_name + self.tracking_id = tracking_id + self.tracking_url = tracking_url + + +class UpdateDetails(Model): + """Update Specific attributes. + + :param update_title: Title of the Update + :type update_title: str + :param update_size: Size of the update(In Bytes) + :type update_size: float + :param update_type: Type of the Update. Possible values include: + 'Software', 'Kubernetes', 'Firmware' + :type update_type: str or ~azure.mgmt.databoxedge.models.UpdateType + :param target_version: Target Version number + :type target_version: str + :param estimated_install_time_in_mins: Estimated Install Time for the + update + :type estimated_install_time_in_mins: int + :param reboot_behavior: Indicates if updates are available and at least + one of the updates needs a reboot. Possible values include: + 'NeverReboots', 'RequiresReboot', 'RequestReboot' + :type reboot_behavior: str or + ~azure.mgmt.databoxedge.models.InstallRebootBehavior + :param status: Status of the update. Possible values include: + 'DownloadPending', 'DownloadStarted', 'DownloadCompleted', + 'InstallStarted', 'InstallCompleted' + :type status: str or ~azure.mgmt.databoxedge.models.UpdateStatus + """ + + _attribute_map = { + 'update_title': {'key': 'updateTitle', 'type': 'str'}, + 'update_size': {'key': 'updateSize', 'type': 'float'}, + 'update_type': {'key': 'updateType', 'type': 'str'}, + 'target_version': {'key': 'targetVersion', 'type': 'str'}, + 'estimated_install_time_in_mins': {'key': 'estimatedInstallTimeInMins', 'type': 'int'}, + 'reboot_behavior': {'key': 'rebootBehavior', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, update_title: str=None, update_size: float=None, update_type=None, target_version: str=None, estimated_install_time_in_mins: int=None, reboot_behavior=None, status=None, **kwargs) -> None: + super(UpdateDetails, self).__init__(**kwargs) + self.update_title = update_title + self.update_size = update_size + self.update_type = update_type + self.target_version = target_version + self.estimated_install_time_in_mins = estimated_install_time_in_mins + self.reboot_behavior = reboot_behavior + self.status = status + + +class UpdateDownloadProgress(Model): + """Details about the download progress of update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar download_phase: The download phase. Possible values include: + 'Unknown', 'Initializing', 'Downloading', 'Verifying' + :vartype download_phase: str or + ~azure.mgmt.databoxedge.models.DownloadPhase + :ivar percent_complete: Percentage of completion. + :vartype percent_complete: int + :ivar total_bytes_to_download: Total bytes to download. + :vartype total_bytes_to_download: float + :ivar total_bytes_downloaded: Total bytes downloaded. + :vartype total_bytes_downloaded: float + :ivar number_of_updates_to_download: Number of updates to download. + :vartype number_of_updates_to_download: int + :ivar number_of_updates_downloaded: Number of updates downloaded. + :vartype number_of_updates_downloaded: int + """ + + _validation = { + 'download_phase': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'total_bytes_to_download': {'readonly': True}, + 'total_bytes_downloaded': {'readonly': True}, + 'number_of_updates_to_download': {'readonly': True}, + 'number_of_updates_downloaded': {'readonly': True}, + } + + _attribute_map = { + 'download_phase': {'key': 'downloadPhase', 'type': 'str'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'total_bytes_to_download': {'key': 'totalBytesToDownload', 'type': 'float'}, + 'total_bytes_downloaded': {'key': 'totalBytesDownloaded', 'type': 'float'}, + 'number_of_updates_to_download': {'key': 'numberOfUpdatesToDownload', 'type': 'int'}, + 'number_of_updates_downloaded': {'key': 'numberOfUpdatesDownloaded', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateDownloadProgress, self).__init__(**kwargs) + self.download_phase = None + self.percent_complete = None + self.total_bytes_to_download = None + self.total_bytes_downloaded = None + self.number_of_updates_to_download = None + self.number_of_updates_downloaded = None + + +class UpdateInstallProgress(Model): + """Progress details during installation of updates. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar percent_complete: Percentage completed. + :vartype percent_complete: int + :ivar number_of_updates_to_install: Number of updates to install. + :vartype number_of_updates_to_install: int + :ivar number_of_updates_installed: Number of updates installed. + :vartype number_of_updates_installed: int + """ + + _validation = { + 'percent_complete': {'readonly': True}, + 'number_of_updates_to_install': {'readonly': True}, + 'number_of_updates_installed': {'readonly': True}, + } + + _attribute_map = { + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'number_of_updates_to_install': {'key': 'numberOfUpdatesToInstall', 'type': 'int'}, + 'number_of_updates_installed': {'key': 'numberOfUpdatesInstalled', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateInstallProgress, self).__init__(**kwargs) + self.percent_complete = None + self.number_of_updates_to_install = None + self.number_of_updates_installed = None + + +class UpdateSummary(ARMBaseModel): + """Details about ongoing updates and availability of updates on the device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: UpdateSummary Result + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param device_version_number: The current version of the device in format: + 1.2.17312.13.", + :type device_version_number: str + :param friendly_device_version_name: The current version of the device in + text format. + :type friendly_device_version_name: str + :param device_last_scanned_date_time: The last time when a scan was done + on the device. + :type device_last_scanned_date_time: datetime + :param last_completed_scan_job_date_time: The time when the last scan job + was completed (success/cancelled/failed) on the appliance. + :type last_completed_scan_job_date_time: datetime + :ivar last_completed_download_job_date_time: The time when the last + Download job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_download_job_date_time: datetime + :ivar last_completed_download_job_id: JobId of the last ran download + job.(Can be success/cancelled/failed) + :vartype last_completed_download_job_id: str + :ivar last_download_job_status: JobStatus of the last ran download job. + Possible values include: 'Invalid', 'Running', 'Succeeded', 'Failed', + 'Canceled', 'Paused', 'Scheduled' + :vartype last_download_job_status: str or + ~azure.mgmt.databoxedge.models.JobStatus + :ivar last_completed_install_job_date_time: The time when the last Install + job was completed (success/cancelled/failed) on the appliance. + :vartype last_completed_install_job_date_time: datetime + :ivar last_completed_install_job_id: JobId of the last ran install + job.(Can be success/cancelled/failed) + :vartype last_completed_install_job_id: str + :ivar last_install_job_status: JobStatus of the last ran install job. + Possible values include: 'Invalid', 'Running', 'Succeeded', 'Failed', + 'Canceled', 'Paused', 'Scheduled' + :vartype last_install_job_status: str or + ~azure.mgmt.databoxedge.models.JobStatus + :ivar total_number_of_updates_available: The number of updates available + for the current device version as per the last device scan. + :vartype total_number_of_updates_available: int + :ivar total_number_of_updates_pending_download: The total number of items + pending download. + :vartype total_number_of_updates_pending_download: int + :ivar total_number_of_updates_pending_install: The total number of items + pending install. + :vartype total_number_of_updates_pending_install: int + :ivar reboot_behavior: Indicates if updates are available and at least one + of the updates needs a reboot. Possible values include: 'NeverReboots', + 'RequiresReboot', 'RequestReboot' + :vartype reboot_behavior: str or + ~azure.mgmt.databoxedge.models.InstallRebootBehavior + :ivar ongoing_update_operation: The current update operation. Possible + values include: 'None', 'Scan', 'Download', 'Install' + :vartype ongoing_update_operation: str or + ~azure.mgmt.databoxedge.models.UpdateOperation + :ivar in_progress_download_job_id: The job ID of the download job in + progress. + :vartype in_progress_download_job_id: str + :ivar in_progress_install_job_id: The job ID of the install job in + progress. + :vartype in_progress_install_job_id: str + :ivar in_progress_download_job_started_date_time: The time when the + currently running download (if any) started. + :vartype in_progress_download_job_started_date_time: datetime + :ivar in_progress_install_job_started_date_time: The time when the + currently running install (if any) started. + :vartype in_progress_install_job_started_date_time: datetime + :ivar update_titles: The list of updates available for install. + :vartype update_titles: list[str] + :ivar updates: The list of updates available for install. + :vartype updates: list[~azure.mgmt.databoxedge.models.UpdateDetails] + :ivar total_update_size_in_bytes: The total size of updates available for + download in bytes. + :vartype total_update_size_in_bytes: float + :ivar total_time_in_minutes: The total time in Minutes + :vartype total_time_in_minutes: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_completed_download_job_date_time': {'readonly': True}, + 'last_completed_download_job_id': {'readonly': True}, + 'last_download_job_status': {'readonly': True}, + 'last_completed_install_job_date_time': {'readonly': True}, + 'last_completed_install_job_id': {'readonly': True}, + 'last_install_job_status': {'readonly': True}, + 'total_number_of_updates_available': {'readonly': True}, + 'total_number_of_updates_pending_download': {'readonly': True}, + 'total_number_of_updates_pending_install': {'readonly': True}, + 'reboot_behavior': {'readonly': True}, + 'ongoing_update_operation': {'readonly': True}, + 'in_progress_download_job_id': {'readonly': True}, + 'in_progress_install_job_id': {'readonly': True}, + 'in_progress_download_job_started_date_time': {'readonly': True}, + 'in_progress_install_job_started_date_time': {'readonly': True}, + 'update_titles': {'readonly': True}, + 'updates': {'readonly': True}, + 'total_update_size_in_bytes': {'readonly': True}, + 'total_time_in_minutes': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'device_version_number': {'key': 'properties.deviceVersionNumber', 'type': 'str'}, + 'friendly_device_version_name': {'key': 'properties.friendlyDeviceVersionName', 'type': 'str'}, + 'device_last_scanned_date_time': {'key': 'properties.deviceLastScannedDateTime', 'type': 'iso-8601'}, + 'last_completed_scan_job_date_time': {'key': 'properties.lastCompletedScanJobDateTime', 'type': 'iso-8601'}, + 'last_completed_download_job_date_time': {'key': 'properties.lastCompletedDownloadJobDateTime', 'type': 'iso-8601'}, + 'last_completed_download_job_id': {'key': 'properties.lastCompletedDownloadJobId', 'type': 'str'}, + 'last_download_job_status': {'key': 'properties.lastDownloadJobStatus', 'type': 'str'}, + 'last_completed_install_job_date_time': {'key': 'properties.lastCompletedInstallJobDateTime', 'type': 'iso-8601'}, + 'last_completed_install_job_id': {'key': 'properties.lastCompletedInstallJobId', 'type': 'str'}, + 'last_install_job_status': {'key': 'properties.lastInstallJobStatus', 'type': 'str'}, + 'total_number_of_updates_available': {'key': 'properties.totalNumberOfUpdatesAvailable', 'type': 'int'}, + 'total_number_of_updates_pending_download': {'key': 'properties.totalNumberOfUpdatesPendingDownload', 'type': 'int'}, + 'total_number_of_updates_pending_install': {'key': 'properties.totalNumberOfUpdatesPendingInstall', 'type': 'int'}, + 'reboot_behavior': {'key': 'properties.rebootBehavior', 'type': 'str'}, + 'ongoing_update_operation': {'key': 'properties.ongoingUpdateOperation', 'type': 'str'}, + 'in_progress_download_job_id': {'key': 'properties.inProgressDownloadJobId', 'type': 'str'}, + 'in_progress_install_job_id': {'key': 'properties.inProgressInstallJobId', 'type': 'str'}, + 'in_progress_download_job_started_date_time': {'key': 'properties.inProgressDownloadJobStartedDateTime', 'type': 'iso-8601'}, + 'in_progress_install_job_started_date_time': {'key': 'properties.inProgressInstallJobStartedDateTime', 'type': 'iso-8601'}, + 'update_titles': {'key': 'properties.updateTitles', 'type': '[str]'}, + 'updates': {'key': 'properties.updates', 'type': '[UpdateDetails]'}, + 'total_update_size_in_bytes': {'key': 'properties.totalUpdateSizeInBytes', 'type': 'float'}, + 'total_time_in_minutes': {'key': 'properties.totalTimeInMinutes', 'type': 'int'}, + } + + def __init__(self, *, system_data=None, device_version_number: str=None, friendly_device_version_name: str=None, device_last_scanned_date_time=None, last_completed_scan_job_date_time=None, **kwargs) -> None: + super(UpdateSummary, self).__init__(**kwargs) + self.system_data = system_data + self.device_version_number = device_version_number + self.friendly_device_version_name = friendly_device_version_name + self.device_last_scanned_date_time = device_last_scanned_date_time + self.last_completed_scan_job_date_time = last_completed_scan_job_date_time + self.last_completed_download_job_date_time = None + self.last_completed_download_job_id = None + self.last_download_job_status = None + self.last_completed_install_job_date_time = None + self.last_completed_install_job_id = None + self.last_install_job_status = None + self.total_number_of_updates_available = None + self.total_number_of_updates_pending_download = None + self.total_number_of_updates_pending_install = None + self.reboot_behavior = None + self.ongoing_update_operation = None + self.in_progress_download_job_id = None + self.in_progress_install_job_id = None + self.in_progress_download_job_started_date_time = None + self.in_progress_install_job_started_date_time = None + self.update_titles = None + self.updates = None + self.total_update_size_in_bytes = None + self.total_time_in_minutes = None + + +class UploadCertificateRequest(Model): + """The upload certificate request. + + All required parameters must be populated in order to send to Azure. + + :param authentication_type: The authentication type. Possible values + include: 'Invalid', 'AzureActiveDirectory' + :type authentication_type: str or + ~azure.mgmt.databoxedge.models.AuthenticationType + :param certificate: Required. The base64 encoded certificate raw data. + :type certificate: str + """ + + _validation = { + 'certificate': {'required': True}, + } + + _attribute_map = { + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'str'}, + 'certificate': {'key': 'properties.certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str, authentication_type=None, **kwargs) -> None: + super(UploadCertificateRequest, self).__init__(**kwargs) + self.authentication_type = authentication_type + self.certificate = certificate + + +class UploadCertificateResponse(Model): + """The upload registration certificate response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param auth_type: Specifies authentication type. Possible values include: + 'Invalid', 'AzureActiveDirectory' + :type auth_type: str or ~azure.mgmt.databoxedge.models.AuthenticationType + :ivar resource_id: The resource ID of the Data Box Edge/Gateway device. + :vartype resource_id: str + :ivar aad_authority: Azure Active Directory tenant authority. + :vartype aad_authority: str + :ivar aad_tenant_id: Azure Active Directory tenant ID. + :vartype aad_tenant_id: str + :ivar service_principal_client_id: Azure Active Directory service + principal client ID. + :vartype service_principal_client_id: str + :ivar service_principal_object_id: Azure Active Directory service + principal object ID. + :vartype service_principal_object_id: str + :ivar azure_management_endpoint_audience: The azure management endpoint + audience. + :vartype azure_management_endpoint_audience: str + :ivar aad_audience: Identifier of the target resource that is the + recipient of the requested token. + :vartype aad_audience: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'aad_authority': {'readonly': True}, + 'aad_tenant_id': {'readonly': True}, + 'service_principal_client_id': {'readonly': True}, + 'service_principal_object_id': {'readonly': True}, + 'azure_management_endpoint_audience': {'readonly': True}, + 'aad_audience': {'readonly': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'aad_authority': {'key': 'aadAuthority', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, + 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + } + + def __init__(self, *, auth_type=None, **kwargs) -> None: + super(UploadCertificateResponse, self).__init__(**kwargs) + self.auth_type = auth_type + self.resource_id = None + self.aad_authority = None + self.aad_tenant_id = None + self.service_principal_client_id = None + self.service_principal_object_id = None + self.azure_management_endpoint_audience = None + self.aad_audience = None + + +class User(ARMBaseModel): + """Represents a user who has access to one or more shares on the Data Box + Edge/Gateway device. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The path ID that uniquely identifies the object. + :vartype id: str + :ivar name: The object name. + :vartype name: str + :ivar type: The hierarchical type of the object. + :vartype type: str + :param system_data: User in DataBoxEdge Resource + :type system_data: ~azure.mgmt.databoxedge.models.SystemData + :param encrypted_password: The password details. + :type encrypted_password: + ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :ivar share_access_rights: List of shares that the user has rights on. + This field should not be specified during user creation. + :vartype share_access_rights: + list[~azure.mgmt.databoxedge.models.ShareAccessRight] + :param user_type: Type of the user. Possible values include: 'Share', + 'LocalManagement', 'ARM' + :type user_type: str or ~azure.mgmt.databoxedge.models.UserType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'share_access_rights': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'encrypted_password': {'key': 'properties.encryptedPassword', 'type': 'AsymmetricEncryptedSecret'}, + 'share_access_rights': {'key': 'properties.shareAccessRights', 'type': '[ShareAccessRight]'}, + 'user_type': {'key': 'properties.userType', 'type': 'str'}, + } + + def __init__(self, *, system_data=None, encrypted_password=None, user_type=None, **kwargs) -> None: + super(User, self).__init__(**kwargs) + self.system_data = system_data + self.encrypted_password = encrypted_password + self.share_access_rights = None + self.user_type = user_type + + +class UserAccessRight(Model): + """The mapping between a particular user and the access type on the SMB share. + + All required parameters must be populated in order to send to Azure. + + :param user_id: Required. User ID (already existing in the device). + :type user_id: str + :param access_type: Required. Type of access to be allowed for the user. + Possible values include: 'Change', 'Read', 'Custom' + :type access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + _validation = { + 'user_id': {'required': True}, + 'access_type': {'required': True}, + } + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + } + + def __init__(self, *, user_id: str, access_type, **kwargs) -> None: + super(UserAccessRight, self).__init__(**kwargs) + self.user_id = user_id + self.access_type = access_type diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_paged_models.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_paged_models.py new file mode 100644 index 000000000000..644a4942ff0e --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/models/_paged_models.py @@ -0,0 +1,222 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class DataBoxEdgeSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`DataBoxEdgeSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataBoxEdgeSku]'} + } + + def __init__(self, *args, **kwargs): + + super(DataBoxEdgeSkuPaged, self).__init__(*args, **kwargs) +class DataBoxEdgeDevicePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataBoxEdgeDevice ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataBoxEdgeDevice]'} + } + + def __init__(self, *args, **kwargs): + + super(DataBoxEdgeDevicePaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class BandwidthSchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`BandwidthSchedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BandwidthSchedule]'} + } + + def __init__(self, *args, **kwargs): + + super(BandwidthSchedulePaged, self).__init__(*args, **kwargs) +class NodePaged(Paged): + """ + A paging container for iterating over a list of :class:`Node ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Node]'} + } + + def __init__(self, *args, **kwargs): + + super(NodePaged, self).__init__(*args, **kwargs) +class OrderPaged(Paged): + """ + A paging container for iterating over a list of :class:`Order ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Order]'} + } + + def __init__(self, *args, **kwargs): + + super(OrderPaged, self).__init__(*args, **kwargs) +class RolePaged(Paged): + """ + A paging container for iterating over a list of :class:`Role ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Role]'} + } + + def __init__(self, *args, **kwargs): + + super(RolePaged, self).__init__(*args, **kwargs) +class AddonPaged(Paged): + """ + A paging container for iterating over a list of :class:`Addon ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Addon]'} + } + + def __init__(self, *args, **kwargs): + + super(AddonPaged, self).__init__(*args, **kwargs) +class MonitoringMetricConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`MonitoringMetricConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MonitoringMetricConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(MonitoringMetricConfigurationPaged, self).__init__(*args, **kwargs) +class SharePaged(Paged): + """ + A paging container for iterating over a list of :class:`Share ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Share]'} + } + + def __init__(self, *args, **kwargs): + + super(SharePaged, self).__init__(*args, **kwargs) +class StorageAccountCredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`StorageAccountCredential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StorageAccountCredential]'} + } + + def __init__(self, *args, **kwargs): + + super(StorageAccountCredentialPaged, self).__init__(*args, **kwargs) +class StorageAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`StorageAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StorageAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(StorageAccountPaged, self).__init__(*args, **kwargs) +class ContainerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Container ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Container]'} + } + + def __init__(self, *args, **kwargs): + + super(ContainerPaged, self).__init__(*args, **kwargs) +class TriggerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Trigger ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Trigger]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggerPaged, self).__init__(*args, **kwargs) +class UserPaged(Paged): + """ + A paging container for iterating over a list of :class:`User ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[User]'} + } + + def __init__(self, *args, **kwargs): + + super(UserPaged, self).__init__(*args, **kwargs) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/__init__.py new file mode 100644 index 000000000000..fad9a2d17114 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/__init__.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 ._operations import Operations +from ._available_skus_operations import AvailableSkusOperations +from ._devices_operations import DevicesOperations +from ._alerts_operations import AlertsOperations +from ._bandwidth_schedules_operations import BandwidthSchedulesOperations +from ._jobs_operations import JobsOperations +from ._nodes_operations import NodesOperations +from ._operations_status_operations import OperationsStatusOperations +from ._orders_operations import OrdersOperations +from ._roles_operations import RolesOperations +from ._addons_operations import AddonsOperations +from ._monitoring_config_operations import MonitoringConfigOperations +from ._shares_operations import SharesOperations +from ._storage_account_credentials_operations import StorageAccountCredentialsOperations +from ._storage_accounts_operations import StorageAccountsOperations +from ._containers_operations import ContainersOperations +from ._triggers_operations import TriggersOperations +from ._users_operations import UsersOperations + +__all__ = [ + 'Operations', + 'AvailableSkusOperations', + 'DevicesOperations', + 'AlertsOperations', + 'BandwidthSchedulesOperations', + 'JobsOperations', + 'NodesOperations', + 'OperationsStatusOperations', + 'OrdersOperations', + 'RolesOperations', + 'AddonsOperations', + 'MonitoringConfigOperations', + 'SharesOperations', + 'StorageAccountCredentialsOperations', + 'StorageAccountsOperations', + 'ContainersOperations', + 'TriggersOperations', + 'UsersOperations', +] diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_addons_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_addons_operations.py new file mode 100644 index 000000000000..a83b9d8819f5 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_addons_operations.py @@ -0,0 +1,379 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +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 AddonsOperations(object): + """AddonsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_role( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the addons configured in the role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Addon + :rtype: + ~azure.mgmt.databoxedge.models.AddonPaged[~azure.mgmt.databoxedge.models.Addon] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_role.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AddonPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_role.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons'} + + def get( + self, device_name, role_name, addon_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific addon by name. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param addon_name: The addon name. + :type addon_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Addon or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Addon or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + 'addonName': self._serialize.url("addon_name", addon_name, 'str'), + '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') + + # 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('Addon', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}'} + + + def _create_or_update_initial( + self, device_name, role_name, addon_name, addon, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + 'addonName': self._serialize.url("addon_name", addon_name, 'str'), + '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') + + # 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(addon, 'Addon') + + # 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('Addon', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, role_name, addon_name, addon, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a addon. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param addon_name: The addon name. + :type addon_name: str + :param addon: The addon properties. + :type addon: ~azure.mgmt.databoxedge.models.Addon + :param resource_group_name: The resource group name. + :type resource_group_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 Addon or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Addon] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Addon]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + addon=addon, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Addon', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}'} + + + def _delete_initial( + self, device_name, role_name, addon_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + 'addonName': self._serialize.url("addon_name", addon_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, role_name, addon_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the addon on the device. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param addon_name: The addon name. + :type addon_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_alerts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_alerts_operations.py new file mode 100644 index 000000000000..6af068a92918 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_alerts_operations.py @@ -0,0 +1,176 @@ +# 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 AlertsOperations(object): + """AlertsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the alerts for a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Alert + :rtype: + ~azure.mgmt.databoxedge.models.AlertPaged[~azure.mgmt.databoxedge.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets an alert by name. + + :param device_name: The device name. + :type device_name: str + :param name: The alert name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Alert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Alert or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Alert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_available_skus_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_available_skus_operations.py new file mode 100644 index 000000000000..1833fedbb3ed --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_available_skus_operations.py @@ -0,0 +1,106 @@ +# 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 AvailableSkusOperations(object): + """AvailableSkusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all the available Skus and information related to them. + + :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 DataBoxEdgeSku + :rtype: + ~azure.mgmt.databoxedge.models.DataBoxEdgeSkuPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeSku] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataBoxEdgeSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/availableSkus'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_bandwidth_schedules_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_bandwidth_schedules_operations.py new file mode 100644 index 000000000000..4bffe8f4f738 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_bandwidth_schedules_operations.py @@ -0,0 +1,367 @@ +# 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 BandwidthSchedulesOperations(object): + """BandwidthSchedulesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 BandwidthSchedule + :rtype: + ~azure.mgmt.databoxedge.models.BandwidthSchedulePaged[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BandwidthSchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified bandwidth schedule. + + :param device_name: The device name. + :type device_name: str + :param name: The bandwidth schedule name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: BandwidthSchedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.BandwidthSchedule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('BandwidthSchedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} + + + def _create_or_update_initial( + self, device_name, name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(parameters, 'BandwidthSchedule') + + # 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('BandwidthSchedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, parameters, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. + :type device_name: str + :param name: The bandwidth schedule name which needs to be + added/updated. + :type name: str + :param parameters: The bandwidth schedule to be added or updated. + :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule + :param resource_group_name: The resource group name. + :type resource_group_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 BandwidthSchedule or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.BandwidthSchedule]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + parameters=parameters, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BandwidthSchedule', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified bandwidth schedule. + + :param device_name: The device name. + :type device_name: str + :param name: The bandwidth schedule name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_containers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_containers_operations.py new file mode 100644 index 000000000000..f522e0826bc0 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_containers_operations.py @@ -0,0 +1,467 @@ +# 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 ContainersOperations(object): + """ContainersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_storage_account( + self, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the containers of a storage Account in a Data Box Edge/Data + Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The storage Account name. + :type storage_account_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Container + :rtype: + ~azure.mgmt.databoxedge.models.ContainerPaged[~azure.mgmt.databoxedge.models.Container] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_storage_account.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContainerPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_storage_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers'} + + def get( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a container by name. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container Name + :type container_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Container or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Container or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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('Container', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}'} + + + def _create_or_update_initial( + self, device_name, storage_account_name, container_name, container, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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(container, 'Container') + + # 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('Container', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, storage_account_name, container_name, container, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new container or updates an existing container on the device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container name. + :type container_name: str + :param container: The container properties. + :type container: ~azure.mgmt.databoxedge.models.Container + :param resource_group_name: The resource group name. + :type resource_group_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 Container or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Container] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Container]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + container=container, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Container', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}'} + + + def _delete_initial( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the container on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container name. + :type container_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}'} + + + def _refresh_initial( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.refresh.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def refresh( + self, device_name, storage_account_name, container_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Refreshes the container metadata with the data from the cloud. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The Storage Account Name + :type storage_account_name: str + :param container_name: The container name. + :type container_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._refresh_initial( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_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) + refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}/refresh'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_devices_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_devices_operations.py new file mode 100644 index 000000000000..b45c04052eb3 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_devices_operations.py @@ -0,0 +1,1211 @@ +# 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 DevicesOperations(object): + """DevicesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_subscription( + self, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets all the Data Box Edge/Data Box Gateway devices in a subscription. + + :param expand: Specify $expand=details to populate additional fields + related to the resource or Specify $skipToken= to populate the + next page in the list. + :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: An iterator like instance of DataBoxEdgeDevice + :rtype: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.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 expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataBoxEdgeDevicePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices'} + + def list_by_resource_group( + self, resource_group_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets all the Data Box Edge/Data Box Gateway devices in a resource + group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param expand: Specify $expand=details to populate additional fields + related to the resource or Specify $skipToken= to populate the + next page in the list. + :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: An iterator like instance of DataBoxEdgeDevice + :rtype: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataBoxEdgeDevicePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices'} + + def get( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDevice or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('DataBoxEdgeDevice', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + + def _create_or_update_initial( + self, device_name, data_box_edge_device, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(data_box_edge_device, 'DataBoxEdgeDevice') + + # 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]: + 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('DataBoxEdgeDevice', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, data_box_edge_device, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. + :type device_name: str + :param data_box_edge_device: The resource object. + :type data_box_edge_device: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :param resource_group_name: The resource group name. + :type resource_group_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 DataBoxEdgeDevice or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + data_box_edge_device=data_box_edge_device, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('DataBoxEdgeDevice', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + + def _delete_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + def update( + self, device_name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. + :type device_name: str + :param parameters: The resource parameters. + :type parameters: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDevice or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(parameters, 'DataBoxEdgeDevicePatch') + + # 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]: + 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('DataBoxEdgeDevice', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + + + def _download_updates_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.download_updates.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def download_updates( + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Downloads the updates on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._download_updates_initial( + device_name=device_name, + resource_group_name=resource_group_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) + download_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates'} + + def generate_certificate( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Generates certificate for activation key. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: GenerateCertResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.GenerateCertResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generate_certificate.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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 + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GenerateCertResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generate_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/generateCertificate'} + + def get_extended_information( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets additional information for the specified Azure Stack Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDeviceExtendedInfo or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_extended_information.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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 + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataBoxEdgeDeviceExtendedInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_extended_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation'} + + + def _install_updates_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_updates.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def install_updates( + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Installs the updates on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._install_updates_initial( + device_name=device_name, + resource_group_name=resource_group_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) + install_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates'} + + def get_network_settings( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the network settings of the specified Data Box Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: NetworkSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.NetworkSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_network_settings.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('NetworkSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default'} + + + def _scan_for_updates_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.scan_for_updates.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def scan_for_updates( + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Scans for updates on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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._scan_for_updates_initial( + device_name=device_name, + resource_group_name=resource_group_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) + scan_for_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates'} + + + def _create_or_update_security_settings_initial( + self, device_name, security_settings, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_security_settings.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(security_settings, 'SecuritySettings') + + # 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 [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 create_or_update_security_settings( + self, device_name, security_settings, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates the security settings on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param security_settings: The security settings. + :type security_settings: + ~azure.mgmt.databoxedge.models.SecuritySettings + :param resource_group_name: The resource group name. + :type resource_group_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._create_or_update_security_settings_initial( + device_name=device_name, + security_settings=security_settings, + resource_group_name=resource_group_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) + create_or_update_security_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update'} + + def update_extended_information( + self, device_name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets additional information for the specified Data Box Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param parameters: The patch object. + :type parameters: + ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch + :param resource_group_name: The resource group name. + :type resource_group_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: DataBoxEdgeDeviceExtendedInfo or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_extended_information.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(parameters, 'DataBoxEdgeDeviceExtendedInfoPatch') + + # 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('DataBoxEdgeDeviceExtendedInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_extended_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateExtendedInformation'} + + def get_update_summary( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets information about the availability of updates based on the last + scan of the device. It also gets information about any ongoing download + or install jobs on the device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: UpdateSummary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.UpdateSummary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_update_summary.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('UpdateSummary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_update_summary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default'} + + def upload_certificate( + self, device_name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Uploads registration certificate for the device. + + :param device_name: The device name. + :type device_name: str + :param parameters: The upload certificate request. + :type parameters: + ~azure.mgmt.databoxedge.models.UploadCertificateRequest + :param resource_group_name: The resource group name. + :type resource_group_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: UploadCertificateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.upload_certificate.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(parameters, 'UploadCertificateRequest') + + # 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('UploadCertificateResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + upload_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_jobs_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_jobs_operations.py new file mode 100644 index 000000000000..e5db162bd364 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_jobs_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JobsOperations(object): + """JobsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the details of a specified job on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param name: The job name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_monitoring_config_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_monitoring_config_operations.py new file mode 100644 index 000000000000..e7d20a9f5611 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_monitoring_config_operations.py @@ -0,0 +1,372 @@ +# 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 MonitoringConfigOperations(object): + """MonitoringConfigOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists metric configurations in a role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 MonitoringMetricConfiguration + :rtype: + ~azure.mgmt.databoxedge.models.MonitoringMetricConfigurationPaged[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MonitoringMetricConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig'} + + def get( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a metric configuration of a role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: MonitoringMetricConfiguration or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + # 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('MonitoringMetricConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default'} + + + def _create_or_update_initial( + self, device_name, role_name, monitoring_metric_configuration, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + # 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(monitoring_metric_configuration, 'MonitoringMetricConfiguration') + + # 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('MonitoringMetricConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, role_name, monitoring_metric_configuration, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new metric configuration or updates an existing one for a + role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param monitoring_metric_configuration: The metric configuration. + :type monitoring_metric_configuration: + ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration + :param resource_group_name: The resource group name. + :type resource_group_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 + MonitoringMetricConfiguration or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + role_name=role_name, + monitoring_metric_configuration=monitoring_metric_configuration, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MonitoringMetricConfiguration', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default'} + + + def _delete_initial( + self, device_name, role_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, role_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """deletes a new metric configuration for a role. + + :param device_name: The device name. + :type device_name: str + :param role_name: The role name. + :type role_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_nodes_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_nodes_operations.py new file mode 100644 index 000000000000..72504878e989 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_nodes_operations.py @@ -0,0 +1,113 @@ +# 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 NodesOperations(object): + """NodesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the nodes currently configured under this Data Box Edge + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Node + :rtype: + ~azure.mgmt.databoxedge.models.NodePaged[~azure.mgmt.databoxedge.models.Node] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NodePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/nodes'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_operations.py new file mode 100644 index 000000000000..3dd9ca0881b9 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all the supported 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.databoxedge.models.OperationPaged[~azure.mgmt.databoxedge.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DataBoxEdge/operations'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_operations_status_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_operations_status_operations.py new file mode 100644 index 000000000000..544bf5d2e419 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_operations_status_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class OperationsStatusOperations(object): + """OperationsStatusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the details of a specified job on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param name: The job name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_orders_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_orders_operations.py new file mode 100644 index 000000000000..8ca769c3032e --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_orders_operations.py @@ -0,0 +1,416 @@ +# 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 OrdersOperations(object): + """OrdersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the orders related to a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Order + :rtype: + ~azure.mgmt.databoxedge.models.OrderPaged[~azure.mgmt.databoxedge.models.Order] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders'} + + def get( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific order by name. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Order or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Order or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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('Order', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + + + def _create_or_update_initial( + self, device_name, order, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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(order, 'Order') + + # 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('Order', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, order, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an order. + + :param device_name: The order details of a device. + :type device_name: str + :param order: The order to be created or updated. + :type order: ~azure.mgmt.databoxedge.models.Order + :param resource_group_name: The resource group name. + :type resource_group_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 Order or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Order] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Order]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + order=order, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Order', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + + + def _delete_initial( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the order related to the device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + + def list_dc_access_code( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the DCAccess Code. + + :param device_name: The device name + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: DCAccessCode or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.DCAccessCode or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_dc_access_code.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + # 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 + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DCAccessCode', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_dc_access_code.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default/listDCAccessCode'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_roles_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_roles_operations.py new file mode 100644 index 000000000000..a93fe2ce54d1 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_roles_operations.py @@ -0,0 +1,366 @@ +# 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 RolesOperations(object): + """RolesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the roles configured in a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Role + :rtype: + ~azure.mgmt.databoxedge.models.RolePaged[~azure.mgmt.databoxedge.models.Role] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RolePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific role by name. + + :param device_name: The device name. + :type device_name: str + :param name: The role name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Role or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Role or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Role', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} + + + def _create_or_update_initial( + self, device_name, name, role, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(role, 'Role') + + # 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('Role', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, role, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a role. + + :param device_name: The device name. + :type device_name: str + :param name: The role name. + :type name: str + :param role: The role properties. + :type role: ~azure.mgmt.databoxedge.models.Role + :param resource_group_name: The resource group name. + :type resource_group_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 Role or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Role] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Role]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + role=role, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Role', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the role on the device. + + :param device_name: The device name. + :type device_name: str + :param name: The role name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_shares_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_shares_operations.py new file mode 100644 index 000000000000..a3f6a60a229d --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_shares_operations.py @@ -0,0 +1,448 @@ +# 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 SharesOperations(object): + """SharesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the shares in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 Share + :rtype: + ~azure.mgmt.databoxedge.models.SharePaged[~azure.mgmt.databoxedge.models.Share] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SharePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a share by name. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Share or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Share or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Share', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + + + def _create_or_update_initial( + self, device_name, name, share, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(share, 'Share') + + # 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('Share', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, share, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new share or updates an existing share on the device. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param share: The share properties. + :type share: ~azure.mgmt.databoxedge.models.Share + :param resource_group_name: The resource group name. + :type resource_group_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 Share or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Share] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Share]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + share=share, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Share', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the share on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + + + def _refresh_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.refresh.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def refresh( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Refreshes the share metadata with the data from the cloud. + + :param device_name: The device name. + :type device_name: str + :param name: The share name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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._refresh_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_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) + refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_storage_account_credentials_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_storage_account_credentials_operations.py new file mode 100644 index 000000000000..85c3238c08cc --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_storage_account_credentials_operations.py @@ -0,0 +1,368 @@ +# 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 StorageAccountCredentialsOperations(object): + """StorageAccountCredentialsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the storage account credentials in a Data Box Edge/Data Box + Gateway device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 StorageAccountCredential + :rtype: + ~azure.mgmt.databoxedge.models.StorageAccountCredentialPaged[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StorageAccountCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified storage account credential. + + :param device_name: The device name. + :type device_name: str + :param name: The storage account credential name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: StorageAccountCredential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.StorageAccountCredential or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('StorageAccountCredential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} + + + def _create_or_update_initial( + self, device_name, name, storage_account_credential, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(storage_account_credential, 'StorageAccountCredential') + + # 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('StorageAccountCredential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, storage_account_credential, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates the storage account credential. + + :param device_name: The device name. + :type device_name: str + :param name: The storage account credential name. + :type name: str + :param storage_account_credential: The storage account credential. + :type storage_account_credential: + ~azure.mgmt.databoxedge.models.StorageAccountCredential + :param resource_group_name: The resource group name. + :type resource_group_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 + StorageAccountCredential or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.StorageAccountCredential]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + storage_account_credential=storage_account_credential, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageAccountCredential', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the storage account credential. + + :param device_name: The device name. + :type device_name: str + :param name: The storage account credential name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_storage_accounts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_storage_accounts_operations.py new file mode 100644 index 000000000000..621e2d9cf97b --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_storage_accounts_operations.py @@ -0,0 +1,368 @@ +# 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 StorageAccountsOperations(object): + """StorageAccountsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_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 StorageAccount + :rtype: + ~azure.mgmt.databoxedge.models.StorageAccountPaged[~azure.mgmt.databoxedge.models.StorageAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts'} + + def get( + self, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a StorageAccount by name. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The storage account name. + :type storage_account_name: str + :param resource_group_name: The resource group name. + :type resource_group_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: StorageAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.StorageAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + # 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('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'} + + + def _create_or_update_initial( + self, device_name, storage_account_name, storage_account, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + # 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(storage_account, 'StorageAccount') + + # 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('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, storage_account_name, storage_account, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new StorageAccount or updates an existing StorageAccount on + the device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The StorageAccount name. + :type storage_account_name: str + :param storage_account: The StorageAccount properties. + :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount + :param resource_group_name: The resource group name. + :type resource_group_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 StorageAccount or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.StorageAccount] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.StorageAccount]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + storage_account_name=storage_account_name, + storage_account=storage_account, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageAccount', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'} + + + def _delete_initial( + self, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'storageAccountName': self._serialize.url("storage_account_name", storage_account_name, 'str'), + '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') + + # 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, device_name, storage_account_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the StorageAccount on the Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param storage_account_name: The StorageAccount name. + :type storage_account_name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_triggers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_triggers_operations.py new file mode 100644 index 000000000000..c9907d819a78 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_triggers_operations.py @@ -0,0 +1,370 @@ +# 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 TriggersOperations(object): + """TriggersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists all the triggers configured in the device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param filter: Specify $filter='CustomContextTag eq ' to filter + on custom context tag property + :type filter: 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 Trigger + :rtype: + ~azure.mgmt.databoxedge.models.TriggerPaged[~azure.mgmt.databoxedge.models.Trigger] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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 filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggerPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get a specific trigger by name. + + :param device_name: The device name. + :type device_name: str + :param name: The trigger name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: Trigger or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.Trigger or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('Trigger', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} + + + def _create_or_update_initial( + self, device_name, name, trigger, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(trigger, 'Trigger') + + # 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('Trigger', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, trigger, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a trigger. + + :param device_name: Creates or updates a trigger + :type device_name: str + :param name: The trigger name. + :type name: str + :param trigger: The trigger. + :type trigger: ~azure.mgmt.databoxedge.models.Trigger + :param resource_group_name: The resource group name. + :type resource_group_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 Trigger or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.Trigger] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.Trigger]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + trigger=trigger, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Trigger', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the trigger on the gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The trigger name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_users_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_users_operations.py new file mode 100644 index 000000000000..3b05e43caa10 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/operations/_users_operations.py @@ -0,0 +1,373 @@ +# 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 UsersOperations(object): + """UsersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2021-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-02-01-preview" + + self.config = config + + def list_by_data_box_edge_device( + self, device_name, resource_group_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets all the users registered on a Data Box Edge/Data Box Gateway + device. + + :param device_name: The device name. + :type device_name: str + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param expand: Specify $expand=details to populate additional fields + related to the resource or Specify $skipToken= to populate the + next page in the list. + :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: An iterator like instance of User + :rtype: + ~azure.mgmt.databoxedge.models.UserPaged[~azure.mgmt.databoxedge.models.User] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_data_box_edge_device.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + '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 expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users'} + + def get( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified user. + + :param device_name: The device name. + :type device_name: str + :param name: The user name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databoxedge.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} + + + def _create_or_update_initial( + self, device_name, name, user, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # 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(user, 'User') + + # 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('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, device_name, name, user, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new user or updates an existing user's information on a Data + Box Edge/Data Box Gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The user name. + :type name: str + :param user: The user details. + :type user: ~azure.mgmt.databoxedge.models.User + :param resource_group_name: The resource group name. + :type resource_group_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 User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databoxedge.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databoxedge.models.User]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + user=user, + resource_group_name=resource_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', 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_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} + + + def _delete_initial( + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'deviceName': self._serialize.url("device_name", device_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + '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') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + 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, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the user on a databox edge/gateway device. + + :param device_name: The device name. + :type device_name: str + :param name: The user name. + :type name: str + :param resource_group_name: The resource group name. + :type resource_group_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( + device_name=device_name, + name=name, + resource_group_name=resource_group_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.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/version.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/version.py new file mode 100644 index 000000000000..b29e7bdbb9f3 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2021_02_01_preview/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 = "2021-02-01-preview" +